Analysis Report

Generated on: 2026-01-05 21:49:02

Summary

Severity Breakdown

🟢 GREEN: 3237 🟡 YELLOW: 4388 🔴 RED: 8844 🔵 DEBUG: 4603 TOTAL: 21072

Performance Impact (filtered)

CRITICAL: 280 HIGH: 1182 MEDIUM: 5804 LOW: 13806

Top Issues by Type ▼

Pattern Count Impact
🔴 global_write 8844 LOW
🔵 debug_statement 4603 MEDIUM
🟡 potential_nil_access 2696 LOW
🟡 unused_local_variable 1412 LOW
🟢 uncached_globals_summary 1201 MEDIUM
🟢 table_insert_append 1171 HIGH
🟡 string_concat_in_loop 280 CRITICAL
🟢 repeated_npc_id() 125 LOW
🟢 string_len 77 LOW
🟢 repeated_obj_id() 71 LOW

101- BAS scopes extravaganza 2D shader-based scopes patch - Kuez

1 file (🟢0 🟡0 🔴1 🔵0)

scopeRadii.script

L4 🔴 global_write
Global write: scopeRadii
Impact: low
Show code
scopeRadii = {

108- Remove dropping weapons from damage - Great_Day

3 files (🟢17 🟡25 🔴5 🔵2)

actor_effects.script

L1530 🟢 table_insert_append
table.insert(anims, v) -> anims[#anims+1] = v
Impact: high
Show code
table.insert(anims,{e = i,d = v[2] or math.random(0,1),c = cnt})
L31 🟢 uncached_globals_summary
Cache 1 globals in init_settings
Impact: medium
Show code
L43: tonumber L65: tonumber
L133 🟢 uncached_globals_summary
Cache 1 globals in parse_anims
Impact: medium
Show code
L147: tonumber L160: tonumber
L769 🟢 uncached_globals_summary
Cache 1 globals in Update_Rad
Impact: medium
Show code
L787: math.random L788: math.random
L807 🟢 uncached_globals_summary
Cache 1 globals in Update_Mask
Impact: medium
Show code
L834: tostring L871: tostring
L984 🟢 uncached_globals_summary
Cache 1 globals in Update_Blood
Impact: medium
Show code
L1001: math.random L1007: math.random
L1486 🟢 uncached_globals_summary
Cache 1 globals in shoot_effect
Impact: medium
Show code
L1500: math.random L1505: math.random
L253 🟢 repeated_itm_section()
itm:section() called 3x in Hit_TorchToggle
Impact: low
Show code
Cache itm:section() result
L402 🟢 repeated_itm_section()
itm:section() called 3x in Hit_MaskCleaning
Impact: low
Show code
Cache itm:section() result
L1766 🟢 repeated_obj_id()
obj:id() called 3x in actor_item_to_slot
Impact: low
Show code
Cache obj:id() result
L1368 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~WARNING actor_effects.play_item_fx | item animation [%s] doesn't exist!", name)
L1832 🔴 global_write
Global write: minimap_enabled
Impact: low
Show code
minimap_enabled = ui_options.get("video/hud/show_minimap")
L253 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
local hud = ini_sys:r_string_ex(itm:section(),"hud") or "hud_base"
L258 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
local kind = ini_sys:r_string_ex(itm:section(),"kind") or nil
L259 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
local class = ini_sys:r_string_ex(itm:section(),"class") or nil
L402 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
local hud = ini_sys:r_string_ex(itm:section(),"hud") or "hud_base"
L407 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
local kind = ini_sys:r_string_ex(itm:section(),"kind") or nil
L408 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
local class = ini_sys:r_string_ex(itm:section(),"class") or nil
L602 🟡 potential_nil_access
Potential nil access: 'grn' from :item_in_slot() used without nil check
Impact: low
Show code
grn:switch_state(0)
L604 🟡 potential_nil_access
Potential nil access: 'grn' from :item_in_slot() used without nil check
Impact: low
Show code
elseif hqt_state == 3 and grn:get_state() == 0 then
L607 🟡 potential_nil_access
Potential nil access: 'grn' from :item_in_slot() used without nil check
Impact: low
Show code
elseif hqt_state == 4 and (grn:get_state() == 1 or grn:get_state() == 2) then
L607 🟡 potential_nil_access
Potential nil access: 'grn' from :item_in_slot() used without nil check
Impact: low
Show code
elseif hqt_state == 4 and (grn:get_state() == 1 or grn:get_state() == 2) then
L608 🟡 potential_nil_access
Potential nil access: 'grn' from :item_in_slot() used without nil check
Impact: low
Show code
grn:switch_state(3)
L613 🟡 potential_nil_access
Potential nil access: 'grn' from :item_in_slot() used without nil check
Impact: low
Show code
if grn then grn:switch_state(3) end
L1639 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
cam_dist = actor:bone_position("bip01_head"):distance_to_sqr(device().cam_pos)
L10 🟡 unused_local_variable
Local variable 'last_det' is assigned but never used
Impact: low
Show code
local last_det = 0
L24 🟡 unused_local_variable
Local variable 'allow_states' is assigned but never used
Impact: low
Show code
local allow_states = {
L1380 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_eff:r_line_ex(name,i,"","")
L1146 🟡 unused_local_variable
Local variable 'bar_hp_trigger' is assigned but never used
Impact: low
Show code
local bar_hp_trigger = 0.95
L1306 🟡 unused_local_variable
Local variable 'actor_pos' is assigned but never used
Impact: low
Show code
local actor_pos = db.actor:bone_position("bip01_head")

xr_meet.script

L14 🟢 uncached_globals_summary
Cache 1 globals in get_vertex
Impact: medium
Show code
L15: math.random L17: math.random
L283 🟢 uncached_globals_summary
Cache 1 globals in update
Impact: medium
Show code
L297: tonumber L310: tonumber
L57 🟢 repeated_self_object_id()
self.object:id() called 3x in evaluate
Impact: low
Show code
Cache self.object:id() result
L305 🟢 repeated_self_npc_id()
self.npc:id() called 4x in update
Impact: low
Show code
Cache self.npc:id() result
L484 🟢 repeated_victim_id()
victim:id() called 3x in notify_on_use
Impact: low
Show code
Cache victim:id() result
L729 🟢 repeated_npc_id()
npc:id() called 4x in process_npc_usability
Impact: low
Show code
Cache npc:id() result
L819 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
if se and IsStalker(se) then
L550 🟡 potential_nil_access
Potential nil access: 'manager' from :motivation_action_manager() used without nil check
Impact: low
Show code
local wp = world_property
L553 🟡 potential_nil_access
Potential nil access: 'manager' from :motivation_action_manager() used without nil check
Impact: low
Show code
local action = manager:action(xr_actions_id.alife)
L713 🟡 potential_nil_access
Potential nil access: 'manager' from :motivation_action_manager() used without nil check (auto-fixable)
Impact: low
L714 🟡 potential_nil_access
Potential nil access: 'manager' from :motivation_action_manager() used without nil check
Impact: low
Show code
--- НаÑ

xrs_facer.script

L178 🟢 uncached_globals_summary
Cache 1 globals in execute
Impact: medium
Show code
L236: math.random L262: math.random
L13 🔴 global_write
Global write: evid_facer
Impact: low
Show code
evid_facer = 18815
L14 🔴 global_write
Global write: evid_steal_up_facer
Impact: low
Show code
evid_steal_up_facer = 18816
L15 🔴 global_write
Global write: actid_facer
Impact: low
Show code
actid_facer = 18815
L16 🔴 global_write
Global write: actid_steal_up_facer
Impact: low
Show code
actid_steal_up_facer = 18816
L368 🟡 potential_nil_access
Potential nil access: 'be' from :best_enemy() used without nil check
Impact: low
Show code
if npc:see(be) and not be:see(npc) then
L369 🟡 potential_nil_access
Potential nil access: 'be' from :best_enemy() used without nil check
Impact: low
Show code
save_var(npc,"facer_target",be:id())
L524 🟡 potential_nil_access
Potential nil access: 'manager' from :motivation_action_manager() used without nil check
Impact: low
Show code
action = manager:action(p[i])

109- MCM Mod Configuration Menu - RavenAscendant

4 files (🟢11 🟡5 🔴18 🔵20)

dph_mcm_save_storage.script

L53 🟢 table_insert_append
table.insert(modules, v) -> modules[#modules+1] = v
Impact: high
Show code
table.insert(modules, mod)
L49 🔴 global_write
Global write: m
Impact: low
Show code
m = tostring(mod)
L57 🔴 global_write
Global write: m
Impact: low
Show code
m = tostring(mt)
L58 🔴 global_write
Global write: p
Impact: low
Show code
p = tostring(pt)

mcm_log.script

L81 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!ERROR MCM Logs unable to create log file. Manualy creating the directory appdata/logs/mcm/ may solve this issue.")
L129 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
local tc = self:log(fmt, ...) or time_continual()
L131 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s|%s|%s||"..tostring(fmt), self.prefix, self.fname, tc, ...)
L141 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
return self:log("TABLE:%s \n%s", name, txt)
L161 🔴 global_write
Global write: path
Impact: low
Show code
path = getFS():update_path("$fs_root$","fsgame.ltx")
L177 🔴 global_write
Global write: fsgameupdated
Impact: low
Show code
fsgameupdated = fsgame_append("mcmlogs", "$mcmlogs$ = true | false | $logs$| mcm\\")
L79 🟡 unused_local_variable
Local variable 'msg' is assigned but never used
Impact: low
Show code
local file, msg = io.open(PATH.."/"..self.fname.."_"..ui_mcm.get_session_id()..".log","a+")

ui_main_menu.script

L123 🟢 string_len
string.len(file:NameFull()) -> #file:NameFull()
Impact: low
Show code
local file_name = string.sub(file:NameFull(), 0, (string.len(file:NameFull()) - string.len(".scop")))
L123 🟢 string_len
string.len(".scop") -> #".scop"
Impact: low
Show code
local file_name = string.sub(file:NameFull(), 0, (string.len(file:NameFull()) - string.len(".scop")))
L200 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("MCMBTN press")
L378 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("system_ini_reload = success!")
L389 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("- main_menu:OnMenuReloaded()")
L343 🔴 global_write
Global write: m
Impact: low
Show code
m = level.get_time_minutes()
L345 🔴 global_write
Global write: m
Impact: low
Show code
m = ("0"..m)
L51 🟡 unused_local_variable
Local variable 'mm' is assigned but never used
Impact: low
Show code
local mm = _G.main_menu.get_main_menu()

ui_mcm.script

L377 🟢 table_insert_append
table.insert(collection.gr, v) -> collection.gr[#collection.gr+1] = v
Impact: high
Show code
table.insert(collection.gr, temp)
L378 🟢 table_insert_append
table.insert(options, v) -> options[#options+1] = v
Impact: high
Show code
table.insert(options, collection)
L380 🟢 table_insert_append
table.insert(options[collect].gr, v) -> options[collect].gr[#options[collect].gr+1] = v
Impact: high
Show code
table.insert(options[collect].gr, temp)
L383 🟢 table_insert_append
table.insert(options, v) -> options[#options+1] = v
Impact: high
Show code
table.insert(options, temp)
L459 🟢 uncached_globals_summary
Cache 1 globals in get_conflict
Impact: medium
Show code
L461: type L461: type
L880 🟢 uncached_globals_summary
Cache 1 globals in Update
Impact: medium
Show code
L884: pairs L895: pairs
L946 🟢 uncached_globals_summary
Cache 1 globals in Reset_opt
Impact: medium
Show code
L952: unpack L988: unpack
L2393 🟢 uncached_globals_summary
Cache 1 globals in On_Accept
Impact: medium
Show code
L2414: unpack L2417: unpack
L158 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
dbg:log(...)
L162 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L666 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("MCM Session ID:%s", session_id)
L684 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!MCM open_to cannot be called while gui is open")
L700 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!MCM get_gui called when GUI closed.")
L712 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!MCM given bad path:%s",id)
L752 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!Found nil option value [%s]", id)
L791 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("MCM init")
L1586 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s preset %s not found or is not table", cc(path , opt), pres)
L1605 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s preset %s cached to %s", cc(path , option), pres, value)
L1608 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s preset %s hidden skipping", cc(path , option), pres)
L1611 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s preset %s not valid", cc(path , option), pres)
L2608 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("MCM Error: dph_mcm_save_storage.script not found")
L174 🔴 global_write
Global write: options
Impact: low
Show code
options = {}
L205 🔴 global_write
Global write: options
Impact: low
Show code
options = {
L367 🔴 global_write
Global write: name
Impact: low
Show code
temp, name = _G[ t[i] ].on_mcm_load(options) -- passing options by referance added in AMCM 1.1 if you use this, nil check, emphasise updating MCM in your mod desc or something
L376 🔴 global_write
Global write: collection
Impact: low
Show code
collection = { id = name , gr = {}}
L494 🔴 global_write
Global write: dispaly_key
Impact: low
Show code
dispaly_key = display_key --old typo aliased to prevent breaking mods.
L496 🔴 global_write
Global write: kb_mod_radio
Impact: low
Show code
kb_mod_radio = "radio_h"
L497 🔴 global_write
Global write: kb_mod_list
Impact: low
Show code
kb_mod_list = "list"
L544 🔴 global_write
Global write: dtap
Impact: low
Show code
dtap = double_tap("mcm_single_"..id, key, true)
L1107 🔴 global_write
Global write: wrapbox
Impact: low
Show code
wrapbox = xml:InitStatic("elements:image", anchor)
L1114 🔴 global_write
Global write: pos
Impact: low
Show code
pos = wrapbox:GetWndPos()
L2612 🔴 global_write
Global write: store_in_save
Impact: low
Show code
store_in_save = dph_mcm_save_storage.register_module
L135 🟡 unused_local_variable
Local variable 'm_ceil' is assigned but never used
Impact: low
Show code
local m_floor, m_ceil, s_find, s_gsub = math.floor, math.ceil, string.find, string.gsub
L141 🟡 unused_local_variable
Local variable 'clr_g2' is assigned but never used
Impact: low
Show code
local clr_g2 = GetARGB(255, 200, 200, 200)
L2566 🟡 unused_local_variable
Local variable 'bind' is assigned but never used
Impact: low
Show code
local bind = dik_to_bind(dik)

11- Preblowout Murder - Ethylia

1 file (🟢3 🟡6 🔴10 🔵8)

surge_manager.script

L251 🟢 uncached_globals_summary
Cache 1 globals in new_surge_time
Impact: medium
Show code
L259: math.floor L264: math.floor
L328 🟢 uncached_globals_summary
Cache 1 globals in end_surge
Impact: medium
Show code
L355: pairs L360: pairs
L564 🟢 uncached_globals_summary
Cache 2 globals in update
Impact: medium
Show code
L597: math.ceil L676: math.ceil L612: math.abs L621: math.abs
L103 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Surge manager | " .. fmt,...)
L558 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("played sound at x=%s z=%s", rnd_pos.x, rnd_pos.z)
L626 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Played far crows")
L633 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Played medium crows")
L640 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Played close crows")
L647 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Played medium crows")
L654 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Played far crows")
L754 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("opt_blowout_task",ui_options.get("alife/event/emission_task"))
L24 🔴 global_write
Global write: SurgeManager
Impact: low
Show code
SurgeManager = nil
L26 🔴 global_write
Global write: SurgeManager
Impact: low
Show code
SurgeManager = SurgeManager or CSurgeManager()
L424 🔴 global_write
Global write: temp1
Impact: low
Show code
temp1, id, temp2 = ini:r_line("list", i, "", "")
L424 🔴 global_write
Global write: id
Impact: low
Show code
temp1, id, temp2 = ini:r_line("list", i, "", "")
L424 🔴 global_write
Global write: temp2
Impact: low
Show code
temp1, id, temp2 = ini:r_line("list", i, "", "")
L482 🔴 global_write
Global write: protection
Impact: low
Show code
protection = (suit_protection + helmet_protection + drug_protection)
L484 🔴 global_write
Global write: protection
Impact: low
Show code
protection = 1
L486 🔴 global_write
Global write: hit_power
Impact: low
Show code
hit_power=power*(1-protection)
L1181 🔴 global_write
Global write: currentIndik
Impact: low
Show code
currentIndik=nil
L1196 🔴 global_write
Global write: currentIndik
Impact: low
Show code
currentIndik=indik
L1298 🟡 potential_nil_access
Potential nil access: 'crow' from level.object_by_id() used without nil check
Impact: low
Show code
if (crow and crow:alive() and pos < crow:position().z) then
L1298 🟡 potential_nil_access
Potential nil access: 'crow' from level.object_by_id() used without nil check
Impact: low
Show code
if (crow and crow:alive() and pos < crow:position().z) then
L1335 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
se_npc = sim:object(id)
L1337 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
squad = squad_id and sim:object(squad_id)
L433 🟡 unused_local_variable
Local variable 'artefact_factors' is assigned but never used
Impact: low
Show code
local artefact_factors={10,5,10,10,10}
L1498 🟡 unused_local_variable
Local variable 'time' is assigned but never used
Impact: low
Show code
local time = 0

110- SortingPlus - RavenAscendant

4 files (🟢8 🟡1 🔴21 🔵0)

rax_dynamic_custom_functor.script

L43 🔴 global_write
Global write: gui
Impact: low
Show code
gui = ui_inventory.GUI
L44 🔴 global_write
Global write: index
Impact: low
Show code
_, index = table_size(gui.properties)
L45 🔴 global_write
Global write: ds_is_funct
Impact: low
Show code
ds_is_funct = type(display_string) == "function"

rax_icon_layers.script

L28 🟢 table_insert_append
table.insert(icon_layers[name], v) -> icon_layers[name][#icon_layers[name]+1] = v
Impact: high
Show code
table.insert(icon_layers[name], functor)

rax_persistent_highlight.script

L24 🟢 table_insert_append
table.insert(persistent_highlights[name], v) -> persistent_highlights[name][#persistent_highlights[name]+1] = v
Impact: high
Show code
table.insert(persistent_highlights[name], functor)
L57 🟢 uncached_globals_summary
Cache 1 globals in change_alpha
Impact: medium
Show code
L61: bit.band L62: bit.band
L44 🔴 global_write
Global write: persistant_highlight
Impact: low
Show code
persistant_highlight = self:GetPersistantHighlight()
L47 🔴 global_write
Global write: color
Impact: low
Show code
color = main_clr and change_alpha(persistant_highlight, 255) or persistant_highlight -- if main_clr set the alpha to max for reasons.
L55 🔴 global_write
Global write: clr_cache
Impact: low
Show code
clr_cache = {}
L61 🔴 global_write
Global write: b
Impact: low
Show code
b = bit.band(clr, 255)
L62 🔴 global_write
Global write: g
Impact: low
Show code
g = bit.band(bit.rshift(clr, 8), 255)
L63 🔴 global_write
Global write: r
Impact: low
Show code
r = bit.band(bit.rshift(clr, 16), 255)

zzz_rax_sortingplus_mcm.script

L207 🟢 table_insert_append
table.insert(t, v) -> t[#t+1] = v
Impact: high
Show code
table.insert(t, {id=catgory, type = "input", val = 2, def = tonumber(ui_catagories[catgory][1]), min = -100, max = 1000}) -- here we push the entry into the menu table
L338 🟢 repeated_t[a]_section()
t[a]:section() called 3x in sort_by_kind
Impact: low
Show code
Cache t[a]:section() result
L338 🟢 repeated_t[b]_section()
t[b]:section() called 3x in sort_by_kind
Impact: low
Show code
Cache t[b]:section() result
L373 🟢 repeated_t[a]_section()
t[a]:section() called 3x in sort_by_sizekind
Impact: low
Show code
Cache t[a]:section() result
L373 🟢 repeated_t[b]_section()
t[b]:section() called 3x in sort_by_sizekind
Impact: low
Show code
Cache t[b]:section() result
L66 🔴 global_write
Global write: axis
Impact: low
Show code
axis = utils_xml.get_item_axis(sec)
L73 🔴 global_write
Global write: axis
Impact: low
Show code
axis = utils_xml.get_item_axis(sec)
L178 🔴 global_write
Global write: t
Impact: low
Show code
t = {
L217 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "SortingPlus" ,sh=true ,gr= t } -- put the list of setting into the table describing the entire MCM menu
L260 🔴 global_write
Global write: axis
Impact: low
Show code
axis = utils_xml.get_item_axis(a_sec,1)
L282 🔴 global_write
Global write: axis
Impact: low
Show code
axis = utils_xml.get_item_axis(b_sec,1)
L458 🔴 global_write
Global write: axis
Impact: low
Show code
axis = utils_xml.get_item_axis(sec,1)
L492 🔴 global_write
Global write: tg_wait
Impact: low
Show code
tg_wait = 0
L496 🔴 global_write
Global write: tg
Impact: low
Show code
tg = time_global() --this function gets called repetedly when key pressed, using a timer to lcean that up
L500 🔴 global_write
Global write: tg_wait
Impact: low
Show code
tg_wait = tg + 500 --half a second seems like a nice time for a key press, no one is seedrunning this game, or if they are they shouldn't use mods, atleast not htis one :)
L615 🔴 global_write
Global write: sec
Impact: low
Show code
sec = obj:section()
L621 🔴 global_write
Global write: sec
Impact: low
Show code
sec = obj:section()
L239 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, sec, kind = ini:r_line_ex("kind_overrides", i, "", "")

111- Immersive Sleep - tkcrits

2 files (🟢1 🟡4 🔴0 🔵0)

actor_status_sleep.script

L34 🟡 unused_local_variable
Local variable 'comfy' is assigned but never used
Impact: low
Show code
local comfy = 0

ui_sleep_dialog.script

L240 🟢 uncached_globals_summary
Cache 3 globals in get_immersive_sleep_hours
Impact: medium
Show code
L264: tostring L285: tostring L277: math.floor L289: math.floor L320: string.format L323: string.format
L9 🟡 unused_local_variable
Local variable 'last_sleep_chk' is assigned but never used
Impact: low
Show code
local last_sleep, last_sleep_chk, pwr_chk
L9 🟡 unused_local_variable
Local variable 'pwr_chk' is assigned but never used
Impact: low
Show code
local last_sleep, last_sleep_chk, pwr_chk
L210 🟡 unused_local_variable
Local variable 'bind' is assigned but never used
Impact: low
Show code
local bind = dik_to_bind(dik)

114- Aslan Lottery Fixes - Starcry_

1 file (🟢1 🟡3 🔴0 🔵0)

dialogs_mlr.script

L1526 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "wpn_binoc")
L1558 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(i)
L1559 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if se_obj and (se_obj:name() == "secret_fanat") then
L1410 🟡 unused_local_variable
Local variable 'community' is assigned but never used
Impact: low
Show code
local community = {

115- Campfire slowly regens life - arti

1 file (🟢0 🟡0 🔴6 🔵0)

cozy_campfire.script

L15 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 0
L16 🔴 global_write
Global write: delay
Impact: low
Show code
delay = 800
L19 🔴 global_write
Global write: tg
Impact: low
Show code
tg = time_global()
L22 🔴 global_write
Global write: grok_delay
Impact: low
Show code
grok_delay = tg + delay
L23 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 1
L27 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 0

116- Dialogues Expanded - indyora

2 files (🟢31 🟡26 🔴2 🔵1)

dynamic_news_manager.script

L400 🟢 table_insert_append
table.insert(picked_tbl, v) -> picked_tbl[#picked_tbl+1] = v
Impact: high
Show code
table.insert(picked_tbl, i)
L483 🟢 table_insert_append
table.insert(picked_tbl, v) -> picked_tbl[#picked_tbl+1] = v
Impact: high
Show code
table.insert(picked_tbl, i)
L675 🟢 table_insert_append
table.insert(self.loot, v) -> self.loot[#self.loot+1] = v
Impact: high
Show code
table.insert(self.loot,item)
L2777 🟢 table_insert_append
table.insert(sentences, v) -> sentences[#sentences+1] = v
Impact: high
Show code
table.insert(sentences,tr_s)
L29 🟢 uncached_globals_summary
Cache 1 globals in update_settings
Impact: medium
Show code
L65: math.random L66: math.random
L290 🟢 uncached_globals_summary
Cache 1 globals in TickQuick
Impact: medium
Show code
L305: math.random L310: math.random
L1099 🟢 uncached_globals_summary
Cache 1 globals in WelcomeToNetwork
Impact: medium
Show code
L1122: math.random L1123: math.random
L1136 🟢 uncached_globals_summary
Cache 2 globals in ReportDeathBySurge
Impact: medium
Show code
L1145: math.random L1147: math.random L1147: tostring L1157: tostring
L1313 🟢 uncached_globals_summary
Cache 1 globals in SeenDeathOfStalker
Impact: medium
Show code
L1334: math.random L1335: math.random
L1348 🟢 uncached_globals_summary
Cache 1 globals in SeenDeathOfMutant
Impact: medium
Show code
L1365: math.random L1366: math.random
L1379 🟢 uncached_globals_summary
Cache 1 globals in SeenDeathByMutant
Impact: medium
Show code
L1393: math.random L1394: math.random
L1456 🟢 uncached_globals_summary
Cache 1 globals in SOSBattleOffline
Impact: medium
Show code
L1491: math.random L1492: math.random
L1658 🟢 uncached_globals_summary
Cache 1 globals in FoundStash
Impact: medium
Show code
L1664: math.random L1673: math.random
L1720 🟢 uncached_globals_summary
Cache 1 globals in GossipLoot
Impact: medium
Show code
L1740: math.random L1749: math.random
L1770 🟢 uncached_globals_summary
Cache 2 globals in ReportNextEmission
Impact: medium
Show code
L1776: math.random L1798: math.random L1795: math.floor L1807: math.floor
L1865 🟢 uncached_globals_summary
Cache 1 globals in ReportZoneActivity
Impact: medium
Show code
L1896: math.random L1938: math.random
L2017 🟢 uncached_globals_summary
Cache 2 globals in FoundDead
Impact: medium
Show code
L2024: math.random L2025: math.random L2036: tostring L2037: tostring
L2134 🟢 uncached_globals_summary
Cache 1 globals in GossipNearbyActivity
Impact: medium
Show code
L2160: math.random L2162: math.random
L2556 🟢 uncached_globals_summary
Cache 1 globals in ResponseOnFoundStash
Impact: medium
Show code
L2567: math.random L2567: math.random
L2688 🟢 uncached_globals_summary
Cache 1 globals in ResponseOnDeathByStalker_Fake
Impact: medium
Show code
L2699: math.random L2699: math.random
L2706 🟢 uncached_globals_summary
Cache 1 globals in ResponseOnDeathByMutant_Fake
Impact: medium
Show code
L2717: math.random L2717: math.random
L2724 🟢 uncached_globals_summary
Cache 1 globals in ResponseOnDeathBySurges_Fake
Impact: medium
Show code
L2735: math.random L2735: math.random
L2746 🟢 uncached_globals_summary
Cache 1 globals in BuildSentenceStalkerEnemy
Impact: medium
Show code
L2787: math.random L2787: math.random
L2793 🟢 uncached_globals_summary
Cache 1 globals in BuildSentenceStalkerEnemy_Offline
Impact: medium
Show code
L2794: math.random L2795: math.random
L1160 🟡 string_concat_in_loop
String concat in loop: msg = msg .. x
Impact: critical
Show code
msg = msg .. strformat("\\n%s-%s %s%s-%s%s%s, %s %s, %s.",clr_1,clr_2,y1,y2,z1,z2,z3,a,b,c)
L1985 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ News couldn't be sent because it involves special character [%s], he's missing? \nMessage: %s", fac_profile[k], msg_pick)
L12 🔴 global_write
Global write: enable_news
Impact: low
Show code
enable_news = true -- useful for pausing news if set to false
L2248 🔴 global_write
Global write: actor_name
Impact: low
Show code
actor_name = se_actor:character_name()
L866 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
se_obj = sim:object(i)
L867 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
clsid = se_obj and se_obj:clsid()
L903 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(i)
L1108 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(i)
L1109 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if (se_obj and IsStalker(nil,se_obj:clsid()) and se_obj:alive() and se_obj:community() ~= "zombied" and se_obj:community() ~= "monolith" and se_obj.group_id ~= 65535) then
L1109 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if (se_obj and IsStalker(nil,se_obj:clsid()) and se_obj:alive() and se_obj:community() ~= "zombied" and se_obj:community() ~= "monolith" and se_obj.group_id ~= 65535) then
L1109 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if (se_obj and IsStalker(nil,se_obj:clsid()) and se_obj:alive() and se_obj:community() ~= "zombied" and se_obj:community() ~= "monolith" and se_obj.group_id ~= 65535) then
L1109 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if (se_obj and IsStalker(nil,se_obj:clsid()) and se_obj:alive() and se_obj:community() ~= "zombied" and se_obj:community() ~= "monolith" and se_obj.group_id ~= 65535) then
L1114 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_actor = sim:actor()
L1206 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_actor = sim:actor()
L1878 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(i)
L1879 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
if se_obj and (lvl_name == sim:level_name(gg:vertex(se_obj.m_game_vertex_id):level_id())) then
L1922 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(stalkers[i])
L2413 🟡 potential_nil_access
Potential nil access: 'alife' from alife() used without nil check
Impact: low
Show code
local se_actor = alife:actor()
L2466 🟡 potential_nil_access
Potential nil access: 'alife' from alife() used without nil check
Impact: low
Show code
local se_actor = alife:actor()
L1772 🟡 unused_local_variable
Local variable 'clr' is assigned but never used
Impact: low
Show code
local SM, SurgeType, last_surge_time, AccuracyTier, comm, Se, clr, msg, a, b, c, d, Tbl_msg
L1913 🟡 unused_local_variable
Local variable 'sender_desc' is assigned but never used
Impact: low
Show code
local sender_desc = game.translate_string("st_dyn_news_comm_" .. sender_comm .. "_" .. tostring(6))
L2747 🟡 unused_local_variable
Local variable 'comm_victim' is assigned but never used
Impact: low
Show code
local comm_victim = victim:character_community()

ui_item.script

L142 🟢 string_len
string.len(str) -> #str
Impact: low
Show code
local length = string.len(str)
L145 🟢 string_len
string.len(str) -> #str
Impact: low
Show code
length = string.len(str)
L168 🟢 string_len
string.len(str) -> #str
Impact: low
Show code
local length = string.len(str)
L171 🟢 string_len
string.len(str) -> #str
Impact: low
Show code
length = string.len(str)
L185 🟢 string_len
string.len(str) -> #str
Impact: low
Show code
local length = string.len(str)
L184 🟢 uncached_globals_summary
Cache 1 globals in remove_parentheses
Impact: medium
Show code
L188: string.sub L191: string.sub
L461 🟢 uncached_globals_summary
Cache 2 globals in build_desc_footer
Impact: medium
Show code
L528: math.abs L538: math.abs L576: tostring L583: tostring
L27 🟡 unused_local_variable
Local variable 'clr_b2' is assigned but never used
Impact: low
Show code
local clr_b2 = utils_xml.get_color("d_blue")
L30 🟡 unused_local_variable
Local variable 'clr_w' is assigned but never used
Impact: low
Show code
local clr_w = utils_xml.get_color("pda_white")
L38 🟡 unused_local_variable
Local variable 'last_sn_id' is assigned but never used
Impact: low
Show code
local last_sn_id = nil
L41 🟡 unused_local_variable
Local variable 'last_short_name_id' is assigned but never used
Impact: low
Show code
local last_short_name_id = nil
L435 🟡 unused_local_variable
Local variable 'break_con' is assigned but never used
Impact: low
Show code
local break_con = "af_aam"
L491 🟡 unused_local_variable
Local variable 'artefact_count' is assigned but never used
Impact: low
Show code
local artefact_count = ini_sys:r_float_ex(sec,"artefact_count") or 0
L493 🟡 unused_local_variable
Local variable 'additional_inventory_weight' is assigned but never used
Impact: low
Show code
local additional_inventory_weight = ini_sys:r_float_ex(sec,"additional_inventory_weight") or 0

117- Gotta Go Fast - Grokitach

2 files (🟢0 🟡0 🔴3 🔵0)

grok_gotta_go_fast.script

L10 🔴 global_write
Global write: run_coeff
Impact: low
Show code
run_coeff = grok_gotta_go_fast_mcm.get_config("gotta_go_fast_run")
L11 🔴 global_write
Global write: sprint_coeff
Impact: low
Show code
sprint_coeff = grok_gotta_go_fast_mcm.get_config("gotta_go_fast_sprint")

grok_gotta_go_fast_mcm.script

L12 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "gggf",sh=true ,gr={

118- Gotta go Also Slow - reter

1 file (🟢0 🟡0 🔴1 🔵0)

grok_gotta_go_fast_mcm.script

L12 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "gggf",sh=true ,gr={

119- HD Glowsticks - r3zy

2 files (🟢12 🟡45 🔴7 🔵2)

trader_autoinject.script

L34 🟢 repeated_npc_id()
npc:id() called 3x in trade_manager.update
Impact: low
Show code
Cache npc:id() result
L144 🟢 repeated_item_section()
item:section() called 4x in itr_inv
Impact: low
Show code
Cache item:section() result
L16 🔴 global_write
Global write: find
Impact: low
Show code
find = string.find
L32 🔴 global_write
Global write: TraderUpdate
Impact: low
Show code
TraderUpdate = trade_manager.update

zz_glowstick_mcm.script

L20 🟢 uncached_globals_summary
Cache 1 globals in actor_on_hud_animation_end
Impact: medium
Show code
L21: string.find L38: string.find
L43 🟢 uncached_globals_summary
Cache 1 globals in actor_on_update
Impact: medium
Show code
L50: string.find L65: string.find
L116 🟢 uncached_globals_summary
Cache 1 globals in spawn_glowstick
Impact: medium
Show code
L141: math.random L142: math.random
L751 🟢 uncached_globals_summary
Cache 1 globals in spawn_glowostick
Impact: medium
Show code
L753: math.random L760: math.random
L803 🟢 uncached_globals_summary
Cache 1 globals in ui_mm_faction_select.UINewGame.LoadLoadout
Impact: medium
Show code
L810: pairs L827: pairs
L50 🟢 repeated_det_section()
det:section() called 5x in actor_on_update
Impact: low
Show code
Cache det:section() result
L84 🟢 repeated_det_id()
det:id() called 2x in actor_on_update
Impact: low
Show code
Cache det:id() result
L206 🟢 repeated_itm_id()
itm:id() called 2x in actor_on_item_drop
Impact: low
Show code
Cache itm:id() result
L303 🟢 repeated_obj_id()
obj:id() called 5x in iter
Impact: low
Show code
Cache obj:id() result
L378 🟢 repeated_self_object_id()
self.object:id() called 9x in update
Impact: low
Show code
Cache self.object:id() result
L129 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!Couldn't spawn Glowstick!")
L136 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!Couldn't get Glowstick data!")
L447 🔴 global_write
Global write: options
Impact: low
Show code
options =
L484 🔴 global_write
Global write: base_get_light_flicker
Impact: low
Show code
base_get_light_flicker = level_environment.get_light_flicker()
L766 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update
L773 🔴 global_write
Global write: SpawnCosmetics
Impact: low
Show code
SpawnCosmetics = death_manager.spawn_cosmetics
L780 🔴 global_write
Global write: TrySpawnTreasure
Impact: low
Show code
TrySpawnTreasure = treasure_manager.try_spawn_treasure
L45 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local det = actor:active_detector()
L50 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
if (string.find(det:section(), "glowstick")) then
L51 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
if (det:condition() > 0.01) then
L52 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
local new_c = clamp(det:condition() - active_gs_drain, 0.01, 0.9999)
L53 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
det:set_condition(new_c)
L60 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
if (det:get_state() ~= last_det_state) then
L61 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
last_det_state = det:get_state()
L62 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
active_gs_drain = ini_sys:r_float_ex(det:section(), "power_drain", 0.001)
L65 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
if (string.find(det:section(), "glowstick")) then
L66 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
if (det:get_state() == 1 and axr_main.weapon_is_zoomed) then
L67 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
det:switch_state(0)
L68 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
det:play_hud_motion("anm_zoom_show_real", false, 0, 1, 0)
L71 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
elseif (string.find(det:section(), "flashlight")) then
L72 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
if (det:get_state() == 1 and not axr_main.weapon_is_zoomed) then
L73 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
local prev_con = det:condition()
L74 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
det:set_condition(0.001)
L75 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
det:switch_state(0)
L76 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
local tm = det:play_hud_motion("anm_show", false, 1, 1, 0) / 1000
L80 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
obj:set_condition(con_d)
L84 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
CreateTimeEvent("glowstick","flashlight_fix",clamp(tm-0.5,0.1,999),flashlight_fix,det:id(),prev_con)
L93 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
if (det:get_state() ~= 0 or shift_pressed or not is_empty(_GUIs) or not game.hud_motion_allowed() or game.only_movekeys_allowed() or not string.find(det:section(), "glowstick")) then
L93 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
if (det:get_state() ~= 0 or shift_pressed or not is_empty(_GUIs) or not game.hud_motion_allowed() or game.only_movekeys_allowed() or not string.find(det:section(), "glowstick")) then
L102 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
local tm = det:play_hud_motion("anm_throw_stick", true, 0, 4, 0) / 1000
L108 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
CreateTimeEvent("glowstick","drop",tm-0.2,spawn_glowstick,det:id(),true)
L120 🟡 potential_nil_access
Potential nil access: 'itm' from level.object_by_id() used without nil check
Impact: low
Show code
if (not itm or (not throw and itm:parent())) then return true end
L123 🟡 potential_nil_access
Potential nil access: 'itm' from level.object_by_id() used without nil check
Impact: low
Show code
local section = itm:section()
L124 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local pos = actor:bone_position(throw and "eye_left" or "bip01_l_hand")
L126 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local obj = alife_create("lights_glowstick", pos, actor:level_vertex_id(), actor:game_vertex_id())
L126 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local obj = alife_create("lights_glowstick", pos, actor:level_vertex_id(), actor:game_vertex_id())
L146 🟡 potential_nil_access
Potential nil access: 'itm' from level.object_by_id() used without nil check
Impact: low
Show code
local con_d = itm:condition()
L149 🟡 potential_nil_access
Potential nil access: 'itm' from level.object_by_id() used without nil check
Impact: low
Show code
alife_release_id(itm:id())
L196 🟡 potential_nil_access
Potential nil access: 'gl' from level.object_by_id() used without nil check
Impact: low
Show code
gl:get_physics_shell():apply_force(dir.x, dir.y, dir.z)
L235 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local next = actor:object(section)
L244 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:move_to_slot(next,9)
L248 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:move_to_slot(item,9)
L253 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:iterate_ruck(search)
L270 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
if (actor:item_in_slot(9)) then return true end
L271 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
if (not actor:object_id(id)) then return true end
L272 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:move_to_slot(actor:object_id(id),9)
L272 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:move_to_slot(actor:object_id(id),9)
L274 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local itm = actor:active_item()
L276 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
local slot = ini_sys:r_s32(itm:section(), "slot")
L317 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
if (not actor:item_in_slot(9)) then
L318 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local itm = actor:active_item()
L320 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
local slot = ini_sys:r_s32(itm:section(), "slot")

123- Modular Tweaks - Vintar0

3 files (🟢7 🟡17 🔴5 🔵20)

gameplay_disguise.script

L360 🟢 uncached_globals_summary
Cache 1 globals in time_to_str
Impact: medium
Show code
L361: tostring L361: tostring
L498 🟢 uncached_globals_summary
Cache 1 globals in get_npc_awareness
Impact: medium
Show code
L501: string.find L503: string.find
L1128 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str = str .. h_a
L168 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR update default community | community (%s) doesn't exist", tostring(comm))
L181 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR update community | community (%s) doesn't exist", tostring(comm))
L235 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("% Disguise highest_suspicion = %s", highest_suspicion.value)
L376 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("% Disguise | npc seeing you | id: %s - comm: %s - name: %s", id, character_community(npc), npc:character_name())
L377 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("% Disguise | [%s] memory | awareness: %s - memory: %s - first_seen: %s - last_seen: %s", id, m.awareness, m.memo, time_to_str(m.first_seen), time_to_str(m.last_seen))
L378 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("% Disguise | [%s] on equipment | active item: %s - weapon: %s - outfit: %s - helmet: %s - backpack: %s - inv: %s ", id, t.active_item, t.weapon, t.outfit, t.helmet, t.backpack, t.inventory)
L379 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("% Disguise | [%s] on behaviour | speed: %s - distance: %s - stay_time: %s", id, t.speed, t.distance, t.stay_time)
L380 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("% Disguise | [%s] suspicion | spike: %s - result: %s", id, spike, m.suspicion)
L381 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("--==============================================================")
L391 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("% Disguise debug_memoery | [%s] still remembers you (%s sec left)",k, (v.memo - time_passed))
L393 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("% Disguise debug_memoery | [%s] forgot you",k)
L782 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("% Disguise calc | fraction [%s] = active_item [%s] + weapon [%s] + outfit [%s] + helmet [%s] + backpack [%s] + inventory [%s]", fraction, (factor.active_item and 1 or 0), (factor.weapon and 1 or 0), (factor.outfit and 1 or 0), (factor.helmet and 1 or 0), (factor.backpack and 1 or 0), (factor.inventory and 1 or 0))
L783 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("% Disguise calc | itm_factor [%s] = active_item [%s]x[%s] + weapon [%s]x[%s] + outfit [%s]x[%s] + helmet [%s]x[%s] + backpack [%s]x[%s] + inventory [%s]x[%s] / fraction [%s]", itm_factor, t.active_item, factor.active_item_factor, t.weapon, factor.weapon_factor, t.outfit, factor.outfit_factor, t.helmet, factor.helmet_factor, t.backpack, factor.backpack_factor, t.inventory, factor.inventory_factor, fraction)
L784 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("% Disguise calc | suspicion [%s] = (awareness [%s] x ( t.stay_time [%s] x t.distance [%s] x t.speed [%s]) x itm_factor [%s]) + spike [%s] - best enemy [%s]", suspicion, awareness , t.stay_time , t.distance , t.speed ,itm_factor,((game_achievements.has_achievement("unforeseen_guest")) and clamp(spike-15,0,spike) or spike), (be and (be:id() ~= AC_ID) and 50 or 0))
L785 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("-------------------------------------------------------------")
L1043 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/ Disguise | attached patch to %s", section)
L1057 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/ Disguise | torn patch of %s", section)
L765 🔴 global_write
Global write: itm_factor
Impact: low
Show code
itm_factor = (
L773 🔴 global_write
Global write: itm_factor
Impact: low
Show code
itm_factor = 100 - itm_factor
L775 🔴 global_write
Global write: itm_factor
Impact: low
Show code
itm_factor = 1
L522 🟡 potential_nil_access
Potential nil access: 'active_item' from :active_item() used without nil check
Impact: low
Show code
local section = active_item and active_item:section() or false
L586 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local section = outfit and outfit:section() or false
L613 🟡 potential_nil_access
Potential nil access: 'helmet' from :item_in_slot() used without nil check
Impact: low
Show code
local section = helmet and helmet:section() or false
L644 🟡 potential_nil_access
Potential nil access: 'backpack' from :item_in_slot() used without nil check
Impact: low
Show code
local section = backpack and backpack:section() or false
L779 🟡 potential_nil_access
Potential nil access: 'be' from :best_enemy() used without nil check
Impact: low
Show code
local suspicion = (awareness * ( t.stay_time * t.distance * t.speed ) * itm_factor) + ((game_achievements.has_achievement("unforeseen_guest")) and clamp(spike-15,0,spike) or spike) - (be and (be:id() ~= AC_ID) and 50 or 0)
L784 🟡 potential_nil_access
Potential nil access: 'be' from :best_enemy() used without nil check
Impact: low
Show code
printf("% Disguise calc | suspicion [%s] = (awareness [%s] x ( t.stay_time [%s] x t.distance [%s] x t.speed [%s]) x itm_factor [%s]) + spike [%s] - best enemy [%s]", suspicion, awareness , t.stay_time , t.distance , t.speed ,itm_factor,((game_achievements.has_achievement("unforeseen_guest")) and clamp(spike-15,0,spike) or spike), (be and (be:id() ~= AC_ID) and 50 or 0))
L916 🟡 potential_nil_access
Potential nil access: 'item' from :item_in_slot() used without nil check
Impact: low
Show code
local id = item and item:id() or 0
L999 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L249 🟡 unused_local_variable
Local variable 'hs_clean' is assigned but never used
Impact: low
Show code
local time_passed, hs_clean
L763 🟡 unused_local_variable
Local variable 'item_factor' is assigned but never used
Impact: low
Show code
local item_factor

xr_meet.script

L14 🟢 uncached_globals_summary
Cache 1 globals in get_vertex
Impact: medium
Show code
L15: math.random L17: math.random
L283 🟢 uncached_globals_summary
Cache 1 globals in update
Impact: medium
Show code
L297: tonumber L310: tonumber
L57 🟢 repeated_self_object_id()
self.object:id() called 3x in evaluate
Impact: low
Show code
Cache self.object:id() result
L305 🟢 repeated_self_npc_id()
self.npc:id() called 4x in update
Impact: low
Show code
Cache self.npc:id() result
L484 🟢 repeated_victim_id()
victim:id() called 3x in notify_on_use
Impact: low
Show code
Cache victim:id() result
L822 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
if se and IsStalker(se) then
L550 🟡 potential_nil_access
Potential nil access: 'manager' from :motivation_action_manager() used without nil check
Impact: low
Show code
local wp = world_property
L553 🟡 potential_nil_access
Potential nil access: 'manager' from :motivation_action_manager() used without nil check
Impact: low
Show code
local action = manager:action(xr_actions_id.alife)
L713 🟡 potential_nil_access
Potential nil access: 'manager' from :motivation_action_manager() used without nil check (auto-fixable)
Impact: low
L714 🟡 potential_nil_access
Potential nil access: 'manager' from :motivation_action_manager() used without nil check
Impact: low
Show code
--- НаÑ

xr_wounded.script

L162 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("wrong wounded animation %s", self.object:name())
L198 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("wrong wounded animation %s", self.object:name())
L240 🔴 global_write
Global write: hp
Impact: low
Show code
hp = 100*self.npc.health
L241 🔴 global_write
Global write: psy
Impact: low
Show code
psy = 100*self.npc.psy_health
L97 🟡 potential_nil_access
Potential nil access: 'enemy' from db.actor() used without nil check
Impact: low
Show code
local enemy_community = enemy:character_community()
L98 🟡 potential_nil_access
Potential nil access: 'enemy' from db.actor() used without nil check
Impact: low
Show code
if enemy and game_relations.is_factions_enemies(obj_community, enemy_community) and posit:distance_to(enemy:position()) < 1.5 and self.object:see(enemy) then

124- Nitpickers Modpack - Ishmaeel

8 files (🟢3 🟡8 🔴19 🔵2)

ish_bolt_b_gone.script

L13 🔴 global_write
Global write: og_keep_item
Impact: low
Show code
og_keep_item = death_manager.keep_item

ish_char_name_saves.script

L13 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("# " .. str)
L68 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("# Renaming %s -> %s", first, second)

ish_fast_transfer.script

L5 🔴 global_write
Global write: last_url
Impact: low
Show code
last_url = nil
L6 🔴 global_write
Global write: enabled
Impact: low
Show code
enabled = {actor_bag = true, npc_bag = true, actor_trade = true, actor_trade_bag = true, npc_trade = true, npc_trade_bag = true}
L13 🔴 global_write
Global write: new_url
Impact: low
Show code
new_url = move_info.bag .. "_" .. move_info.idx .. "_" .. move_info.ts
L18 🔴 global_write
Global write: last_url
Impact: low
Show code
last_url = new_url
L30 🔴 global_write
Global write: bag
Impact: low
Show code
bag = move_info.bag
L31 🔴 global_write
Global write: idx
Impact: low
Show code
idx = move_info.idx
L33 🔴 global_write
Global write: self
Impact: low
Show code
self = ui_inventory.GUI
L36 🔴 global_write
Global write: bag
Impact: low
Show code
bag, idx = self:Picker_Ownership(bag, idx, obj)
L36 🔴 global_write
Global write: idx
Impact: low
Show code
bag, idx = self:Picker_Ownership(bag, idx, obj)
L51 🔴 global_write
Global write: Base_On_Hover
Impact: low
Show code
Base_On_Hover = utils_ui.UICellContainer.On_Hover

ish_fixed_bolt_manager.script

L7 🟡 unused_local_variable
Local variable 'sim' is assigned but never used
Impact: low
Show code
local sim = alife()
L10 🟡 unused_local_variable
Local variable 'id' is assigned but never used
Impact: low
Show code
local id, sec, se_obj
L10 🟡 unused_local_variable
Local variable 'se_obj' is assigned but never used
Impact: low
Show code
local id, sec, se_obj

ish_item_stats.script

L125 🔴 global_write
Global write: Base_UIInfoItem_Update
Impact: low
Show code
Base_UIInfoItem_Update = nil
L172 🔴 global_write
Global write: Base_UIInfoItem_Update
Impact: low
Show code
Base_UIInfoItem_Update = utils_ui.UIInfoItem.Update

ish_proper_unload.script

L16 🟢 table_insert_append
table.insert(unload_strategies, v) -> unload_strategies[#unload_strategies+1] = v
Impact: high
Show code
table.insert(unload_strategies, validate)
L19 🟢 table_insert_append
table.insert(unload_strategies, v) -> unload_strategies[#unload_strategies+1] = v
Impact: high
Show code
table.insert(unload_strategies, eject_magazine)
L22 🟢 table_insert_append
table.insert(unload_strategies, v) -> unload_strategies[#unload_strategies+1] = v
Impact: high
Show code
table.insert(unload_strategies, unload_vanilla)

ish_read_watch.script

L67 🔴 global_write
Global write: hour
Impact: low
Show code
hour = hours[hrs12]
L70 🔴 global_write
Global write: hour
Impact: low
Show code
hour = hours[hrs12 + 1]
L74 🔴 global_write
Global write: hour
Impact: low
Show code
hour = "midnight"
L78 🔴 global_write
Global write: hour
Impact: low
Show code
hour = (min == 0 and "high noon") or "noon"
L82 🔴 global_write
Global write: hour
Impact: low
Show code
hour = "noon"
L11 🟡 unused_local_variable
Local variable 'Y' is assigned but never used
Impact: low
Show code
local Y, M, D, hrs, min, sec, ms = game.get_game_time():get()
L11 🟡 unused_local_variable
Local variable 'M' is assigned but never used
Impact: low
Show code
local Y, M, D, hrs, min, sec, ms = game.get_game_time():get()
L11 🟡 unused_local_variable
Local variable 'D' is assigned but never used
Impact: low
Show code
local Y, M, D, hrs, min, sec, ms = game.get_game_time():get()
L11 🟡 unused_local_variable
Local variable 'sec' is assigned but never used
Impact: low
Show code
local Y, M, D, hrs, min, sec, ms = game.get_game_time():get()
L11 🟡 unused_local_variable
Local variable 'ms' is assigned but never used
Impact: low
Show code
local Y, M, D, hrs, min, sec, ms = game.get_game_time():get()

ish_xr_effects_neu.script

L30 🔴 global_write
Global write: ui_active_slot
Impact: low
Show code
ui_active_slot = 0

125- New Safe Zones - Tweaki_Breeki

2 files (🟢1 🟡6 🔴12 🔵7)

TB_Coordinate_Based_Safe_Zones.script

L242 🟢 repeated_level_name
level.name called 10x in getlevelcoordset
Impact: low
Show code
local level_name = level.name()
L387 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("--- Removing all cubes used for map icons for TB_Coordinate_Based_Safe_Zones v1.5 ---")
L30 🔴 global_write
Global write: tbiconobjs
Impact: low
Show code
tbiconobjs = {
L70 🔴 global_write
Global write: tbSZ_DC
Impact: low
Show code
tbSZ_DC = {
L92 🔴 global_write
Global write: tbSZ_GS
Impact: low
Show code
tbSZ_GS = {
L98 🔴 global_write
Global write: tbSZ_ME
Impact: low
Show code
tbSZ_ME = {
L104 🔴 global_write
Global write: tbSZ_JU
Impact: low
Show code
tbSZ_JU = {
L117 🔴 global_write
Global write: tbSZ_ZA
Impact: low
Show code
tbSZ_ZA = {
L123 🔴 global_write
Global write: tbSZ_RO
Impact: low
Show code
tbSZ_RO = {
L130 🔴 global_write
Global write: tbSZ_PR
Impact: low
Show code
tbSZ_PR = {
L140 🔴 global_write
Global write: tbSZ_OU
Impact: low
Show code
tbSZ_OU = {
L152 🔴 global_write
Global write: tbSZ_RA
Impact: low
Show code
tbSZ_RA = {
L157 🔴 global_write
Global write: tbSZ_DV
Impact: low
Show code
tbSZ_DV = {
L163 🔴 global_write
Global write: tb_ug_maps
Impact: low
Show code
tb_ug_maps = {
L332 🟡 potential_nil_access
Potential nil access: 'se_obj' from level.object_by_id() used without nil check
Impact: low
Show code
if se_obj and (safe_covers_list[se_obj:name()] or se_obj:section() == mapiconobject) then
L332 🟡 potential_nil_access
Potential nil access: 'se_obj' from level.object_by_id() used without nil check
Impact: low
Show code
if se_obj and (safe_covers_list[se_obj:name()] or se_obj:section() == mapiconobject) then
L344 🟡 potential_nil_access
Potential nil access: 'se_obj' from level.object_by_id() used without nil check
Impact: low
Show code
if se_obj and (safe_covers_list[se_obj:name()] or se_obj:section() == mapiconobject) then
L344 🟡 potential_nil_access
Potential nil access: 'se_obj' from level.object_by_id() used without nil check
Impact: low
Show code
if se_obj and (safe_covers_list[se_obj:name()] or se_obj:section() == mapiconobject) then
L370 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(i)

tb_remove_the_tiny_cubes.script

L9 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("$Removing 'tb_tiny_cube' - object number [%s]",i)
L16 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(" ")
L17 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("--- Removed every 'tb_tiny_cube' ---")
L18 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(" ")
L19 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("--- Save your game, then quit the game completely and then remove this addon. ---")
L20 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(" ")
L5 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(i)

126- Companions no headlamps in Stealth - Tweaki_Breeki

1 file (🟢1 🟡0 🔴0 🔵0)

sr_light.script

L84 🟢 repeated_torch_id()
torch:id() called 5x in check_light
Impact: low
Show code
Cache torch:id() result

127- Toggle Scope - Ishmaeel

1 file (🟢2 🟡3 🔴0 🔵25)

ish_toggle_scope.script

L251 🟢 table_insert_append
table.insert(info.valid_scopes, v) -> info.valid_scopes[#info.valid_scopes+1] = v
Impact: high
Show code
table.insert(info.valid_scopes, info.native_scope)
L68 🟢 table_getn
table.getn(valid_scopes) -> #valid_scopes
Impact: low
Show code
log("there are %s scopes for %s", table.getn(valid_scopes), switch_info.weapon_section)
L33 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("busy.")
L51 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("active weapon: %s (#%s) parent: %s", switch_info.weapon_section, switch_info.weapon_id, switch_info.parent_section)
L68 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("there are %s scopes for %s", table.getn(valid_scopes), switch_info.weapon_section)
L85 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("attaching %s...", scope_name)
L88 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("scope %s not found in inventory.", scope_name)
L131 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("removing %s from %s.", scope, parent_section)
L169 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("Cycle requested from %s", switch_info.current_scope)
L181 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("restoring weapon.")
L193 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("no reset required.")
L197 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("new weapon: %s (#%s)", weapon:section(), weapon:id())
L202 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[1.5.2] resetting firing mode to: #%s (%s)", switch_info.saved_fire_mode.value, switch_info.saved_fire_mode.name)
L210 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[1.5.1] resetting queue size to: %s (%s)", new_queue_size, switch_info.saved_queue_size)
L246 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("weapon has native scope: %s (%s)", native_scope, (is_attached and "attached" or "detached"))
L265 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("HUD turned off, defaulting to fire mode.")
L269 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("saved fire mode #%s (%s) queue size: %s", info.saved_fire_mode.value, info.saved_fire_mode.name, info.saved_queue_size)
L309 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("preferred scope is %s (%s)", preferred_scope, idx)
L326 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("grabbed new weapon: %s", switch_info.new_weapon_id)
L330 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("re-equipping secondary weapon.")
L344 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("processing %s weapon.", (is_secondary and 'secondary' or 'primary'))
L350 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("something already attached: %s", weapon_section) -- original [item_weapon.attach_scope] function will ignore this case and prevent changing scopes unless we do something about it.
L358 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("looking up weapon %s...", new_weapon_section)
L368 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("spawning detached scope in inventory: %s", current_scope)
L372 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("spawning weapon variant with the new attachment: %s", new_weapon_section)
L375 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("releasing attached scope into the void: %s (#%s)", item_section, item:id())
L393 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("detaching from %s weapon.", (is_secondary and 'secondary' or 'primary'))
L86 🟡 potential_nil_access
Potential nil access: 'the_scope' from :object() used without nil check
Impact: low
Show code
switch_info.scope_id = the_scope:id()
L402 🟡 potential_nil_access
Potential nil access: 'secondary_weapon' from :item_in_slot() used without nil check
Impact: low
Show code
local retval = secondary_weapon and weapon:id() == secondary_weapon:id()
L373 🟡 unused_local_variable
Local variable 'new_weapon' is assigned but never used
Impact: low
Show code
local new_weapon = alife_clone_weapon(old_weapon, new_weapon_section)

128- Guide Tasks Fix - RavenAscendant

1 file (🟢1 🟡3 🔴2 🔵3)

tasks_guide.script

L286 🟢 uncached_globals_summary
Cache 1 globals in prepare_follower
Impact: medium
Show code
L333: math.random L343: math.random
L138 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log('! Çàâèñàíèå öèêëà, âûïîëíåí = '..cycle_id..' ðàç!')
L522 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("RAX WTF timer over write!")
L543 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Timer %s, at %s | gametime at %s", value['name'], value['delay'],time)
L491 🔴 global_write
Global write: action
Impact: low
Show code
then action=""
L511 🔴 global_write
Global write: action
Impact: low
Show code
action=""
L312 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
if (level_name == sim:level_name(gg:vertex(v.m_game_vertex_id):level_id())) and (simulation_objects.available_by_id[v.id] == true) then
L374 🟡 potential_nil_access
Potential nil access: 'npc' from level.object_by_id() used without nil check
Impact: low
Show code
local str = string.format(game.translate_string('st_jg_15'), curr_guid.neustoika, npc and npc:character_name() or '')
L315 🟡 unused_local_variable
Local variable 'count' is assigned but never used
Impact: low
Show code
local count = 0

129- Mask Reflections - shader fix - Grokitach

2 files (🟢1 🟡8 🔴15 🔵0)

grok_masks_reflections.script

L12 🔴 global_write
Global write: cam_dist
Impact: low
Show code
cam_dist = 0
L81 🔴 global_write
Global write: helm_off
Impact: low
Show code
helm_off = false
L82 🔴 global_write
Global write: original_switch_helm
Impact: low
Show code
original_switch_helm = actor_effects.switch_helm
L84 🔴 global_write
Global write: helm_off
Impact: low
Show code
helm_off = not helm_off
L93 🔴 global_write
Global write: h1
Impact: low
Show code
h1,h2,h3,h4 = unpack(str_explode(h,","))
L93 🔴 global_write
Global write: h2
Impact: low
Show code
h1,h2,h3,h4 = unpack(str_explode(h,","))
L93 🔴 global_write
Global write: h3
Impact: low
Show code
h1,h2,h3,h4 = unpack(str_explode(h,","))
L93 🔴 global_write
Global write: h4
Impact: low
Show code
h1,h2,h3,h4 = unpack(str_explode(h,","))
L94 🔴 global_write
Global write: actor
Impact: low
Show code
actor = db.actor
L99 🔴 global_write
Global write: helm_hud_pre
Impact: low
Show code
helm_hud_pre = STATIC_MASK and opt.helmets[sec] and opt.helmets[sec].hud or "hud_gas" --This is odd, hud_gass is in the actor_effects.ltx but not hud_gas effectively making this a nil index but it looks like a typo.
L101 🔴 global_write
Global write: h3
Impact: low
Show code
h3 = opt.enable_visor_reflection and opt.helmets_reflect[helm_hud_pre] and "1.0" or "0.0"
L96 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local helmet = actor:alive() and (actor:item_in_slot(12) or actor:get_current_outfit()) --reimplement the logic leading up to setting h3 from actor_effects.Update_Mask but only that which is necessary for setting h3
L96 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local helmet = actor:alive() and (actor:item_in_slot(12) or actor:get_current_outfit()) --reimplement the logic leading up to setting h3 from actor_effects.Update_Mask but only that which is necessary for setting h3
L96 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local helmet = actor:alive() and (actor:item_in_slot(12) or actor:get_current_outfit()) --reimplement the logic leading up to setting h3 from actor_effects.Update_Mask but only that which is necessary for setting h3
L16 🟡 unused_local_variable
Local variable 'IS_R1' is assigned but never used
Impact: low
Show code
local IS_R1 = (RENDERER == STATIC_LIGHT)
L17 🟡 unused_local_variable
Local variable 'STATIC_VINGETTE' is assigned but never used
Impact: low
Show code
local STATIC_VINGETTE = false -- for +R2 - if true, it will draw vingette instead of relying on r2_mask_control
L19 🟡 unused_local_variable
Local variable 'helm_r1_vingette' is assigned but never used
Impact: low
Show code
local helm_r1_vingette = "hud_vingette"
L60 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_eff:r_line_ex("settings_helm_reflection",i,"","")

grok_navs_masks_enabler.script

L25 🟢 uncached_globals_summary
Cache 1 globals in init_settings
Impact: medium
Show code
L37: tonumber L59: tonumber
L12 🔴 global_write
Global write: cam_dist
Impact: low
Show code
cam_dist = 0
L127 🔴 global_write
Global write: origional_HUD_mask
Impact: low
Show code
origional_HUD_mask = actor_effects.HUD_mask -- save a copy of the origional function so we can call it at the end of our version.
L134 🔴 global_write
Global write: curr_hud
Impact: low
Show code
curr_hud = actor_effects.is_mask_on() -- this gets curr_hud from actor_effects.script, you would think this function would return a bool, but instead it returns nil or a string, functions the same in lua and i will not question gifts when i find them.
L136 🔴 global_write
Global write: cam_dist
Impact: low
Show code
cam_dist = db.actor:bone_position("bip01_head"):distance_to_sqr(device().cam_pos) -- actor_effects does this in on_actor_update, i'm just going to do it when i need it.
L100 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_eff:r_line_ex("settings_helm_con",i,"","")

131- Life granter Counter - ToothlessShark

1 file (🟢5 🟡6 🔴0 🔵2)

ui_pda_encyclopedia_tab.script

L321 🟢 table_insert_append
table.insert(categories[i].articles, v) -> categories[i].articles[#categories[i].articles+1] = v
Impact: high
Show code
table.insert(categories[i].articles, section)
L353 🟢 table_insert_append
table.insert(interactivity[match_key][section], v) -> interactivity[match_key][section][#interactivity[match_key][section]+1] = v
Impact: high
Show code
table.insert(interactivity[match_key][section], values[j])
L878 🟢 uncached_globals_summary
Cache 3 globals in UpdateDescr
Impact: medium
Show code
L911: math.floor L912: math.floor L917: tostring L918: tostring L931: string.find L963: string.find
L376 🟢 repeated_obj_section()
obj:section() called 3x in detect_intereaction
Impact: low
Show code
Cache obj:section() result
L442 🟢 repeated_obj_section()
obj:section() called 3x in actor_on_feeling_anomaly
Impact: low
Show code
Cache obj:section() result
L957 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str = str .. "\\n " .. utils_xml.get_color("ui_gray_1") .. "• " .. game.translate_string(gr.name) .. ": " .. clr .. tostring(value)
L983 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str = str .. "\\n \\n" .. utils_xml.get_color("pda_white") .. ui_item.get_sec_name(id) .. ":"
L324 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
else printf("Encyclopedia category \"" .. categories[i].section .. "\" does not exist.") end
L332 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Encyclopedia interactivity section \"" .. plugin_section .. "\" does not exist.")
L349 🟡 unused_local_variable
Local variable 'junk1' is assigned but never used
Impact: low
Show code
local junk1, section, value = ini_ecy2:r_line(match_section, i, "", "")
L309 🟡 unused_local_variable
Local variable 'junk2' is assigned but never used
Impact: low
Show code
local junk1, section, junk2 = ini_ecy:r_line(plugin_section, i, "", "")
L884 🟡 unused_local_variable
Local variable 'con' is assigned but never used
Impact: low
Show code
local con = obj:condition()
L986 🟡 unused_local_variable
Local variable 'tool' is assigned but never used
Impact: low
Show code
local tool = tonumber(t[1]) or 1

132- Companion anti awol - Skieppy

2 files (🟢1 🟡0 🔴3 🔵0)

companion_anti_awol.script

L28 🟢 repeated_obj_id()
obj:id() called 9x in companion_retreat_eval
Impact: low
Show code
Cache obj:id() result
L88 🔴 global_write
Global write: companion_retreat
Impact: low
Show code
companion_retreat = nil
L89 🔴 global_write
Global write: companion_retreat
Impact: low
Show code
companion_retreat = {}

companion_anti_awol_mcm.script

L2 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "companion_anti_awol",sh=true ,gr={

133- No more companions friendly fire - RavenAscendant

1 file (🟢0 🟡0 🔴5 🔵0)

nomorefreindlyfire_mcm.script

L3 🔴 global_write
Global write: NPCprotect
Impact: low
Show code
NPCprotect = true --Give options a default value.
L4 🔴 global_write
Global write: ACProtect
Impact: low
Show code
ACProtect = true
L44 🔴 global_write
Global write: NPCprotect
Impact: low
Show code
NPCprotect = ui_mcm.get("nomorefriendlyfire/npcprotect")
L45 🔴 global_write
Global write: ACprotect
Impact: low
Show code
ACprotect = ui_mcm.get("nomorefriendlyfire/acprotect")
L50 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "nomorefriendlyfire" ,sh=true ,gr={

134- Weapons Drop on bodies - Jabbers

1 file (🟢0 🟡1 🔴1 🔵0)

keep_guns_on_bodies.script

L17 🔴 global_write
Global write: old_keep_item
Impact: low
Show code
old_keep_item = death_manager.keep_item
L11 🟡 potential_nil_access
Potential nil access: 'active_item' from :active_item() used without nil check
Impact: low
Show code
if active_item ~= nil and active_item:id() == item_id then

137- Auto-Zoomed Out Scope Draw - Demonized

1 file (🟢0 🟡0 🔴5 🔵0)

zoomed_out_scope_draw.script

L3 🔴 global_write
Global write: current_obj
Impact: low
Show code
current_obj = nil
L4 🔴 global_write
Global write: saved_magnifications
Impact: low
Show code
saved_magnifications = {}
L18 🔴 global_write
Global write: current_obj
Impact: low
Show code
current_obj = obj
L24 🔴 global_write
Global write: current_obj
Impact: low
Show code
current_obj = nil
L85 🔴 global_write
Global write: saved_magnifications
Impact: low
Show code
saved_magnifications = m_data.zoomed_out_scope_draw_saved_magnifications or {}

139- Craft and Repair Overhaul - Grokitach

1 file (🟢1 🟡0 🔴0 🔵0)

workshop_tool.script

L76 🟢 repeated_obj_section()
obj:section() called 5x in tool_workshop
Impact: low
Show code
Cache obj:section() result

14- Angry Chimera growl - Tweaki_Breeki

2 files (🟢2 🟡2 🔴4 🔵0)

TB_Angry_Chimera_Growls.script

L61 🟢 table_insert_append
table.insert(tb_chimeras, v) -> tb_chimeras[#tb_chimeras+1] = v
Impact: high
Show code
table.insert(tb_chimeras,{i,se_obj})
L21 🔴 global_write
Global write: tb_chimeras
Impact: low
Show code
tb_chimeras = {}
L54 🔴 global_write
Global write: tb_chimeras
Impact: low
Show code
tb_chimeras = {}
L19 🟡 unused_local_variable
Local variable 'lastchim' is assigned but never used
Impact: low
Show code
local lastchim = 0

TB_Angry_Lurker_Growls.script

L61 🟢 table_insert_append
table.insert(tb_lurkers, v) -> tb_lurkers[#tb_lurkers+1] = v
Impact: high
Show code
table.insert(tb_lurkers,{i,se_obj})
L21 🔴 global_write
Global write: tb_lurkers
Impact: low
Show code
tb_lurkers = {}
L54 🔴 global_write
Global write: tb_lurkers
Impact: low
Show code
tb_lurkers = {}
L19 🟡 unused_local_variable
Local variable 'lastlurk' is assigned but never used
Impact: low
Show code
local lastlurk = 0

140- Weapon Parts Overhaul - arti

7 files (🟢29 🟡31 🔴34 🔵9)

a_arti_jamming_mcm.script

L24 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "wpo",sh=true ,gr={

a_wpo_parts.script

L25 🟢 repeated_obj_section()
obj:section() called 3x in utils_item.get_item_trade_status
Impact: low
Show code
Cache obj:section() result
L28 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Checking parts for %s", obj:section())
L33 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("weapon %s has busted part %s", obj:section(), k)
L3 🔴 global_write
Global write: GetCost
Impact: low
Show code
GetCost = utils_item.get_item_cost
L18 🔴 global_write
Global write: GetStatus
Impact: low
Show code
GetStatus = utils_item.get_item_trade_status
L43 🟡 unused_local_variable
Local variable 'part_section' is assigned but never used
Impact: low
Show code
local part_section = utils_data.collect_section(prices, "wpo_part_prices")
L47 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, sec, value = prices:r_line("wpo_part_prices" , i , "", "")

arti_jamming.script

L210 🟢 repeated_gun_id()
gun:id() called 3x in actor_on_update
Impact: low
Show code
Cache gun:id() result
L217 🟢 repeated_gun_section()
gun:section() called 5x in actor_on_update
Impact: low
Show code
Cache gun:section() result
L595 🟢 repeated_wpn_obj_id()
wpn_obj:id() called 2x in actor_on_weapon_fired
Impact: low
Show code
Cache wpn_obj:id() result
L48 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("arti_jamming | %s | " .. txt, time_global(), ...)
L338 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(jc_ratio)
L340 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(jc)
L2 🔴 global_write
Global write: gc
Impact: low
Show code
gc = game.translate_string
L3 🔴 global_write
Global write: math_random
Impact: low
Show code
math_random = math.random
L4 🔴 global_write
Global write: math_floor
Impact: low
Show code
math_floor = math.floor
L36 🔴 global_write
Global write: get_config
Impact: low
Show code
get_config = a_arti_jamming_mcm.get_config
L38 🔴 global_write
Global write: d_flag
Impact: low
Show code
d_flag = false
L825 🔴 global_write
Global write: d_flag
Impact: low
Show code
d_flag = false
L831 🔴 global_write
Global write: d_flag
Impact: low
Show code
d_flag = true
L210 🟡 potential_nil_access
Potential nil access: 'gun' from :active_item() used without nil check
Impact: low
Show code
if gun and gun:id() ~= cgd.id then
L485 🟡 potential_nil_access
Potential nil access: 'obj_wpn' from :active_item() used without nil check
Impact: low
Show code
local id = obj_wpn and obj_wpn:id() or 0
L758 🟡 potential_nil_access
Potential nil access: 'item' from :item_in_slot() used without nil check
Impact: low
Show code
local item_id = item and item:id() or 0
L842 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
jammed_guns[wpn:id()] = 4
L843 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
print_dbg("Logged id %s, sec %s", wpn:id(), wpn:section())
L843 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
print_dbg("Logged id %s, sec %s", wpn:id(), wpn:section())
L518 🟢 dead_code_if_false
Dead code: if false (lines 518-524)
Impact: low
Show code
if false then--math.random(100) < misfire_chance / 3 then
L23 🟡 unused_local_variable
Local variable 'DAMAGE_THRESHOLD' is assigned but never used
Impact: low
Show code
local DAMAGE_THRESHOLD = 86
L32 🟡 unused_local_variable
Local variable 'SALE_PART_MIN' is assigned but never used
Impact: low
Show code
local SALE_PART_MIN = 51
L407 🟡 unused_local_variable
Local variable 'heat_per_shot' is assigned but never used
Impact: low
Show code
local heat_per_shot = 10
L795 🟡 unused_local_variable
Local variable 'new_weapon' is assigned but never used
Impact: low
Show code
local new_weapon = alife_clone_weapon(old_weapon)
L956 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, sec, value = ini_overheat:r_line("custom_overheat" , i , "", "")

game_diff_override.script

L1 🔴 global_write
Global write: GetEcoFactor
Impact: low
Show code
GetEcoFactor = game_difficulties.get_eco_factor

inventory_upgrades_mp.script

L4 🔴 global_write
Global write: ini_parts
Impact: low
Show code
ini_parts = itms_manager.ini_parts
L14 🟡 unused_local_variable
Local variable 'class' is assigned but never used
Impact: low
Show code
local class = ini_sys:r_string_ex(item_name, "class")

wpo_loot.script

L3 🔴 global_write
Global write: print_dbg
Impact: low
Show code
print_dbg = arti_jamming.print_dbg
L4 🔴 global_write
Global write: has_parts
Impact: low
Show code
has_parts = arti_jamming.has_parts
L6 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update
L18 🟡 unused_local_variable
Local variable 'se_itm' is assigned but never used
Impact: low
Show code
local se_itm = alife_object(item:id())
L49 🟡 unused_local_variable
Local variable 'part_section' is assigned but never used
Impact: low
Show code
local part_section = utils_data.collect_section(prices, "wpo_part_prices")
L53 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, sec, value = prices:r_line("wpo_part_prices" , i , "", "")
L53 🟡 unused_local_variable
Local variable 'value' is assigned but never used
Impact: low
Show code
local result, sec, value = prices:r_line("wpo_part_prices" , i , "", "")

zzzz_arti_jamming_repairs.script

L256 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details, with_scope:sub(2))
L262 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details, scope)
L266 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details, sil)
L270 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details, gl)
L290 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details,spare_parts[i])
L301 🟢 table_insert_append
table.insert(upgr_tools, v) -> upgr_tools[#upgr_tools+1] = v
Impact: high
Show code
table.insert(upgr_tools,tool)
L306 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details,upgr_tools[i])
L692 🟢 table_insert_append
table.insert(context_str, v) -> context_str[#context_str+1] = v
Impact: high
Show code
table.insert(context_str, replace_name(k, false))
L693 🟢 table_insert_append
table.insert(context_action, v) -> context_action[#context_action+1] = v
Impact: high
Show code
table.insert(context_action, "replace_part")
L694 🟢 table_insert_append
table.insert(context_params, v) -> context_params[#context_params+1] = v
Impact: high
Show code
table.insert(context_params, {obj:id(), k, repair_kit:section(), false})
L697 🟢 table_insert_append
table.insert(context_str, v) -> context_str[#context_str+1] = v
Impact: high
Show code
table.insert(context_str, replace_name(k, true))
L698 🟢 table_insert_append
table.insert(context_action, v) -> context_action[#context_action+1] = v
Impact: high
Show code
table.insert(context_action, "clean_part")
L699 🟢 table_insert_append
table.insert(context_params, v) -> context_params[#context_params+1] = v
Impact: high
Show code
table.insert(context_params, {obj:id(), k, clean_kit:section(), true})
L701 🟢 table_insert_append
table.insert(context_str, v) -> context_str[#context_str+1] = v
Impact: high
Show code
table.insert(context_str, replace_name(k, true))
L702 🟢 table_insert_append
table.insert(context_action, v) -> context_action[#context_action+1] = v
Impact: high
Show code
table.insert(context_action, "replace_part")
L703 🟢 table_insert_append
table.insert(context_params, v) -> context_params[#context_params+1] = v
Impact: high
Show code
table.insert(context_params, {obj:id(), k, repair_kit:section(), true})
L765 🟢 table_insert_append
table.insert(context_str, v) -> context_str[#context_str+1] = v
Impact: high
Show code
table.insert(context_str, remove_name(k))
L766 🟢 table_insert_append
table.insert(context_action, v) -> context_action[#context_action+1] = v
Impact: high
Show code
table.insert(context_action, "remove_part")
L767 🟢 table_insert_append
table.insert(context_params, v) -> context_params[#context_params+1] = v
Impact: high
Show code
table.insert(context_params, {obj:id(), k, v})
L773 🟢 table_insert_append
table.insert(context_str, v) -> context_str[#context_str+1] = v
Impact: high
Show code
table.insert(context_str, remove_name(nil))
L774 🟢 table_insert_append
table.insert(context_action, v) -> context_action[#context_action+1] = v
Impact: high
Show code
table.insert(context_action, "remove_part")
L775 🟢 table_insert_append
table.insert(context_params, v) -> context_params[#context_params+1] = v
Impact: high
Show code
table.insert(context_params, {obj:id(), k, v})
L55 🟢 uncached_globals_summary
Cache 1 globals in weapon_eval_parts
Impact: medium
Show code
L70: math.random L71: math.random
L694 🟢 repeated_obj_id()
obj:id() called 3x in init_maintenance_menu
Impact: low
Show code
Cache obj:id() result
L576 🟡 string_concat_in_loop
String concat in loop: display_str = display_str .. x
Impact: critical
Show code
display_str = display_str .. process_part(k, v)
L804 🟡 string_concat_in_loop
String concat in loop: str_msg = str_msg .. x
Impact: critical
Show code
str_msg = str_msg .. "\\n -" .. ui_item.get_sec_name(k)
L192 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ item_parts timer | no owner found")
L242 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ item_parts | no owner found for [%s]", obj:name())
L450 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR UIWorkshopRepair:Repair() | can't discharge toolkit with id (%s). Object not found!", self.toolkit_pick[i])
L468 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopRepair:Repair() | object with id (%s) is either not found. Or didn't register new condition (%s)!", id, final_con)
L7 🔴 global_write
Global write: gc
Impact: low
Show code
gc = game.translate_string
L8 🔴 global_write
Global write: has_parts
Impact: low
Show code
has_parts = arti_jamming.has_parts
L9 🔴 global_write
Global write: is_part
Impact: low
Show code
is_part = arti_jamming.is_part
L10 🔴 global_write
Global write: print_dbg
Impact: low
Show code
print_dbg = arti_jamming.print_dbg
L11 🔴 global_write
Global write: print_ws
Impact: low
Show code
print_ws = ui_workshop.print_ws
L12 🔴 global_write
Global write: get_config
Impact: low
Show code
get_config = a_arti_jamming_mcm.get_config
L13 🔴 global_write
Global write: math_floor
Impact: low
Show code
math_floor = math.floor
L14 🔴 global_write
Global write: current_id
Impact: low
Show code
current_id = arti_jamming.current_id
L15 🔴 global_write
Global write: reset_cgd
Impact: low
Show code
reset_cgd = arti_jamming.reset_cgd
L16 🔴 global_write
Global write: SetTip
Impact: low
Show code
SetTip = ui_workshop.SetTip
L82 🔴 global_write
Global write: EvaluateParts
Impact: low
Show code
EvaluateParts = item_parts.evaluate_parts
L220 🔴 global_write
Global write: DisassemblyWeapon
Impact: low
Show code
DisassemblyWeapon = item_parts.disassembly_weapon
L330 🔴 global_write
Global write: WorkshopReplacePart
Impact: low
Show code
WorkshopReplacePart = ui_workshop.UIWorkshopRepair.ReplacePart
L398 🔴 global_write
Global write: WorkshopRepair
Impact: low
Show code
WorkshopRepair = ui_workshop.UIWorkshopRepair.Repair
L494 🔴 global_write
Global write: HowMuch
Impact: low
Show code
HowMuch = inventory_upgrades_mp.how_much_repair
L505 🔴 global_write
Global write: quality_map
Impact: low
Show code
quality_map = {
L512 🔴 global_write
Global write: unique_mapping
Impact: low
Show code
unique_mapping = {
L523 🔴 global_write
Global write: name_mapping
Impact: low
Show code
name_mapping = {
L567 🔴 global_write
Global write: original_build_desc_header
Impact: low
Show code
original_build_desc_header = ui_item.build_desc_header
L326 🟡 potential_nil_access
Potential nil access: 'npc' from :parent() used without nil check
Impact: low
Show code
CreateTimeEvent(0,"delay_disassembly" .. id, delay, timer_disassembly_weapon, npc:id(), result_details, result_conditions, name)
L659 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check (auto-fixable)
Impact: low
Show code
wpn:set_condition( clamp(wpn:condition() + 0.1, 0, 0.999) )
L659 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check (auto-fixable)
Impact: low
Show code
wpn:set_condition( clamp(wpn:condition() + 0.1, 0, 0.999) )
L794 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
wpn:force_unload_magazine(true)
L6 🟡 unused_local_variable
Local variable 'parts_info' is assigned but never used
Impact: low
Show code
local parts_info = {}
L88 🟡 unused_local_variable
Local variable 'm_con' is assigned but never used
Impact: low
Show code
local m_con = math.ceil(obj:condition() * 100) -- default condition of the item
L117 🟡 unused_local_variable
Local variable 'temp_con' is assigned but never used
Impact: low
Show code
local temp_con = {}
L248 🟡 unused_local_variable
Local variable 'get_ammo' is assigned but never used
Impact: low
Show code
local get_ammo = {}
L411 🟡 unused_local_variable
Local variable 'sim' is assigned but never used
Impact: low
Show code
local sim = alife()
L498 🟡 unused_local_variable
Local variable 'class' is assigned but never used
Impact: low
Show code
local class = ini_sys:r_string_ex(item_name, "class")
L533 🟡 unused_local_variable
Local variable 'math_ceil' is assigned but never used
Impact: low
Show code
local math_ceil = math.ceil

141- Fixed Crafting with Multi-Use Items - thisisntmysteamid

1 file (🟢1 🟡1 🔴2 🔵0)

zzz_timsi_ui_workshop.script

L4 🟢 uncached_globals_summary
Cache 2 globals in UpdateItem
Impact: medium
Show code
L41: pairs L49: pairs L66: tostring L66: tostring
L1 🔴 global_write
Global write: UpdateItem
Impact: low
Show code
UpdateItem = ui_workshop.UIWorkshopCraft.UpdateItem
L2 🔴 global_write
Global write: SetTip
Impact: low
Show code
SetTip = ui_workshop.SetTip
L16 🟡 unused_local_variable
Local variable 'counter' is assigned but never used
Impact: low
Show code
local counter = 0

143- Keep Crafting Window Opened - Demonized

2 files (🟢1 🟡2 🔴0 🔵11)

demonized_time_events.script

L23 🟢 uncached_globals_summary
Cache 1 globals in print_table
Impact: medium
Show code
L32: type L34: type
L35 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = function",k)
L38 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s",k,utils_data.vector_to_string(v))
L40 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = userdata", k)
L45 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = true",k)
L47 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = true")
L51 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = false", k)
L53 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = false")
L58 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s", k,v)
L60 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = nil", k,v)
L199 🟡 unused_local_variable
Local variable 'tg_past' is assigned but never used
Impact: low
Show code
local tg_past = 0

zz_ui_workshop_keep_crafting_window_open.script

L171 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR UIWorkshopRepair:Repair() | can't discharge toolkit with id (%s). Object not found!", self.toolkit_pick[i])
L186 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopRepair:Repair() | object with id (%s) is either not found. Or didn't register new condition (%s)!", id, final_con)
L140 🟡 unused_local_variable
Local variable 'sim' is assigned but never used
Impact: low
Show code
local sim = alife()

144- Prefer Best Disassembly Tool - Demonized

1 file (🟢2 🟡0 🔴0 🔵1)

zz_item_parts_prefer_best_disassembly_tool.script

L15 🟢 table_insert_append
table.insert(keys, v) -> keys[#keys+1] = v
Impact: high
Show code
table.insert(keys, key)
L68 🟢 table_insert_append
table.insert(self._korder, v) -> self._korder[#self._korder+1] = v
Impact: high
Show code
table.insert( self._korder, k )
L85 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Prefer Best Disassembly Tool: Calling override GetItemList")

145- Ammo Maker - arti

1 file (🟢2 🟡5 🔴3 🔵2)

ammo_maker.script

L23 🟢 table_insert_append
table.insert(to_breakdown, v) -> to_breakdown[#to_breakdown+1] = v
Impact: high
Show code
table.insert(to_breakdown, item)
L41 🟢 uncached_globals_summary
Cache 1 globals in do_breakdown
Impact: medium
Show code
L65: math.random L81: math.random
L111 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str = str .. "\\n- " .. v .. " " .. ui_item.get_sec_name(k)
L14 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ breakdown | no owner found for [%s]", ammo:name())
L93 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ breakdown timer | no owner found")
L116 🔴 global_write
Global write: Disassemble
Impact: low
Show code
Disassemble = item_parts.disassembly_item
L160 🔴 global_write
Global write: NameCustom
Impact: low
Show code
NameCustom = ui_inventory.UIInventory.Name_Custom
L170 🔴 global_write
Global write: ActionCustom
Impact: low
Show code
ActionCustom = ui_inventory.UIInventory.Action_Custom
L37 🟡 potential_nil_access
Potential nil access: 'npc' from db.actor() used without nil check
Impact: low
Show code
CreateTimeEvent("ammo_maker","delay_disassembly" .. ammo:id(), delay, timer_disassembly_item, npc:id(), tbl, name)
L4 🟡 unused_local_variable
Local variable 'd_flag' is assigned but never used
Impact: low
Show code
local d_flag = false
L5 🟡 unused_local_variable
Local variable 'd_key' is assigned but never used
Impact: low
Show code
local d_key = "DIK_LSHIFT" -- Saftey key hold (Left Alt)
L187 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_ammo:r_line(ammo , i , "", "")

146- Ammo Maker BAS Patch - arti

1 file (🟢0 🟡1 🔴0 🔵1)

bas_adder.script

L7 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("assigning ammo %s recipe %s", id, value)
L6 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_bas_ammo:r_line(ammo , i , "", "")

147- Streamlined Upgrades - arti

4 files (🟢2 🟡8 🔴11 🔵1)

aaaa_monkeys.script

L88 🟢 uncached_globals_summary
Cache 1 globals in utils_item.extract_upgrade
Impact: medium
Show code
L96: pairs L142: pairs
L4 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("-utils_item | " .. fmt,...)
L12 🟡 unused_local_variable
Local variable 'string_match' is assigned but never used
Impact: low
Show code
local string_match = string.match
L13 🟡 unused_local_variable
Local variable 'string_sub' is assigned but never used
Impact: low
Show code
local string_sub = string.sub
L17 🟡 unused_local_variable
Local variable 'cache_upgr_tree' is assigned but never used
Impact: low
Show code
local cache_upgr_tree = {}
L18 🟡 unused_local_variable
Local variable 'cache_upgr_ins' is assigned but never used
Impact: low
Show code
local cache_upgr_ins = {}

aaaa_streamlined_mp.script

L83 🟢 uncached_globals_summary
Cache 1 globals in utils_item.extract_upgrade
Impact: medium
Show code
L91: pairs L137: pairs
L7 🟡 unused_local_variable
Local variable 'string_match' is assigned but never used
Impact: low
Show code
local string_match = string.match
L8 🟡 unused_local_variable
Local variable 'string_sub' is assigned but never used
Impact: low
Show code
local string_sub = string.sub
L12 🟡 unused_local_variable
Local variable 'cache_upgr_tree' is assigned but never used
Impact: low
Show code
local cache_upgr_tree = {}
L13 🟡 unused_local_variable
Local variable 'cache_upgr_ins' is assigned but never used
Impact: low
Show code
local cache_upgr_ins = {}

kit_binder.script

L3 🔴 global_write
Global write: gc
Impact: low
Show code
gc = game.translate_string
L4 🔴 global_write
Global write: enable_debug
Impact: low
Show code
enable_debug = false
L36 🔴 global_write
Global write: se_itm
Impact: low
Show code
se_itm = alife_create(new_sec, pos, lvid, gvid, pid)
L38 🔴 global_write
Global write: se_itm
Impact: low
Show code
se_itm = alife_create(new_sec, pos, lvid, gvid)
L127 🔴 global_write
Global write: result
Impact: low
Show code
result, id, value = ini_mapping:r_line_ex("upgrade_mapping",i,"","")
L127 🔴 global_write
Global write: id
Impact: low
Show code
result, id, value = ini_mapping:r_line_ex("upgrade_mapping",i,"","")
L127 🔴 global_write
Global write: value
Impact: low
Show code
result, id, value = ini_mapping:r_line_ex("upgrade_mapping",i,"","")
L137 🔴 global_write
Global write: result
Impact: low
Show code
result, id, value = ini_recipe:r_line_ex("to_add",i,"","")
L137 🔴 global_write
Global write: id
Impact: low
Show code
result, id, value = ini_recipe:r_line_ex("to_add",i,"","")
L137 🔴 global_write
Global write: value
Impact: low
Show code
result, id, value = ini_recipe:r_line_ex("to_add",i,"","")

upgrades_mcm.script

L11 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "supgrades",sh=true ,gr={

148- Outfit Drop Chance - arti

1 file (🟢0 🟡0 🔴4 🔵1)

outfit_drop_mcm.script

L35 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( " %s | "..text ,time_global(), ...)
L14 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "outfitdrop",sh=true ,gr={
L77 🔴 global_write
Global write: ValidateDrop
Impact: low
Show code
ValidateDrop = death_manager.validate_drop
L98 🔴 global_write
Global write: ind
Impact: low
Show code
ind = 1
L109 🔴 global_write
Global write: ind
Impact: low
Show code
ind = ind + 1

149- Upgrades pricing overhaul - KronQ

4 files (🟢0 🟡4 🔴18 🔵0)

inventory_upgrades_mp.script

L4 🔴 global_write
Global write: ini_parts
Impact: low
Show code
ini_parts = itms_manager.ini_parts
L83 🔴 global_write
Global write: OnRepair
Impact: low
Show code
OnRepair = ui_inventory.UIInventory.RMode_OnRepair
L99 🔴 global_write
Global write: RepairYes
Impact: low
Show code
RepairYes = ui_inventory.UIInventory.RMode_RepairYes
L14 🟡 unused_local_variable
Local variable 'class' is assigned but never used
Impact: low
Show code
local class = ini_sys:r_string_ex(item_name, "class")

smooth_prog_mcm.script

L2 🔴 global_write
Global write: tier_disc
Impact: low
Show code
tier_disc ={
L8 🔴 global_write
Global write: weapon_upgr_mult
Impact: low
Show code
weapon_upgr_mult = 0.5
L9 🔴 global_write
Global write: outfit_upgr_mult
Impact: low
Show code
outfit_upgr_mult = 1
L11 🔴 global_write
Global write: wpn_disc_apply
Impact: low
Show code
wpn_disc_apply = false
L21 🔴 global_write
Global write: CanRepair
Impact: low
Show code
CanRepair = inventory_upgrades.can_repair_item
L25 🔴 global_write
Global write: wpn_disc_apply
Impact: low
Show code
wpn_disc_apply = obj and IsWeapon(obj) or false
L42 🔴 global_write
Global write: op
Impact: low
Show code
op = { id = "smooth_prog", sh=true, gr={

upgrade_rank_pricing.script

L15 🔴 global_write
Global write: outfit_type_upgrade
Impact: low
Show code
outfit_type_upgrade = {
L80 🔴 global_write
Global write: rank
Impact: low
Show code
rank = section:sub(14,14)
L167 🔴 global_write
Global write: rank
Impact: low
Show code
rank = section:sub(14,14)
L187 🔴 global_write
Global write: rank
Impact: low
Show code
rank = section:sub(14,14)
L223 🔴 global_write
Global write: cur_hint
Impact: low
Show code
cur_hint = nil
L255 🔴 global_write
Global write: rank
Impact: low
Show code
rank = section:sub(14,14)
L3 🟡 unused_local_variable
Local variable 'eco_ini' is assigned but never used
Impact: low
Show code
local eco_ini = ini_file("plugins\\difficulty.ltx")
L26 🟡 unused_local_variable
Local variable 'upgr_tier_con' is assigned but never used
Impact: low
Show code
local upgr_tier_con = {
L39 🟡 unused_local_variable
Local variable 'property_table' is assigned but never used
Impact: low
Show code
local property_table = {

zzzzzzz_repair_modifiers.script

L2 🔴 global_write
Global write: outfit_type_repair
Impact: low
Show code
outfit_type_repair = {
L22 🔴 global_write
Global write: HowMuch
Impact: low
Show code
HowMuch = inventory_upgrades_mp.how_much_repair

15- Voiced Actor - DesmanMetzger

4 files (🟢11 🟡31 🔴33 🔵31)

AGDD_voiced_actor.script

L177 🟢 uncached_globals_summary
Cache 1 globals in monster_on_death_callback
Impact: medium
Show code
L189: math.random L191: math.random
L200 🟢 uncached_globals_summary
Cache 1 globals in npc_on_death_callback
Impact: medium
Show code
L212: math.random L214: math.random
L248 🟢 uncached_globals_summary
Cache 1 globals in actor_on_update
Impact: medium
Show code
L295: math.random L298: math.random
L325 🟢 uncached_globals_summary
Cache 1 globals in actor_on_before_hit
Impact: medium
Show code
L339: math.random L341: math.random
L405 🟢 uncached_globals_summary
Cache 1 globals in on_key_release
Impact: medium
Show code
L417: string.find L417: string.find
L142 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("sound volume: " .. sound_volume) --prints out the volume of the sound to the console log, debug purposes
L148 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("actor sound played: " .. file) --prints out played files to the console log, debug purposes
L61 🔴 global_write
Global write: muffle
Impact: low
Show code
muffle = "" -- initiates muffling condition
L66 🔴 global_write
Global write: muffle
Impact: low
Show code
muffle = "m_"
L68 🔴 global_write
Global write: muffle
Impact: low
Show code
muffle = ""
L89 🔴 global_write
Global write: combat_inertia
Impact: low
Show code
combat_inertia = 1
L95 🔴 global_write
Global write: combat_inertia
Impact: low
Show code
combat_inertia = time_global() + 10000 --sets the delay of ten seconds to ensure that combat status doesn't drop in case enemies stop targeting the actor for a short time
L157 🔴 global_write
Global write: combat_intensity
Impact: low
Show code
combat_intensity = 0 --main value that drives the combat status system
L158 🔴 global_write
Global write: combat_intensity_drain_cooldown
Impact: low
Show code
combat_intensity_drain_cooldown = 0 --auxilary value, prevents combat progression from draining constantly, instead it only drains after nothing combat-related happens for some time
L159 🔴 global_write
Global write: combat_medium_threshold
Impact: low
Show code
combat_medium_threshold = 500 --the threshold at which combat status switches to it's second phase
L160 🔴 global_write
Global write: combat_high_threshold
Impact: low
Show code
combat_high_threshold = 1500 --the threshold at which combat status switches to it's final third phase (combat_intensity value doesn't stop there and can progress even further, but that won't have any changes)
L171 🔴 global_write
Global write: combat_intensity
Impact: low
Show code
combat_intensity = combat_intensity + intensity --adds it
L173 🔴 global_write
Global write: combat_intensity_drain_cooldown
Impact: low
Show code
combat_intensity_drain_cooldown = combat_intensity_drain_cooldown + cooldown --adds the cooldown even if we didn't add intensity
L179 🔴 global_write
Global write: combat_intensity
Impact: low
Show code
combat_intensity = 1
L202 🔴 global_write
Global write: combat_intensity
Impact: low
Show code
combat_intensity = 1
L260 🔴 global_write
Global write: combat_intensity
Impact: low
Show code
combat_intensity = combat_intensity - 1
L263 🔴 global_write
Global write: combat_intensity_drain_cooldown
Impact: low
Show code
combat_intensity_drain_cooldown = combat_intensity_drain_cooldown - 2
L266 🔴 global_write
Global write: combat_intensity
Impact: low
Show code
combat_intensity = clamp(combat_intensity,0,combat_high_threshold * 2) --keeps combat intensity value in bounds, it shouldn't go into negatives nor overshoot the max cap
L267 🔴 global_write
Global write: combat_intensity_drain_cooldown
Impact: low
Show code
combat_intensity_drain_cooldown = clamp(combat_intensity_drain_cooldown,0,1000) --same thing but for the cooldown
L111 🟡 unused_local_variable
Local variable 'i' is assigned but never used
Impact: low
Show code
local i,v = next(axr_companions.companion_squads,nil) --gets squad info

arszi_psy.script

L280 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local c_outfit = outfit:cast_CustomOutfit()
L294 🟡 potential_nil_access
Potential nil access: 'helm' from :item_in_slot() used without nil check
Impact: low
Show code
local c_helm = helm:cast_Helmet()
L29 🟡 unused_local_variable
Local variable 'c_in_game_seconds_multiplier' is assigned but never used
Impact: low
Show code
local c_in_game_seconds_multiplier = 6 --6 in game seconds are one real life second

axr_companions.script

L1777 🟢 uncached_globals_summary
Cache 1 globals in PlayVoiceOver
Impact: medium
Show code
L1786: math.random L1788: math.random
L422 🟢 repeated_npc_id()
npc:id() called 3x in remove_from_actor_squad
Impact: low
Show code
Cache npc:id() result
L981 🟢 repeated_npc_id()
npc:id() called 3x in companion_remove_waypoints
Impact: low
Show code
Cache npc:id() result
L991 🟢 repeated_npc_id()
npc:id() called 3x in companion_add_waypoints
Impact: low
Show code
Cache npc:id() result
L1216 🟢 repeated_device
device called 4x in move_to_point
Impact: low
Show code
local dev = device()
L257 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! axr_companions | cleared old data: %s", "companion_"..c_idx)
L360 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("ERROR: do not have access to scripts\\beh_companion.ltx! Make sure you installed properly!")
L479 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Companions | Can't play the effect when it's being played aleady")
L496 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Companions | squad can't be added cause it doesn't exist?!")
L501 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Companions | squad (%s) is already companion squad", squad.id)
L526 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Companions | squad can't be dismissed cause it doesn't exist?!")
L531 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Companions | squad (%s) can't be dismissed cause it's not a companion squad", squad.id)
L545 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Companions | squad can't be released cause it doesn't exist?!")
L629 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR add_task_companion | can't find story squad [%s]", p[1])
L636 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR add_task_giver_companion | can't set up task giver as companion because task is not declared")
L643 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR add_task_giver_companion | task [%s] is not active", p[1])
L649 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR add_task_giver_companion | task giver id not found for task [%s]", p[1])
L656 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR add_task_giver_companion | can't find task giver object (%s) for task [%s]", id, p[1])
L665 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR add_task_giver_companion | can't set up task giver as companion because task is not declared")
L672 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR add_task_giver_companion | task [%s] is not active", p[1])
L678 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR add_task_giver_companion | task giver id not found for task [%s]", p[1])
L685 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR add_task_giver_companion | can't find task giver object (%s) for task [%s]", id, p[1])
L696 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR add_speaker_companion | actor is not talking")
L704 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR add_speaker_companion | speaker id not found for task [%s]", task_id)
L710 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR add_speaker_companion | can't find speaker object (%s) for task [%s]", id, task_id)
L720 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("- %s | saved companion id (%s)", task_id, id)
L738 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR dismiss_speaker_companion | speaker squad id not found for task [%s]", task_id)
L780 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! setup_companion_task: no smart found! %s", smart_id or smrt_name)
L785 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! setup_companion_task: Trying to setup companion squad with a non-existent section!")
L1266 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!ERROR axr_companions.get_inventory_table | no npc object recieved")
L1345 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe('ERROR axr_companions.trasnfer_item | no object recieved | item: %s - npc_from: %s - npc_to: %s', (item and true), (npc_from and true), (npc_to and true))
L1369 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('~ axr_companions.trasnfer_item | item [%s] is not assigned to companion [%s] | assigned companion: %s - assigned item: %s', item:name(), npc_from:name(), is_assigned_companion(npc_from), is_assigned_item(id_from,item_id))
L1405 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('! is_assigned_item: one or more arguments nil: %s %s',npc_id, item_id)
L1507 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('! is_assigned_companion: id is nil: %s %s',npc_id)
L26 🔴 global_write
Global write: allow_only_friends_as_companions
Impact: low
Show code
allow_only_friends_as_companions = true
L27 🔴 global_write
Global write: allow_simulation_squads_as_companions
Impact: low
Show code
allow_simulation_squads_as_companions = false
L28 🔴 global_write
Global write: max_actor_squad_size
Impact: low
Show code
max_actor_squad_size = 0 -- used only for non task companions
L31 🔴 global_write
Global write: companion_squads
Impact: low
Show code
companion_squads = {}
L32 🔴 global_write
Global write: non_task_companions
Impact: low
Show code
non_task_companions = {}
L154 🔴 global_write
Global write: non_task_companions
Impact: low
Show code
non_task_companions = m_data.non_task_companions or non_task_companions
L157 🔴 global_write
Global write: companion_squads
Impact: low
Show code
companion_squads = m_data.companion_squads or companion_squads
L174 🔴 global_write
Global write: st
Impact: low
Show code
st = db.storage[k.id]
L237 🔴 global_write
Global write: max_actor_squad_size
Impact: low
Show code
max_actor_squad_size = ini:r_float_ex("main","max_actor_squad_size_patriarch") or 4
L267 🔴 global_write
Global write: Enabled
Impact: low
Show code
Enabled = ini:r_bool_ex("main","enable",false)
L290 🔴 global_write
Global write: allow_only_friends_as_companions
Impact: low
Show code
allow_only_friends_as_companions = ini:r_bool_ex("main","allow_only_friends_as_companions",false)
L291 🔴 global_write
Global write: allow_simulation_squads_as_companions
Impact: low
Show code
allow_simulation_squads_as_companions = ini:r_bool_ex("main","allow_simulation_squads_as_companions",false)
L292 🔴 global_write
Global write: max_actor_squad_size
Impact: low
Show code
max_actor_squad_size = ini:r_float_ex("main","max_actor_squad_size") or 2
L1051 🔴 global_write
Global write: st
Impact: low
Show code
st = db.storage[k.id]
L1239 🔴 global_write
Global write: st
Impact: low
Show code
st = db.storage[k.id]
L1845 🔴 global_write
Global write: pass
Impact: low
Show code
pass = false
L123 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_actor = sim:actor()
L132 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local squad = sim:object(id)
L223 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
sim:teleport_object(k.id,gvid,lvid,pos)
L302 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(id)
L304 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if (se_load_var(se_obj.id,se_obj:name(),"companion_cannot_teleport")) then
L309 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
if (id) and (sim:has_info(id,"npcx_beh_patrol_mode") or sim:has_info(id,"npcx_beh_wait")) then
L309 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
if (id) and (sim:has_info(id,"npcx_beh_patrol_mode") or sim:has_info(id,"npcx_beh_wait")) then
L366 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_npc = sim:object(id)
L369 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local unreg = sim:object(unreg_id)
L371 🟡 potential_nil_access
Potential nil access: 'unreg' from :object() used without nil check
Impact: low
Show code
unreg:unregister_npc(se_npc)
L385 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_npc = sim:object(id)
L388 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local unreg = sim:object(unreg_id)
L390 🟡 potential_nil_access
Potential nil access: 'unreg' from :object() used without nil check
Impact: low
Show code
unreg:unregister_npc(se_npc)
L574 🟡 potential_nil_access
Potential nil access: 'companion' from level.object_by_id() used without nil check
Impact: low
Show code
if companion and companion:alive() and (not companion:best_enemy()) then
L574 🟡 potential_nil_access
Potential nil access: 'companion' from level.object_by_id() used without nil check
Impact: low
Show code
if companion and companion:alive() and (not companion:best_enemy()) then
L578 🟡 potential_nil_access
Potential nil access: 'target' from level.object_by_id() used without nil check
Impact: low
Show code
and target:alive()
L579 🟡 potential_nil_access
Potential nil access: 'target' from level.object_by_id() used without nil check
Impact: low
Show code
and target:best_enemy()
L580 🟡 potential_nil_access
Potential nil access: 'target' from level.object_by_id() used without nil check
Impact: low
Show code
and ((target:best_enemy():id() == 0) or (target:best_enemy():id() == companion_id))
L580 🟡 potential_nil_access
Potential nil access: 'target' from level.object_by_id() used without nil check
Impact: low
Show code
and ((target:best_enemy():id() == 0) or (target:best_enemy():id() == companion_id))
L582 🟡 potential_nil_access
Potential nil access: 'target' from level.object_by_id() used without nil check
Impact: low
Show code
xr_danger.set_script_danger(companion,7000,target:id(),vector():set(target:position()))
L582 🟡 potential_nil_access
Potential nil access: 'target' from level.object_by_id() used without nil check
Impact: low
Show code
xr_danger.set_script_danger(companion,7000,target:id(),vector():set(target:position()))
L1281 🟡 potential_nil_access
Potential nil access: 'itm_slot' from :item_in_slot() used without nil check
Impact: low
Show code
ignore_ids[itm_slot:id()] = true
L1288 🟡 potential_nil_access
Potential nil access: 'wpn' from :item_in_slot() used without nil check
Impact: low
Show code
local ammos = utils_item.get_ammo(wpn:section(), wpn:id(), true)
L1288 🟡 potential_nil_access
Potential nil access: 'wpn' from :item_in_slot() used without nil check
Impact: low
Show code
local ammos = utils_item.get_ammo(wpn:section(), wpn:id(), true)
L1369 🟡 potential_nil_access
Potential nil access: 'item' from level.object_by_id() used without nil check
Impact: low
Show code
printf('~ axr_companions.trasnfer_item | item [%s] is not assigned to companion [%s] | assigned companion: %s - assigned item: %s', item:name(), npc_from:name(), is_assigned_companion(npc_from), is_assigned_item(id_from,item_id))
L1590 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
if obj and obj:has_info("npcx_is_companion") and (distance_between(db.actor,obj) <= max_trade_distance) then
L1532 🟡 unused_local_variable
Local variable 'over_weight' is assigned but never used
Impact: low
Show code
local over_weight, tot_weight, max_weight = is_overweight(npc)

ui_addon_companion_quick_menu.script

L6 🟢 uncached_globals_summary
Cache 1 globals in on_key_press
Impact: medium
Show code
L18: math.random L21: math.random

152- Configurable loot condition - dph

1 file (🟢5 🟡5 🔴5 🔵4)

death_manager.script

L42 🟢 uncached_globals_summary
Cache 3 globals in init_drop_settings
Impact: medium
Show code
L52: pairs L53: pairs L67: tonumber L83: tonumber L85: math.ceil L85: math.ceil
L502 🟢 uncached_globals_summary
Cache 1 globals in itr
Impact: medium
Show code
L508: math.random L511: math.random
L550 🟢 uncached_globals_summary
Cache 1 globals in set_weapon_drop_condition
Impact: medium
Show code
L555: math.random L557: math.random
L504 🟢 repeated_itm_section()
itm:section() called 3x in itr
Impact: low
Show code
Cache itm:section() result
L588 🟢 repeated_itm_section()
itm:section() called 3x in set_weapon_drop_condition
Impact: low
Show code
Cache itm:section() result
L917 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str = str .. " , " .. info.sec .. " (" .. info.num .. ")" .. add
L340 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR [%s] is not spawned by ItemProcessor",section)
L902 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("----------------------------------------------------------")
L919 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(str)
L921 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("----------------------------------------------------------")
L21 🔴 global_write
Global write: item_by_story_id
Impact: low
Show code
item_by_story_id = {}
L62 🔴 global_write
Global write: result
Impact: low
Show code
result, id, value = death_ini:r_line_ex(x,i,"","")
L103 🔴 global_write
Global write: item_by_story_id
Impact: low
Show code
item_by_story_id = {}
L153 🔴 global_write
Global write: items_by_npc
Impact: low
Show code
items_by_npc = {} -- table = trade, false = no trade, nil = not asked yet
L772 🔴 global_write
Global write: items_by_npc
Impact: low
Show code
items_by_npc = m_data.items_by_npc or {}
L210 🟡 potential_nil_access
Potential nil access: 'ini' from :spawn_ini() used without nil check
Impact: low
Show code
if ini and ini:section_exist("dont_spawn_loot") then
L394 🟡 potential_nil_access
Potential nil access: 'ini' from :spawn_ini() used without nil check
Impact: low
Show code
if ini and ini:section_exist("dont_keep_items") then
L26 🟡 unused_local_variable
Local variable 'visuals' is assigned but never used
Impact: low
Show code
local visuals = {}
L161 🟡 unused_local_variable
Local variable 'sim' is assigned but never used
Impact: low
Show code
local sim = alife()

154- RF Receiver Tasks - Tweaki_Breeki

2 files (🟢12 🟡9 🔴86 🔵4)

TB_RF_Receiver_Packages.script

L842 🟢 table_insert_append
table.insert(tb_new_queue, v) -> tb_new_queue[#tb_new_queue+1] = v
Impact: high
Show code
table.insert(tb_new_queue,tb_package_queue[i])
L914 🟢 table_insert_append
table.insert(tb_package_queue, v) -> tb_package_queue[#tb_package_queue+1] = v
Impact: high
Show code
table.insert(tb_package_queue,{level.name(),tb_relations[tb_factions[i]][2]})
L917 🟢 table_insert_append
table.insert(tb_package_queue, v) -> tb_package_queue[#tb_package_queue+1] = v
Impact: high
Show code
table.insert(tb_package_queue,{tb_homebases[i],tb_relations[tb_factions[i]][2]})
L1038 🟢 table_insert_append
table.insert(notfriends, v) -> notfriends[#notfriends+1] = v
Impact: high
Show code
table.insert(notfriends,tb_cut_factions[i])
L1048 🟢 table_insert_append
table.insert(bg_array, v) -> bg_array[#bg_array+1] = v
Impact: high
Show code
table.insert(bg_array,bg_num)
L777 🟢 uncached_globals_summary
Cache 2 globals in give_bonus_items
Impact: medium
Show code
L781: math.random L782: math.random L783: tostring L786: tostring
L952 🟢 uncached_globals_summary
Cache 2 globals in tb_radio_thing
Impact: medium
Show code
L977: math.random L996: math.random L1008: tostring L1016: tostring
L1030 🟢 uncached_globals_summary
Cache 1 globals in spawn_some_badguys
Impact: medium
Show code
L1031: math.random L1041: math.random
L1097 🟢 uncached_globals_summary
Cache 1 globals in actor_on_item_take
Impact: medium
Show code
L1113: tostring L1114: tostring
L1044 🟢 repeated_alife
alife called 3x in spawn_some_badguys
Impact: low
Show code
local sim = alife()
L818 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("--- Loading TBs_RF_Receiver_Hidden_Package_Sidequests_v1.8 ---")
L846 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("--- Cleaning v1.5 package queue for v1.6 | Queue size was: %s, is now: %s ---",tb_queue_num,#tb_package_queue)
L861 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! --------------------------------------------------\n! ERROR!\n! SOMETHING HAS REMOVED THE PACKAGE FROM THE GAME!\n! Please post the following information to tweaki_breeki on moddb!\n! tb_target_item is %s\n! tb_package_active is %s\n! tb_package_in_level is %s\n! #tb_package_queue is %s\n! tb_target_lvid is %s\n! tb_target_gvid is %s\n! --------------------------------------------------",tb_target_item,tb_package_active,tb_package_in_level,#tb_package_queue,tb_target_lvid,tb_target_gvid)
L26 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
tb_target_item = 0
L27 🔴 global_write
Global write: tb_sufficient_passed
Impact: low
Show code
tb_sufficient_passed = false
L28 🔴 global_write
Global write: tb_package_active
Impact: low
Show code
tb_package_active = false
L29 🔴 global_write
Global write: tb_reminder
Impact: low
Show code
tb_reminder = "empty"
L30 🔴 global_write
Global write: tb_package_in_level
Impact: low
Show code
tb_package_in_level = "empty"
L31 🔴 global_write
Global write: tb_freq
Impact: low
Show code
tb_freq = 0
L32 🔴 global_write
Global write: tb_sender_icon
Impact: low
Show code
tb_sender_icon = "empty"
L33 🔴 global_write
Global write: tb_scan_time
Impact: low
Show code
tb_scan_time = 4000
L34 🔴 global_write
Global write: tb_tg_scan
Impact: low
Show code
tb_tg_scan = 0
L35 🔴 global_write
Global write: tb_device
Impact: low
Show code
tb_device = "detector_radio"
L36 🔴 global_write
Global write: tb_relation_diff
Impact: low
Show code
tb_relation_diff = 250
L38 🔴 global_write
Global write: tb_target_lvid
Impact: low
Show code
tb_target_lvid = 0
L39 🔴 global_write
Global write: tb_target_gvid
Impact: low
Show code
tb_target_gvid = 0
L40 🔴 global_write
Global write: tb_bonus_items
Impact: low
Show code
tb_bonus_items = 0
L41 🔴 global_write
Global write: tb_badguy_spawned
Impact: low
Show code
tb_badguy_spawned = false
L42 🔴 global_write
Global write: tb_tg_badguys
Impact: low
Show code
tb_tg_badguys = 0
L44 🔴 global_write
Global write: tb_previous_level
Impact: low
Show code
tb_previous_level = "empty"
L46 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
tb_making_package = false
L49 🔴 global_write
Global write: tb_relations
Impact: low
Show code
tb_relations = {
L65 🔴 global_write
Global write: tb_maybe_badguys
Impact: low
Show code
tb_maybe_badguys = {
L81 🔴 global_write
Global write: tb_factions
Impact: low
Show code
tb_factions = {"army", "bandit", "csky", "dolg", "ecolog", "freedom", "greh", "isg", "killer", "monolith", "renegade", "stalker"}
L83 🔴 global_write
Global write: tb_cut_factions
Impact: low
Show code
tb_cut_factions = {"army", "bandit", "csky", "dolg", "ecolog", "freedom", "killer", "renegade", "stalker"}
L85 🔴 global_write
Global write: tb_homebases
Impact: low
Show code
tb_homebases = {"l03_agroprom", "l04_darkvalley", "k00_marsh", "l05_bar", "l08_yantar", "l07_military", "l10_red_forest", "pripyat", "l09_deadcity", "l11_pripyat", "k00_marsh", "l01_escape"}
L88 🔴 global_write
Global write: tb_package_queue
Impact: low
Show code
tb_package_queue = {}
L91 🔴 global_write
Global write: tb_allmaps
Impact: low
Show code
tb_allmaps = {
L129 🔴 global_write
Global write: tb_package_coords
Impact: low
Show code
tb_package_coords = {
L617 🔴 global_write
Global write: tb_extraloot
Impact: low
Show code
tb_extraloot = {
L634 🔴 global_write
Global write: tb_extraupgrades
Impact: low
Show code
tb_extraupgrades = {
L724 🔴 global_write
Global write: tb_junks
Impact: low
Show code
tb_junks = {
L759 🔴 global_write
Global write: tb_copy_of_itms_manager
Impact: low
Show code
tb_copy_of_itms_manager = itms_manager.use_package_random
L772 🔴 global_write
Global write: tb_bonus_items
Impact: low
Show code
tb_bonus_items = tb_bonus_items - 1
L845 🔴 global_write
Global write: tb_package_queue
Impact: low
Show code
tb_package_queue = tb_new_queue
L873 🔴 global_write
Global write: tb_tg_badguys
Impact: low
Show code
tb_tg_badguys = tg + 2000
L878 🔴 global_write
Global write: tb_badguy_spawned
Impact: low
Show code
tb_badguy_spawned = true
L888 🔴 global_write
Global write: tb_tg_scan
Impact: low
Show code
tb_tg_scan = tg + tb_scan_time
L905 🔴 global_write
Global write: tb_sender_icon
Impact: low
Show code
tb_sender_icon = tb_relations[tb_factions[i]][2]
L910 🔴 global_write
Global write: tb_sufficient_passed
Impact: low
Show code
tb_sufficient_passed = true
L928 🔴 global_write
Global write: tb_sender_icon
Impact: low
Show code
tb_sender_icon = tb_relations[tb_factions[i]][2]
L929 🔴 global_write
Global write: tb_reminder
Impact: low
Show code
tb_reminder = game.translate_string("tb_sooner_rf")
L932 🔴 global_write
Global write: tb_sufficient_passed
Impact: low
Show code
tb_sufficient_passed = true
L953 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
tb_making_package = true
L957 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
tb_making_package = false
L961 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
tb_making_package = false
L970 🔴 global_write
Global write: tb_sender_icon
Impact: low
Show code
tb_sender_icon = tb_package_queue[1][2]
L984 🔴 global_write
Global write: tb_package_in_level
Impact: low
Show code
tb_package_in_level = chosenmap
L995 🔴 global_write
Global write: tb_previous_level
Impact: low
Show code
tb_previous_level = chosenmap
L1004 🔴 global_write
Global write: tb_freq
Impact: low
Show code
tb_freq = rfreq
L1010 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
tb_target_item = se_obj.id
L1011 🔴 global_write
Global write: tb_target_lvid
Impact: low
Show code
tb_target_lvid = rlvid
L1012 🔴 global_write
Global write: tb_target_gvid
Impact: low
Show code
tb_target_gvid = rgvid
L1015 🔴 global_write
Global write: tb_package_active
Impact: low
Show code
tb_package_active = true
L1017 🔴 global_write
Global write: tb_reminder
Impact: low
Show code
tb_reminder = game.translate_string("tb_dont_forget") .. " " .. game.translate_string(rlocat) .. " " .. game.translate_string(rplace) .. game.translate_string("tb_freq_was_on") .. " " .. tostring(rfreq) .. game.translate_string("tb_the_mhz")
L1021 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
tb_making_package = false
L1024 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
tb_making_package = false
L1069 🔴 global_write
Global write: tb_scan_time
Impact: low
Show code
tb_scan_time = 1000
L1075 🔴 global_write
Global write: tb_scan_time
Impact: low
Show code
tb_scan_time = 2000
L1081 🔴 global_write
Global write: tb_scan_time
Impact: low
Show code
tb_scan_time = 3000
L1087 🔴 global_write
Global write: tb_scan_time
Impact: low
Show code
tb_scan_time = 4000
L1103 🔴 global_write
Global write: tb_package_active
Impact: low
Show code
tb_package_active = false
L1104 🔴 global_write
Global write: tb_badguy_spawned
Impact: low
Show code
tb_badguy_spawned = false
L1105 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
tb_target_item = 0
L1106 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
tb_target_item = 0
L1107 🔴 global_write
Global write: tb_reminder
Impact: low
Show code
tb_reminder = "empty"
L1108 🔴 global_write
Global write: tb_package_in_level
Impact: low
Show code
tb_package_in_level = "empty"
L1109 🔴 global_write
Global write: tb_scan_time
Impact: low
Show code
tb_scan_time = 4000
L1119 🔴 global_write
Global write: tb_bonus_items
Impact: low
Show code
tb_bonus_items = 0
L1121 🔴 global_write
Global write: tb_bonus_items
Impact: low
Show code
tb_bonus_items = tb_bonus_items + 1
L1151 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
tb_target_item = m_data.tb_target_item
L1152 🔴 global_write
Global write: tb_sufficient_passed
Impact: low
Show code
tb_sufficient_passed = m_data.tb_sufficient_passed
L1153 🔴 global_write
Global write: tb_package_active
Impact: low
Show code
tb_package_active = m_data.tb_package_active
L1154 🔴 global_write
Global write: tb_reminder
Impact: low
Show code
tb_reminder = m_data.tb_reminder
L1155 🔴 global_write
Global write: tb_package_in_level
Impact: low
Show code
tb_package_in_level = m_data.tb_package_in_level
L1156 🔴 global_write
Global write: tb_freq
Impact: low
Show code
tb_freq = m_data.tb_freq
L1157 🔴 global_write
Global write: tb_sender_icon
Impact: low
Show code
tb_sender_icon = m_data.tb_sender_icon
L1158 🔴 global_write
Global write: tb_relations
Impact: low
Show code
tb_relations = m_data.tb_relations
L1159 🔴 global_write
Global write: tb_package_queue
Impact: low
Show code
tb_package_queue = m_data.tb_package_queue
L1162 🔴 global_write
Global write: tb_target_lvid
Impact: low
Show code
tb_target_lvid = m_data.tb_target_lvid
L1163 🔴 global_write
Global write: tb_target_gvid
Impact: low
Show code
tb_target_gvid = m_data.tb_target_gvid
L1164 🔴 global_write
Global write: tb_bonus_items
Impact: low
Show code
tb_bonus_items = m_data.tb_bonus_items
L1165 🔴 global_write
Global write: tb_badguy_spawned
Impact: low
Show code
tb_badguy_spawned = m_data.tb_badguy_spawned
L1168 🔴 global_write
Global write: tb_previous_level
Impact: low
Show code
tb_previous_level = m_data.tb_previous_level
L884 🟡 potential_nil_access
Potential nil access: 'obj_det' from :active_detector() used without nil check
Impact: low
Show code
if not (obj_det and obj_det:section() == tb_device and obj_det:condition() >= obj_det:power_critical()) then
L884 🟡 potential_nil_access
Potential nil access: 'obj_det' from :active_detector() used without nil check
Impact: low
Show code
if not (obj_det and obj_det:section() == tb_device and obj_det:condition() >= obj_det:power_critical()) then
L884 🟡 potential_nil_access
Potential nil access: 'obj_det' from :active_detector() used without nil check
Impact: low
Show code
if not (obj_det and obj_det:section() == tb_device and obj_det:condition() >= obj_det:power_critical()) then

item_radio.script

L398 🟢 uncached_globals_summary
Cache 1 globals in actor_on_first_update
Impact: medium
Show code
L406: pairs L416: pairs
L434 🟢 uncached_globals_summary
Cache 1 globals in actor_on_update
Impact: medium
Show code
L474: math.random L486: math.random
L108 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("item_radio | " .. fmt, ...)
L99 🔴 global_write
Global write: RF_stashes
Impact: low
Show code
RF_stashes = {} -- stored stashes with RF source
L100 🔴 global_write
Global write: RF_targets
Impact: low
Show code
RF_targets = {} -- stored specific targets with RF source
L263 🔴 global_write
Global write: refresh
Impact: low
Show code
refresh = true -- require sounds update
L502 🔴 global_write
Global write: RF_stashes
Impact: low
Show code
RF_stashes = m_data.RF_stashes or {}
L503 🔴 global_write
Global write: RF_targets
Impact: low
Show code
RF_targets = m_data.RF_targets or {}
L407 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se = sim:object(id)
L409 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local lvl = sim:level_name(gg:vertex(se.m_game_vertex_id):level_id())
L438 🟡 potential_nil_access
Potential nil access: 'obj_det' from :active_detector() used without nil check
Impact: low
Show code
if not (obj_det and obj_det:section() == _device and obj_det:condition() >= obj_det:power_critical()) then
L438 🟡 potential_nil_access
Potential nil access: 'obj_det' from :active_detector() used without nil check
Impact: low
Show code
if not (obj_det and obj_det:section() == _device and obj_det:condition() >= obj_det:power_critical()) then
L438 🟡 potential_nil_access
Potential nil access: 'obj_det' from :active_detector() used without nil check
Impact: low
Show code
if not (obj_det and obj_det:section() == _device and obj_det:condition() >= obj_det:power_critical()) then
L527 🟡 potential_nil_access
Potential nil access: 'detector' from :active_detector() used without nil check
Impact: low
Show code
if detector and (detector:section() == _device) and (not wep) then

155- UNISG Trader Fix - Qball

1 file (🟢1 🟡6 🔴0 🔵1)

dialogs_lostzone.script

L756 🟢 uncached_globals_summary
Cache 1 globals in isg_emergency_stash_timer
Impact: medium
Show code
L762: math.random L773: math.random
L510 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("There is no squad with id[%s]", story_id)
L516 🟡 potential_nil_access
Potential nil access: 'npc' from level.object_by_id() used without nil check
Impact: low
Show code
if npc then npc:force_set_goodwill(-5000, db.actor) end
L777 🟡 unused_local_variable
Local variable 'stash_name' is assigned but never used
Impact: low
Show code
local stash_id, stash_name, stash_desc, stash_hint = treasure_manager.get_random_stash("treasure_unique")
L777 🟡 unused_local_variable
Local variable 'stash_desc' is assigned but never used
Impact: low
Show code
local stash_id, stash_name, stash_desc, stash_hint = treasure_manager.get_random_stash("treasure_unique")
L777 🟡 unused_local_variable
Local variable 'stash_hint' is assigned but never used
Impact: low
Show code
local stash_id, stash_name, stash_desc, stash_hint = treasure_manager.get_random_stash("treasure_unique")
L815 🟡 unused_local_variable
Local variable 'junk' is assigned but never used
Impact: low
Show code
local junk, kind, value = treasure_manager.ini_treasure:r_line("isg_stash_bonus" , i , "", "")
L815 🟡 unused_local_variable
Local variable 'kind' is assigned but never used
Impact: low
Show code
local junk, kind, value = treasure_manager.ini_treasure:r_line("isg_stash_bonus" , i , "", "")

156- No Exos in the South - Grokitach

2 files (🟢4 🟡5 🔴14 🔵0)

grok_nes.script

L245 🟢 repeated_alife
alife called 3x in npc_on_update
Impact: low
Show code
local sim = alife()
L254 🟢 repeated_npc_id()
npc:id() called 2x in npc_on_update
Impact: low
Show code
Cache npc:id() result
L229 🔴 global_write
Global write: npc_has_af
Impact: low
Show code
npc_has_af = 1
L233 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 0
L234 🔴 global_write
Global write: delay
Impact: low
Show code
delay = 1130
L236 🔴 global_write
Global write: tg
Impact: low
Show code
tg = time_global()
L239 🔴 global_write
Global write: grok_delay
Impact: low
Show code
grok_delay = tg + delay
L240 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 1
L244 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 0
L247 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local actor_level = sim:level_name(gg:vertex(sim:actor().m_game_vertex_id):level_id())
L247 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local actor_level = sim:level_name(gg:vertex(sim:actor().m_game_vertex_id):level_id())
L3 🟡 unused_local_variable
Local variable 'ini_damage' is assigned but never used
Impact: low
Show code
local ini_damage = ini_file("creatures\\damages.ltx")

grok_no_north_faction_in_south.script

L245 🟢 repeated_npc_id()
npc:id() called 2x in npc_on_update
Impact: low
Show code
Cache npc:id() result
L260 🟢 repeated_alife
alife called 3x in npc_on_update
Impact: low
Show code
local sim = alife()
L220 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 0
L221 🔴 global_write
Global write: delay
Impact: low
Show code
delay = 250
L227 🔴 global_write
Global write: npc_has_af
Impact: low
Show code
npc_has_af = 1
L232 🔴 global_write
Global write: tg
Impact: low
Show code
tg = time_global()
L235 🔴 global_write
Global write: grok_delay
Impact: low
Show code
grok_delay = tg + delay
L236 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 1
L240 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 0
L262 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local actor_level = sim:level_name(gg:vertex(sim:actor().m_game_vertex_id):level_id())
L262 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local actor_level = sim:level_name(gg:vertex(sim:actor().m_game_vertex_id):level_id())

158- ABF - Jurkonov

3 files (🟢3 🟡0 🔴0 🔵9)

chem_damage.script

L26 🟢 repeated_field_section()
field:section() called 4x in hit_callback
Impact: low
Show code
Cache field:section() result
L26 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("current hitter %s", field:section())
L28 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("not valid field %s", field:section())
L44 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Registering")

fire_damage.script

L26 🟢 repeated_field_section()
field:section() called 4x in hit_callback
Impact: low
Show code
Cache field:section() result
L26 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("current hitter %s", field:section())
L28 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("not valid field %s", field:section())
L44 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Registering")

psy_damage.script

L26 🟢 repeated_field_section()
field:section() called 4x in hit_callback
Impact: low
Show code
Cache field:section() result
L26 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("current hitter %s", field:section())
L28 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("not valid field %s", field:section())
L44 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Registering")

16- Hit Effects - Wepl

1 file (🟢1 🟡2 🔴0 🔵0)

wepl_hit_effect.script

L28 🟢 uncached_globals_summary
Cache 1 globals in actor_on_before_hit
Impact: medium
Show code
L80: math.random L85: math.random
L35 🟡 potential_nil_access
Potential nil access: 'ply' from db.actor() used without nil check
Impact: low
Show code
if not ( ply and ply:alive() ) then return end
L94 🟡 potential_nil_access
Potential nil access: 'ply' from db.actor() used without nil check
Impact: low
Show code
if not ( ply and ply:alive() ) then return end

161- Improved player and NPCs ranks (longer for player, faster for companions) - mandothreesixtee

2 files (🟢1 🟡3 🔴13 🔵1)

game_achievements.script

L26 🟡 unused_local_variable
Local variable 'junk1' is assigned but never used
Impact: low
Show code
local junk1, section, junk2 = ini_sys:r_line("achievements", i, "", "")
L26 🟡 unused_local_variable
Local variable 'junk2' is assigned but never used
Impact: low
Show code
local junk1, section, junk2 = ini_sys:r_line("achievements", i, "", "")

game_statistics.script

L171 🟢 repeated_item_id()
item:id() called 4x in actor_on_item_take
Impact: low
Show code
Cache item:id() result
L250 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Player used debug mode!")
L19 🔴 global_write
Global write: actor_achievements
Impact: low
Show code
actor_achievements = {
L48 🔴 global_write
Global write: actor_artefacts
Impact: low
Show code
actor_artefacts = {
L52 🔴 global_write
Global write: actor_anomaly_maps
Impact: low
Show code
actor_anomaly_maps = {
L56 🔴 global_write
Global write: actor_miscellaneous
Impact: low
Show code
actor_miscellaneous = {
L62 🔴 global_write
Global write: actor_visited_levels
Impact: low
Show code
actor_visited_levels = {
L100 🔴 global_write
Global write: actor_visited_smarts
Impact: low
Show code
actor_visited_smarts = {
L104 🔴 global_write
Global write: actor_statistics
Impact: low
Show code
actor_statistics = {
L140 🔴 global_write
Global write: npc_statistics
Impact: low
Show code
npc_statistics = {
L528 🔴 global_write
Global write: actor_artefacts
Impact: low
Show code
actor_artefacts = data.game_statistics.actor_artefacts or actor_artefacts
L529 🔴 global_write
Global write: actor_anomaly_maps
Impact: low
Show code
actor_anomaly_maps = data.game_statistics.actor_anomaly_maps or actor_anomaly_maps
L530 🔴 global_write
Global write: actor_miscellaneous
Impact: low
Show code
actor_miscellaneous = data.game_statistics.actor_miscellaneous or actor_miscellaneous
L531 🔴 global_write
Global write: actor_visited_levels
Impact: low
Show code
actor_visited_levels = data.game_statistics.actor_visited_levels or actor_visited_levels
L532 🔴 global_write
Global write: actor_visited_smarts
Impact: low
Show code
actor_visited_smarts = data.game_statistics.actor_visited_smarts or actor_visited_smarts
L175 🟡 potential_nil_access
Potential nil access: 'artefact' from :get_artefact() used without nil check
Impact: low
Show code
artefact:FollowByPath("NULL", 0, vector():set(500,500,500))

163- Identification UI - CrookR

1 file (🟢1 🟡5 🔴10 🔵1)

factionID_hud_mcm.script

L421 🟢 repeated_obj_id()
obj:id() called 2x in actor_on_update
Impact: low
Show code
Cache obj:id() result
L383 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("ERROR: faction ID nil in tick")
L223 🔴 global_write
Global write: op
Impact: low
Show code
op ={ id= "targetID" , sh = true , gr =
L308 🔴 global_write
Global write: rank
Impact: low
Show code
rank = game.translate_string("st_rank_" .. ranks.get_obj_rank_name(obj)) or ""
L310 🔴 global_write
Global write: rank
Impact: low
Show code
if not rankID then rank = nil end
L315 🔴 global_write
Global write: rank
Impact: low
Show code
rank = nil
L404 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 0
L405 🔴 global_write
Global write: delay
Impact: low
Show code
delay = 100
L409 🔴 global_write
Global write: tg
Impact: low
Show code
tg = time_global()
L412 🔴 global_write
Global write: grok_delay
Impact: low
Show code
grok_delay = tg + delay
L413 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 1
L417 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 0
L421 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
if HUD and obj and IsStalker(obj) and obj:id() ~= 0 and (obj.health > 0 or deadID) and obj:character_community() and HUD.factions[obj:character_community()] then
L421 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
if HUD and obj and IsStalker(obj) and obj:id() ~= 0 and (obj.health > 0 or deadID) and obj:character_community() and HUD.factions[obj:character_community()] then
L421 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
if HUD and obj and IsStalker(obj) and obj:id() ~= 0 and (obj.health > 0 or deadID) and obj:character_community() and HUD.factions[obj:character_community()] then
L424 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
if obj:id() ~= LastHitObject:id() then
L519 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
if obj and obj.health <= 0 and LastHitObject and LastHitObject:id() == obj:id() then

164- Hunger Thirst Sleep UI - xcvb

1 file (🟢0 🟡0 🔴1 🔵0)

hts_inventory_bars.script

L165 🔴 global_write
Global write: loc_val
Impact: low
Show code
_,_, loc_val = string.find(line, "start_blur_4%s*=%s*(%d+)")

165- Hunger Thirst Sleep UI htsb knifebinoc patches - xcvb

1 file (🟢0 🟡0 🔴1 🔵0)

hts_inventory_bars.script

L165 🔴 global_write
Global write: loc_val
Impact: low
Show code
_,_, loc_val = string.find(line, "start_blur_4%s*=%s*(%d+)")

166- New sorting tabs - Bartoche

1 file (🟢13 🟡34 🔴1 🔵5)

ui_inventory.script

L763 🟢 table_insert_append
table.insert(context_str, v) -> context_str[#context_str+1] = v
Impact: high
Show code
table.insert(context_str, name)
L768 🟢 table_insert_append
table.insert(context_action, v) -> context_action[#context_action+1] = v
Impact: high
Show code
table.insert(context_action, func_action[1])
L769 🟢 table_insert_append
table.insert(context_params, v) -> context_params[#context_params+1] = v
Impact: high
Show code
table.insert(context_params, {id, bag, unpack(func_action)})
L1173 🟢 table_insert_append
table.insert(free_slots, v) -> free_slots[#free_slots+1] = v
Impact: high
Show code
table.insert(free_slots, cslots[i])
L708 🟢 uncached_globals_summary
Cache 1 globals in InitProperties
Impact: medium
Show code
L729: unpack L738: unpack
L1531 🟢 uncached_globals_summary
Cache 1 globals in UpdateStats
Impact: medium
Show code
L1536: pairs L1571: pairs
L1719 🟢 uncached_globals_summary
Cache 1 globals in On_Sort
Impact: medium
Show code
L1755: pairs L1758: pairs
L2149 🟢 uncached_globals_summary
Cache 1 globals in LMode_RefreshInventories
Impact: medium
Show code
L2156: pairs L2162: pairs
L2326 🟢 uncached_globals_summary
Cache 1 globals in TMode_RefreshInventories
Impact: medium
Show code
L2334: pairs L2339: pairs
L2641 🟢 uncached_globals_summary
Cache 1 globals in RMode_InitItem
Impact: medium
Show code
L2654: pairs L2700: pairs
L3290 🟢 uncached_globals_summary
Cache 1 globals in On_CC_Mouse1_DB
Impact: medium
Show code
L3347: unpack L3356: unpack
L3509 🟢 uncached_globals_summary
Cache 1 globals in Update
Impact: medium
Show code
L3538: pairs L3553: pairs
L3093 🟢 repeated_obj_from_section()
obj_from:section() called 3x in On_CC_DragDrop
Impact: low
Show code
Cache obj_from:section() result
L675 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR Can't get item game object!")
L855 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR UIInventory:Name_Custom | can't find function (%s) for %s in section [%s]", str[1] .. str[2], "use" .. i .. "_functor", sec)
L1233 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR UIInventory:Action_Custom | can't find function (%s) for %s in section [%s]", str[1] .. str[2], "use" .. i .. "_action_functor", sec)
L1546 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("UIInventory | can't get cast_CustomOutfit of [%s]", outfit:name())
L1579 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("UIInventory | can't get cast_Helmet of [%s]", outfit:name())
L3115 🔴 global_write
Global write: quick_item
Impact: low
Show code
quick_item = exec_console_cmd("slot_" .. (idx_to - 1) .. " " .. obj_from:section())
L677 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
self:Print(nil, msg, obj:name())
L696 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
return p:id() == AC_ID
L699 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
return npc and p:id() == npc:id()
L1350 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
self.player_community:SetText( game.translate_string(actor:character_community()) )
L1351 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
self.player_icon:InitTexture( actor:character_icon() )
L1352 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
self.player_money:SetText( actor:money() .. " RU" )
L1379 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local outfit = actor:item_in_slot(7)
L1380 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local backpack = actor:item_in_slot(13)
L1383 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local tot_weight = actor:get_total_weight()
L1386 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local max_weight = actor:get_actor_max_weight()
L1389 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
max_weight = max_weight + (outfit and outfit:get_additional_max_weight() or 0)
L1392 🟡 potential_nil_access
Potential nil access: 'backpack' from :item_in_slot() used without nil check
Impact: low
Show code
max_weight = max_weight + (backpack and backpack:get_additional_max_weight() or 0)
L1395 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:iterate_belt( function(owner, obj)
L1401 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:cast_Actor():conditions():BoosterForEach( function(booster_type, booster_time, booster_value)
L1472 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local item = actor:item_in_slot(i)
L1484 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local outfit = actor:item_in_slot(7)
L1501 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local outfit = actor:item_in_slot(7)
L1502 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local cnt_arty = actor:belt_count()
L1503 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local cnt_arty_slot = outfit and outfit:cast_CustomOutfit():get_artefact_count() or 0
L1507 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local item = i <= cnt_arty and actor:item_on_belt(i-1)
L1542 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local outfit = actor:item_in_slot(7)
L1575 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local helm = actor:item_in_slot(12)
L1603 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:iterate_belt( function(owner, obj)
L1627 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:cast_Actor():conditions():BoosterForEach( function(booster_type, booster_time, booster_value)
L1660 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local power = actor:cast_Actor():conditions():V_SatietyPower() --db.actor.satiety
L1940 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
local clsid = obj:clsid()
L2217 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
tot_weight = tot_weight + obj:weight()
L2888 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
local sec = obj:section()
L2889 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
local cond = obj:condition()
L2917 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
inventory_upgrades.effect_repair_item( obj:section(), obj:condition())
L2917 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
inventory_upgrades.effect_repair_item( obj:section(), obj:condition())
L2918 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
obj:set_condition(0.99999)
L2282 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = char_ini:r_line(known_info,i,"","")
L2282 🟡 unused_local_variable
Local variable 'value' is assigned but never used
Impact: low
Show code
local result, id, value = char_ini:r_line(known_info,i,"","")

167- New sorting tabs htsb patch - Bartoche

1 file (🟢13 🟡35 🔴1 🔵5)

ui_inventory.script

L765 🟢 table_insert_append
table.insert(context_str, v) -> context_str[#context_str+1] = v
Impact: high
Show code
table.insert(context_str, name)
L770 🟢 table_insert_append
table.insert(context_action, v) -> context_action[#context_action+1] = v
Impact: high
Show code
table.insert(context_action, func_action[1])
L771 🟢 table_insert_append
table.insert(context_params, v) -> context_params[#context_params+1] = v
Impact: high
Show code
table.insert(context_params, {id, bag, unpack(func_action)})
L1175 🟢 table_insert_append
table.insert(free_slots, v) -> free_slots[#free_slots+1] = v
Impact: high
Show code
table.insert(free_slots, cslots[i])
L710 🟢 uncached_globals_summary
Cache 1 globals in InitProperties
Impact: medium
Show code
L731: unpack L740: unpack
L1533 🟢 uncached_globals_summary
Cache 1 globals in UpdateStats
Impact: medium
Show code
L1538: pairs L1573: pairs
L1743 🟢 uncached_globals_summary
Cache 1 globals in On_Sort
Impact: medium
Show code
L1779: pairs L1782: pairs
L2173 🟢 uncached_globals_summary
Cache 1 globals in LMode_RefreshInventories
Impact: medium
Show code
L2180: pairs L2186: pairs
L2350 🟢 uncached_globals_summary
Cache 1 globals in TMode_RefreshInventories
Impact: medium
Show code
L2358: pairs L2363: pairs
L2665 🟢 uncached_globals_summary
Cache 1 globals in RMode_InitItem
Impact: medium
Show code
L2678: pairs L2724: pairs
L3314 🟢 uncached_globals_summary
Cache 1 globals in On_CC_Mouse1_DB
Impact: medium
Show code
L3371: unpack L3380: unpack
L3533 🟢 uncached_globals_summary
Cache 1 globals in Update
Impact: medium
Show code
L3562: pairs L3577: pairs
L3117 🟢 repeated_obj_from_section()
obj_from:section() called 3x in On_CC_DragDrop
Impact: low
Show code
Cache obj_from:section() result
L677 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR Can't get item game object!")
L857 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR UIInventory:Name_Custom | can't find function (%s) for %s in section [%s]", str[1] .. str[2], "use" .. i .. "_functor", sec)
L1235 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR UIInventory:Action_Custom | can't find function (%s) for %s in section [%s]", str[1] .. str[2], "use" .. i .. "_action_functor", sec)
L1548 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("UIInventory | can't get cast_CustomOutfit of [%s]", outfit:name())
L1581 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("UIInventory | can't get cast_Helmet of [%s]", outfit:name())
L3139 🔴 global_write
Global write: quick_item
Impact: low
Show code
quick_item = exec_console_cmd("slot_" .. (idx_to - 1) .. " " .. obj_from:section())
L679 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
self:Print(nil, msg, obj:name())
L698 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
return p:id() == AC_ID
L701 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
return npc and p:id() == npc:id()
L1352 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
self.player_community:SetText( game.translate_string(actor:character_community()) )
L1353 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
self.player_icon:InitTexture( actor:character_icon() )
L1354 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
self.player_money:SetText( actor:money() .. " RU" )
L1381 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local outfit = actor:item_in_slot(7)
L1382 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local backpack = actor:item_in_slot(13)
L1385 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local tot_weight = actor:get_total_weight()
L1388 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local max_weight = actor:get_actor_max_weight()
L1391 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
max_weight = max_weight + (outfit and outfit:get_additional_max_weight() or 0)
L1394 🟡 potential_nil_access
Potential nil access: 'backpack' from :item_in_slot() used without nil check
Impact: low
Show code
max_weight = max_weight + (backpack and backpack:get_additional_max_weight() or 0)
L1397 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:iterate_belt( function(owner, obj)
L1403 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:cast_Actor():conditions():BoosterForEach( function(booster_type, booster_time, booster_value)
L1474 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local item = actor:item_in_slot(i)
L1486 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local outfit = actor:item_in_slot(7)
L1503 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local outfit = actor:item_in_slot(7)
L1504 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local cnt_arty = actor:belt_count()
L1505 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local cnt_arty_slot = outfit and outfit:cast_CustomOutfit():get_artefact_count() or 0
L1509 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local item = i <= cnt_arty and actor:item_on_belt(i-1)
L1544 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local outfit = actor:item_in_slot(7)
L1577 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local helm = actor:item_in_slot(12)
L1605 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:iterate_belt( function(owner, obj)
L1629 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:cast_Actor():conditions():BoosterForEach( function(booster_type, booster_time, booster_value)
L1662 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local power = actor:cast_Actor():conditions():V_SatietyPower() --db.actor.satiety
L1678 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local satiety = actor:cast_Actor():conditions():GetSatiety()
L1964 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
local clsid = obj:clsid()
L2241 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
tot_weight = tot_weight + obj:weight()
L2912 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
local sec = obj:section()
L2913 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
local cond = obj:condition()
L2941 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
inventory_upgrades.effect_repair_item( obj:section(), obj:condition())
L2941 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
inventory_upgrades.effect_repair_item( obj:section(), obj:condition())
L2942 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
obj:set_condition(0.99999)
L2306 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = char_ini:r_line(known_info,i,"","")
L2306 🟡 unused_local_variable
Local variable 'value' is assigned but never used
Impact: low
Show code
local result, id, value = char_ini:r_line(known_info,i,"","")

168- Alternative icons - Strogglet15

1 file (🟢0 🟡0 🔴5 🔵0)

alticons.script

L10 🔴 global_write
Global write: size_adjust
Impact: low
Show code
size_adjust = 0.75
L12 🔴 global_write
Global write: basethrst
Impact: low
Show code
basethrst = actor_status_thirst.create
L19 🔴 global_write
Global write: basesleep
Impact: low
Show code
basesleep = actor_status_sleep.create
L46 🔴 global_write
Global write: ratio
Impact: low
Show code
ratio = (device().height / device().width) / (768 / 1024)
L53 🔴 global_write
Global write: pos
Impact: low
Show code
pos = self.dialog:GetWndPos()

171- Instant tooltip - RavenAscendant

1 file (🟢0 🟡0 🔴1 🔵0)

instant_tooltip.script

L8 🔴 global_write
Global write: delay
Impact: low
Show code
delay = 80 -- change this to adjust delay to all tool tips at once. Make idividual changes below.

173- Parts in tooltip - Demonized

1 file (🟢0 🟡3 🔴2 🔵1)

zz_parts_in_tooltip.script

L7 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(error_or_result)
L20 🔴 global_write
Global write: og_info_item_init
Impact: low
Show code
og_info_item_init = utils_ui.UIInfoItem.__init
L144 🔴 global_write
Global write: og_info_item_update
Impact: low
Show code
og_info_item_update = utils_ui.UIInfoItem.Update
L82 🟡 unused_local_variable
Local variable 'parts_pos' is assigned but never used
Impact: low
Show code
local parts_pos = self.parts:GetWndPos()
L83 🟡 unused_local_variable
Local variable 'parts_size' is assigned but never used
Impact: low
Show code
local parts_size = {x = self.parts:GetWidth(), y = self.parts:GetHeight()}
L176 🟡 unused_local_variable
Local variable 'm_data' is assigned but never used
Impact: low
Show code
local m_data = alife_storage_manager.get_state()

175- Battery Warning - RavenAscendant

1 file (🟢0 🟡0 🔴3 🔵0)

battery_warning.script

L15 🔴 global_write
Global write: lastdev
Impact: low
Show code
lastdev = 0
L45 🔴 global_write
Global write: lastdev
Impact: low
Show code
lastdev = dev:id() --update last device
L47 🔴 global_write
Global write: lastdev
Impact: low
Show code
lastdev = 0 -- if no device active update last device

176- Encyclopedia Messages Restored - RavenAscendant

1 file (🟢1 🟡2 🔴3 🔵0)

zz_Encyclopedia_messages_restored.script

L117 🟢 table_insert_append
table.insert(categories[i].articles, v) -> categories[i].articles[#categories[i].articles+1] = v
Impact: high
Show code
table.insert(categories[i].articles, section)
L14 🔴 global_write
Global write: categories
Impact: low
Show code
categories = {} --not local because it would have been nice not to have to make a duplicate of the table in the base scrip, not that anyone is going to try and modify this.
L23 🔴 global_write
Global write: base_unlock_note
Impact: low
Show code
base_unlock_note = ui_pda_encyclopedia_tab.unlock_note
L48 🔴 global_write
Global write: base_unlock_article
Impact: low
Show code
base_unlock_article = ui_pda_encyclopedia_tab.unlock_article
L115 🟡 unused_local_variable
Local variable 'junk1' is assigned but never used
Impact: low
Show code
local junk1, section, value = ini_ecy:r_line(categories[i].section, j, "", "")
L104 🟡 unused_local_variable
Local variable 'junk2' is assigned but never used
Impact: low
Show code
local junk1, section, junk2 = ini_ecy:r_line(plugin_section, i, "", "")

177- Minimap Toggle - RavenAscendant

1 file (🟢0 🟡0 🔴1 🔵0)

mini_map_toggle_mcm.script

L87 🔴 global_write
Global write: minimap_enabled
Impact: low
Show code
minimap_enabled = ui_options.get("video/hud/show_minimap")

178- Free Zoom - SlowVibe

1 file (🟢2 🟡0 🔴0 🔵0)

Free_ZoomV2.script

L12 🟢 repeated_get_console
get_console called 3x in on_key_press
Impact: low
Show code
local console = get_console()
L21 🟢 repeated_get_console
get_console called 3x in on_key_release
Impact: low
Show code
local console = get_console()

179- Better Stats Bar - Demonized

2 files (🟢3 🟡14 🔴16 🔵3)

better_stats_bars_mcm.script

L1 🔴 global_write
Global write: op
Impact: low
Show code
op = {

zz_ui_inventory_better_stats_bars.script

L316 🟢 table_insert_append
table.insert(damages[k], v) -> damages[k][#damages[k]+1] = v
Impact: high
Show code
table.insert(damages[k], dmg)
L634 🟢 uncached_globals_summary
Cache 2 globals in UpdateStats
Impact: medium
Show code
L642: pairs L689: pairs L656: math.max L701: math.max
L1437 🟢 uncached_globals_summary
Cache 1 globals in UpdateStats
Impact: medium
Show code
L1518: math.ceil L1538: math.ceil
L8 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(error_or_result)
L652 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("UIInventory | can't get cast_CustomOutfit of [%s]", outfit:name())
L697 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("UIInventory | can't get cast_Helmet of [%s]", outfit:name())
L15 🔴 global_write
Global write: alife_time_factor
Impact: low
Show code
alife_time_factor = 6
L16 🔴 global_write
Global write: boosters_table
Impact: low
Show code
boosters_table = {}
L21 🔴 global_write
Global write: food_table
Impact: low
Show code
food_table = {}
L61 🔴 global_write
Global write: ignore_sections
Impact: low
Show code
ignore_sections = { -- Sections to ignore
L264 🔴 global_write
Global write: stat_to_dmg
Impact: low
Show code
stat_to_dmg = {
L290 🔴 global_write
Global write: damage_threshold
Impact: low
Show code
damage_threshold = {
L303 🔴 global_write
Global write: damages
Impact: low
Show code
damages = {}
L304 🔴 global_write
Global write: max_damage
Impact: low
Show code
max_damage = {}
L438 🔴 global_write
Global write: max_damage
Impact: low
Show code
max_damage = t
L515 🔴 global_write
Global write: ui_inventory_init
Impact: low
Show code
ui_inventory_init = ui_inventory.UIInventory.__init
L1363 🔴 global_write
Global write: full_stats_keys
Impact: low
Show code
full_stats_keys = {
L1367 🔴 global_write
Global write: show_full_stats
Impact: low
Show code
show_full_stats = false
L1370 🔴 global_write
Global write: clr_list
Impact: low
Show code
clr_list = {
L1602 🔴 global_write
Global write: show_full_stats
Impact: low
Show code
show_full_stats = true
L1611 🔴 global_write
Global write: show_full_stats
Impact: low
Show code
show_full_stats = false
L648 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local outfit = actor:item_in_slot(7)
L693 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local helm = actor:item_in_slot(12)
L734 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:iterate_belt( function(owner, obj)
L759 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:cast_Actor():conditions():BoosterForEach( function(booster_type, booster_time, booster_value)
L808 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local power = actor:cast_Actor():conditions():V_SatietyPower() --db.actor.satiety
L825 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local satiety = actor:cast_Actor():conditions():GetSatiety()
L833 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local satiety = actor:cast_Actor():conditions():GetSatiety()
L968 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local outfit = actor:item_in_slot(7)
L969 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local helm = actor:item_in_slot(12)
L970 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local power = actor:cast_Actor():conditions():V_SatietyPower() --db.actor.satiety
L984 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local power_loss = (outfit and outfit:cast_CustomOutfit().m_fPowerLoss or 0)
L1184 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local satiety = actor:cast_Actor():conditions():GetSatiety()
L1219 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local satiety = actor:cast_Actor():conditions():GetSatiety()
L1452 🟡 unused_local_variable
Local variable 'cls' is assigned but never used
Impact: low
Show code
local cls = obj:clsid()

181- Ballistics Overhaul (GBOOBS) - Grokitach

3 files (🟢9 🟡17 🔴72 🔵21)

grok_bo.script

L90 🟢 uncached_globals_summary
Cache 1 globals in monster_on_before_hit
Impact: medium
Show code
L146: string.find L201: string.find
L310 🟢 uncached_globals_summary
Cache 2 globals in npc_on_before_hit
Impact: medium
Show code
L358: string.find L379: string.find L467: tonumber L483: tonumber
L119 🟢 repeated_wpn_section()
wpn:section() called 2x in monster_on_before_hit
Impact: low
Show code
Cache wpn:section() result
L140 🟢 repeated_wpn_id()
wpn:id() called 2x in monster_on_before_hit
Impact: low
Show code
Cache wpn:id() result
L326 🟢 repeated_wpn_section()
wpn:section() called 2x in npc_on_before_hit
Impact: low
Show code
Cache wpn:section() result
L352 🟢 repeated_wpn_id()
wpn:id() called 2x in npc_on_before_hit
Impact: low
Show code
Cache wpn:id() result
L132 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/////////// Mutant Hit registered: GBO v1.7.0 //////////////////")
L133 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('%s about to be hit by %s in bone %s', monster and monster:name(), shit and shit.draftsman and shit.draftsman:name(), bone_id)
L137 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('Close quarter combat hit detected')
L228 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Critical Hit!")
L236 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Critical Hit!")
L248 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Critical Hit!")
L256 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Critical Hit!")
L271 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Critical Hit!")
L279 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Critical Hit!")
L288 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Critical Hit!")
L297 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Critical Hit!")
L303 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Barrel condition: %s, GBO output damage: %s", barrel_condition, shit.power)
L345 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/////////// Stalker Hit registered: GBO v1.7.0 //////////////////")
L346 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('%s about to be hit by %s in bone %s', npc and npc:name(), shit and shit.draftsman and shit.draftsman:name(), bone_id)
L414 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Sniper hit, redirecting to torso")
L426 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Knife hit, redirecting to torso")
L461 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Custom bone found. Loading custom_bone values")
L472 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("NPC visual model: %s",npc_viz)
L515 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('%s shot with %s, Weapon power= %s, AP power= %s, Hit multiplier= %s, Air res= %s, Distance= %s m, Barrel condition: %s', ammo_section, sec, wpn_hit_power, k_ap, k_hit, air_res, dist, barrel_condition)
L516 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('Bone hit= %s, Bone damage mult= %s, Bone AP scale= %s, Bone hit fraction= %s, Bone armor= %s', custom_bone_name, custom_bone_dmg[custom_bone_id], custom_bone_ap[custom_bone_id], custom_bone_hf[custom_bone_id], custom_bone_value[custom_bone_id])
L563 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Real AP power= %s, Bone armor after hit= %s, Damages inflicted= %s, Remaining health= %s", k_ap, custom_bone_value[custom_bone_id], shit.power, life_remove)
L1 🔴 global_write
Global write: custom_bone_value
Impact: low
Show code
custom_bone_value = {} -- this a table with each identifier being npcid_boneid, these returns custom bonearmor value. It is filled, alongside the other custom tables, after every new bone hit
L2 🔴 global_write
Global write: custom_bone_ap
Impact: low
Show code
custom_bone_ap = {}
L3 🔴 global_write
Global write: custom_bone_hf
Impact: low
Show code
custom_bone_hf = {}
L4 🔴 global_write
Global write: custom_bone_dmg
Impact: low
Show code
custom_bone_dmg = {}
L5 🔴 global_write
Global write: ini_capture
Impact: low
Show code
ini_capture = ini_file("creatures\\grok_bo_models_capture.ltx")
L6 🔴 global_write
Global write: ini_bones
Impact: low
Show code
ini_bones = ini_file("creatures\\grok_bo_bone_profiles.ltx")
L7 🔴 global_write
Global write: ini_damage
Impact: low
Show code
ini_damage = ini_file("creatures\\damages.ltx")
L9 🔴 global_write
Global write: leg_meta_sniper_null
Impact: low
Show code
leg_meta_sniper_null = 1
L10 🔴 global_write
Global write: sniper_bad_bone_shit_reduce
Impact: low
Show code
sniper_bad_bone_shit_reduce = 1
L12 🔴 global_write
Global write: Bone_IDs
Impact: low
Show code
Bone_IDs = {
L40 🔴 global_write
Global write: stalker_damage
Impact: low
Show code
stalker_damage = {
L105 🔴 global_write
Global write: wpn
Impact: low
Show code
wpn = level.object_by_id(shit.weapon_id)
L119 🔴 global_write
Global write: sec
Impact: low
Show code
sec = wpn:section()
L126 🔴 global_write
Global write: cqc_mult
Impact: low
Show code
cqc_mult = 1
L127 🔴 global_write
Global write: mutant_mult
Impact: low
Show code
mutant_mult = 0.90
L128 🔴 global_write
Global write: ammo_mult
Impact: low
Show code
ammo_mult = 0.85
L129 🔴 global_write
Global write: spec_monster_mult
Impact: low
Show code
spec_monster_mult = 1.00
L130 🔴 global_write
Global write: bone_mult
Impact: low
Show code
bone_mult = 1.00
L136 🔴 global_write
Global write: cqc_mult
Impact: low
Show code
cqc_mult = 8
L160 🔴 global_write
Global write: ammo_mult
Impact: low
Show code
ammo_mult = 0.78
L164 🔴 global_write
Global write: ammo_mult
Impact: low
Show code
ammo_mult = 1.40
L168 🔴 global_write
Global write: ammo_mult
Impact: low
Show code
ammo_mult = 2.50
L175 🔴 global_write
Global write: ammo_mult
Impact: low
Show code
ammo_mult = 1.00
L179 🔴 global_write
Global write: ammo_mult
Impact: low
Show code
ammo_mult = 1.10
L183 🔴 global_write
Global write: ammo_mult
Impact: low
Show code
ammo_mult = 2.30
L187 🔴 global_write
Global write: ammo_mult
Impact: low
Show code
ammo_mult = 1.25
L191 🔴 global_write
Global write: ammo_mult
Impact: low
Show code
ammo_mult = 1.20
L196 🔴 global_write
Global write: barrel_condition
Impact: low
Show code
barrel_condition = nil
L197 🔴 global_write
Global write: barrel_condition_corrected
Impact: low
Show code
barrel_condition_corrected = nil
L202 🔴 global_write
Global write: barrel_condition
Impact: low
Show code
barrel_condition = v / 100
L207 🔴 global_write
Global write: barrel_condition
Impact: low
Show code
barrel_condition = 1
L210 🔴 global_write
Global write: barrel_condition
Impact: low
Show code
barrel_condition = 1
L213 🔴 global_write
Global write: barrel_condition_corrected
Impact: low
Show code
barrel_condition_corrected = barrel_condition * 1.6
L216 🔴 global_write
Global write: barrel_condition_corrected
Impact: low
Show code
barrel_condition_corrected = 1
L219 🔴 global_write
Global write: barrel_condition
Impact: low
Show code
barrel_condition = 1
L220 🔴 global_write
Global write: barrel_condition_corrected
Impact: low
Show code
barrel_condition_corrected = 1
L225 🔴 global_write
Global write: spec_monster_mult
Impact: low
Show code
spec_monster_mult = 2.00
L227 🔴 global_write
Global write: bone_mult
Impact: low
Show code
bone_mult = 2.50
L233 🔴 global_write
Global write: spec_monster_mult
Impact: low
Show code
spec_monster_mult = 0.85
L235 🔴 global_write
Global write: bone_mult
Impact: low
Show code
bone_mult = 2.00
L241 🔴 global_write
Global write: spec_monster_mult
Impact: low
Show code
spec_monster_mult = 0.90
L245 🔴 global_write
Global write: spec_monster_mult
Impact: low
Show code
spec_monster_mult = 0.85
L247 🔴 global_write
Global write: bone_mult
Impact: low
Show code
bone_mult = 1.40
L253 🔴 global_write
Global write: spec_monster_mult
Impact: low
Show code
spec_monster_mult = 0.85
L255 🔴 global_write
Global write: bone_mult
Impact: low
Show code
bone_mult = 1.60
L261 🔴 global_write
Global write: spec_monster_mult
Impact: low
Show code
spec_monster_mult = 0.90
L263 🔴 global_write
Global write: bone_mult
Impact: low
Show code
bone_mult = 1.30
L268 🔴 global_write
Global write: spec_monster_mult
Impact: low
Show code
spec_monster_mult = 0.80
L270 🔴 global_write
Global write: bone_mult
Impact: low
Show code
bone_mult = 2.00
L276 🔴 global_write
Global write: spec_monster_mult
Impact: low
Show code
spec_monster_mult = 0.95
L278 🔴 global_write
Global write: bone_mult
Impact: low
Show code
bone_mult = 2.00
L285 🔴 global_write
Global write: spec_monster_mult
Impact: low
Show code
spec_monster_mult = 0.85
L287 🔴 global_write
Global write: bone_mult
Impact: low
Show code
bone_mult = 1.50
L294 🔴 global_write
Global write: spec_monster_mult
Impact: low
Show code
spec_monster_mult = 0.65
L296 🔴 global_write
Global write: bone_mult
Impact: low
Show code
bone_mult = 2.00
L325 🔴 global_write
Global write: wpn
Impact: low
Show code
wpn = level.object_by_id(shit.weapon_id)
L326 🔴 global_write
Global write: sec
Impact: low
Show code
sec = wpn:section()
L374 🔴 global_write
Global write: barrel_condition
Impact: low
Show code
barrel_condition = nil
L375 🔴 global_write
Global write: barrel_condition_corrected
Impact: low
Show code
barrel_condition_corrected = nil
L380 🔴 global_write
Global write: barrel_condition
Impact: low
Show code
barrel_condition = v / 100
L385 🔴 global_write
Global write: barrel_condition
Impact: low
Show code
barrel_condition = 1
L388 🔴 global_write
Global write: barrel_condition
Impact: low
Show code
barrel_condition = 1
L391 🔴 global_write
Global write: barrel_condition_corrected
Impact: low
Show code
barrel_condition_corrected = barrel_condition * 1.3
L394 🔴 global_write
Global write: barrel_condition_corrected
Impact: low
Show code
barrel_condition_corrected = 1
L397 🔴 global_write
Global write: barrel_condition
Impact: low
Show code
barrel_condition = 1
L398 🔴 global_write
Global write: barrel_condition_corrected
Impact: low
Show code
barrel_condition_corrected = 1
L413 🔴 global_write
Global write: sniper_bad_bone_shit_reduce
Impact: low
Show code
sniper_bad_bone_shit_reduce = 0.9
L417 🔴 global_write
Global write: leg_meta_sniper_null
Impact: low
Show code
leg_meta_sniper_null = 0
L481 🔴 global_write
Global write: ini_npc_armor
Impact: low
Show code
ini_npc_armor = ini_file(npc_armor_path)
L484 🔴 global_write
Global write: npc_bone_profile_name
Impact: low
Show code
npc_bone_profile_name = ini_bones:r_string(npc_armor_section,"head_profile")
L486 🔴 global_write
Global write: npc_bone_profile_name
Impact: low
Show code
npc_bone_profile_name = ini_bones:r_string(npc_armor_section,"bone_profile")
L561 🔴 global_write
Global write: life_remove
Impact: low
Show code
life_remove = npc.health - shit.power
L119 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
sec = wpn:section()
L140 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
local wpn_id = wpn:id()
L141 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
local ammo_type_number = wpn:get_ammo_type()
L195 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
if (IsWeapon(wpn) and (not IsItem("fake_ammo_wpn",wpn:section()))) or (wpn:parent() and wpn:parent():id() ~= 0) then
L195 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
if (IsWeapon(wpn) and (not IsItem("fake_ammo_wpn",wpn:section()))) or (wpn:parent() and wpn:parent():id() ~= 0) then
L195 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
if (IsWeapon(wpn) and (not IsItem("fake_ammo_wpn",wpn:section()))) or (wpn:parent() and wpn:parent():id() ~= 0) then
L198 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
local parts = se_load_var(wpn:id(), wpn:name(), "parts")
L198 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
local parts = se_load_var(wpn:id(), wpn:name(), "parts")
L326 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
sec = wpn:section()
L352 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
local wpn_id = wpn:id()
L353 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
local ammo_type_number = wpn:get_ammo_type()
L373 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
if (IsWeapon(wpn) and (not IsItem("fake_ammo_wpn",wpn:section()))) or (wpn:parent() and wpn:parent():id() ~= 0) then
L373 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
if (IsWeapon(wpn) and (not IsItem("fake_ammo_wpn",wpn:section()))) or (wpn:parent() and wpn:parent():id() ~= 0) then
L373 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
if (IsWeapon(wpn) and (not IsItem("fake_ammo_wpn",wpn:section()))) or (wpn:parent() and wpn:parent():id() ~= 0) then
L376 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
local parts = se_load_var(wpn:id(), wpn:name(), "parts")
L376 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
local parts = se_load_var(wpn:id(), wpn:name(), "parts")

grok_bo_eft_hit_effects.script

L8 🟡 potential_nil_access
Potential nil access: 'ply' from db.actor() used without nil check
Impact: low
Show code
if not ( ply and ply:alive() ) then return end

grok_bo_enhanced_recoil.script

L106 🟢 table_insert_append
table.insert(anims, v) -> anims[#anims+1] = v
Impact: high
Show code
table.insert(anims,{e = i,d = v[2] or math.random(0,1),c = cnt})
L4 🟢 uncached_globals_summary
Cache 1 globals in parse_anims
Impact: medium
Show code
L18: tonumber L31: tonumber
L62 🟢 uncached_globals_summary
Cache 1 globals in shoot_effect
Impact: medium
Show code
L76: math.random L81: math.random

184- Body Health System - Grokitach

4 files (🟢14 🟡40 🔴37 🔵21)

ab_move_notification.script

L1 🔴 global_write
Global write: notify_icon_x
Impact: low
Show code
notify_icon_x = 13
L2 🔴 global_write
Global write: notify_icon_y
Impact: low
Show code
notify_icon_y = 620
L5 🔴 global_write
Global write: monkey
Impact: low
Show code
monkey = actor_menu.set_notification
L11 🔴 global_write
Global write: cs
Impact: low
Show code
cs = hud:GetCustomStatic("notify_icon")
L12 🔴 global_write
Global write: pos
Impact: low
Show code
pos = cs:wnd():GetWndPos()

itms_manager.script

L197 🟢 uncached_globals_summary
Cache 1 globals in actor_on_first_update
Impact: medium
Show code
L212: pairs L234: pairs
L262 🟢 uncached_globals_summary
Cache 1 globals in actor_on_item_use
Impact: medium
Show code
L293: math.random L296: math.random
L636 🟢 uncached_globals_summary
Cache 1 globals in use_watch
Impact: medium
Show code
L639: tostring L649: tostring
L1161 🟢 uncached_globals_summary
Cache 1 globals in update
Impact: medium
Show code
L1163: pairs L1192: pairs
L333 🟢 repeated_obj_id()
obj:id() called 2x in actor_on_item_take
Impact: low
Show code
Cache obj:id() result
L713 🟢 repeated_wpn_section()
wpn:section() called 3x in new_game_equippment
Impact: low
Show code
Cache wpn:section() result
L1306 🟢 repeated_alife
alife called 3x in Create_Item
Impact: low
Show code
local sim = alife()
L78 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR item_combination | wrong section names")
L705 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("- Autosaved new game")
L1008 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: relocate_item_to_actor | object for section [%s] is bugged!", section)
L1063 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR: Couldn't relocate_item_from_actor | not enough item [%s] recolated! need %s more", section, cnt)
L1095 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR itms_manager | play_item_sound | no object recieved!")
L1167 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("* ItemProcessor | processing condition | id: %s - con: %s", id, con)
L1177 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("# ItemProcessor | processing condition done | id: %s - con: %s", id, new_con)
L1196 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("* ItemProcessor | processing uses | id: %s - uses: %s", id, uses)
L1205 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("# ItemProcessor | processing uses done | id: %s - con: %s", id, uses)
L1224 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("* ItemProcessor | processing ammo | id: %s - ammo: %s", id, ammo)
L1233 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("# ItemProcessor | processing ammo done | id: %s - con: %s", id, new_con)
L1282 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ItemProcessor | Missing spawn properties for [%s] | Spawn type: %s | pos: %s, lvi: %s, gvi: %s", section, spawn_typ, pos , lvi , gvi)
L1316 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/ alife_create [%s] (%s) x%s ammo %s", section, se_ammo and se_ammo.id, num_in_box, spawn_typ)
L1325 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/ alife_create [%s] (%s) x%s ammo %s", section, se_ammo and se_ammo.id, num, spawn_typ)
L1340 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/ alife_create [%s] (%s) on %s", section, se_itm and se_itm.id, spawn_typ)
L1344 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ItemProcessor | Missing spawn owner for [%s]!", section)
L1383 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR [%s] is not spawned by ItemProcessor",section)
L1387 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ItemProcessor | section [%s] doesn't exist!", section)
L1391 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ ItemProcessor | nothing is passed to process!")
L1426 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s ItemProcessor | %s: (%s) [%s] - owner: (%s) [%s]", mark, str, id, obj and obj:section(), p and p:id() or "-", p and p:section())
L27 🔴 global_write
Global write: ini_manager
Impact: low
Show code
ini_manager = ini_file("items\\settings\\itms_manager.ltx")
L28 🔴 global_write
Global write: ini_container
Impact: low
Show code
ini_container = ini_file("items\\settings\\arty_container.ltx")
L29 🔴 global_write
Global write: ini_parts
Impact: low
Show code
ini_parts = ini_file("items\\settings\\parts.ltx")
L30 🔴 global_write
Global write: ini_craft
Impact: low
Show code
ini_craft = ini_file("items\\settings\\craft.ltx")
L31 🔴 global_write
Global write: ini_death
Impact: low
Show code
ini_death = ini_file("items\\settings\\death_generic.ltx")
L32 🔴 global_write
Global write: ini_reward
Impact: low
Show code
ini_reward = ini_file("items\\settings\\item_rewards.ltx")
L40 🔴 global_write
Global write: itms_arty_container
Impact: low
Show code
itms_arty_container = utils_data.collect_section(ini_container,"containers",true) or {}
L51 🔴 global_write
Global write: item_rewards
Impact: low
Show code
item_rewards = {}
L66 🔴 global_write
Global write: item_combine
Impact: low
Show code
item_combine = {}
L529 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L537 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L544 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L657 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then
L1310 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
se_tbl[#se_tbl+1] = sim:create_ammo(section, pos, lvi, gvi, p_id, num_in_box)
L1320 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
se_tbl[#se_tbl+1] = sim:create_ammo(section, pos, lvi, gvi, p_id, num)
L1425 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
local p = obj and obj:parent()
L100 🟡 unused_local_variable
Local variable 'booster_string' is assigned but never used
Impact: low
Show code
local booster_string = {
L325 🟡 unused_local_variable
Local variable 'str_itm_taken' is assigned but never used
Impact: low
Show code
local str_itm_taken = game.translate_string("st_item_taken")
L338 🟡 unused_local_variable
Local variable 'fuel' is assigned but never used
Impact: low
Show code
local fuel = tostring(math.random(6,8))
L637 🟡 unused_local_variable
Local variable 'Y' is assigned but never used
Impact: low
Show code
local Y, M, D, h, mint, sec, ms = game.get_game_time():get()
L637 🟡 unused_local_variable
Local variable 'M' is assigned but never used
Impact: low
Show code
local Y, M, D, h, mint, sec, ms = game.get_game_time():get()
L637 🟡 unused_local_variable
Local variable 'D' is assigned but never used
Impact: low
Show code
local Y, M, D, h, mint, sec, ms = game.get_game_time():get()
L637 🟡 unused_local_variable
Local variable 'ms' is assigned but never used
Impact: low
Show code
local Y, M, D, h, mint, sec, ms = game.get_game_time():get()

zzz_player_injuries.script

L630 🟢 uncached_globals_summary
Cache 1 globals in actor_on_hit_callback
Impact: medium
Show code
L634: math.random L643: math.random
L772 🟢 uncached_globals_summary
Cache 1 globals in HUDUpdate
Impact: medium
Show code
L813: pairs L945: pairs
L1018 🟢 uncached_globals_summary
Cache 1 globals in ParamBar
Impact: medium
Show code
L1029: tostring L1066: tostring
L1190 🟢 uncached_globals_summary
Cache 1 globals in actor_on_footstep
Impact: medium
Show code
L1208: math.random L1213: math.random
L1450 🟢 uncached_globals_summary
Cache 1 globals in actor_on_update
Impact: medium
Show code
L1463: pairs L1468: pairs
L780 🟢 repeated_get_hud
get_hud called 4x in HUDUpdate
Impact: low
Show code
local hud = get_hud()
L1501 🟢 repeated_device
device called 2x in actor_on_update
Impact: low
Show code
local dev = device()
L347 🟡 string_concat_in_loop
String concat in loop: msg = msg .. x
Impact: critical
Show code
msg=msg.." "
L806 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str=str.." \\n"
L833 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str=str.."•"
L837 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str=str.."•"
L841 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str=str.."•"
L863 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str=str.."•"
L867 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str=str.."•"
L880 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str=str.."•"
L884 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str=str.."•"
L895 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str=str.."•"
L899 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str=str.."•"
L903 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str=str.."•"
L909 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str=str.."•"
L913 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str=str.."•"
L917 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str=str.."•"
L922 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str=str.."•"
L925 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str = str..colors[GetConditionFromFloat(health[array2]/maxhp[array2],array2)]
L631 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! actor got hit in %s", bone_id)
L74 🔴 global_write
Global write: maxhp
Impact: low
Show code
maxhp={}
L82 🔴 global_write
Global write: health
Impact: low
Show code
health={}
L90 🔴 global_write
Global write: preview
Impact: low
Show code
preview={}
L109 🔴 global_write
Global write: timedhp
Impact: low
Show code
timedhp={}
L117 🔴 global_write
Global write: hud_blink_timer
Impact: low
Show code
hud_blink_timer={}
L126 🔴 global_write
Global write: medkits
Impact: low
Show code
medkits={}
L145 🔴 global_write
Global write: healhelp
Impact: low
Show code
healhelp={}
L653 🔴 global_write
Global write: text
Impact: low
Show code
text=hitboxes[bone_id]
L664 🔴 global_write
Global write: text
Impact: low
Show code
text=hitboxes[bone_id]
L1188 🔴 global_write
Global write: cooldown
Impact: low
Show code
cooldown = 2500
L1189 🔴 global_write
Global write: state_cooldown
Impact: low
Show code
state_cooldown = 0
L1249 🔴 global_write
Global write: muffle
Impact: low
Show code
muffle = "m_"
L1251 🔴 global_write
Global write: muffle
Impact: low
Show code
muffle = ""
L1258 🔴 global_write
Global write: file_to_say
Impact: low
Show code
file_to_say = sound_object( file )
L1263 🔴 global_write
Global write: state_cooldown
Impact: low
Show code
state_cooldown = time_global() + cooldown
L1265 🔴 global_write
Global write: actor_health
Impact: low
Show code
actor_health = db.actor.health
L1266 🔴 global_write
Global write: actor_health_reduced
Impact: low
Show code
actor_health_reduced = actor_health - hit_power
L1373 🔴 global_write
Global write: old_is_actor_not_healthy
Impact: low
Show code
old_is_actor_not_healthy = dialogs.is_actor_not_healthy
L1384 🔴 global_write
Global write: old_is_actor_injured
Impact: low
Show code
old_is_actor_injured = dialogs.is_actor_injured
L1395 🔴 global_write
Global write: old_is_actor_injured_irradiated
Impact: low
Show code
old_is_actor_injured_irradiated = dialogs.is_actor_injured_irradiated
L1428 🔴 global_write
Global write: old_heal_actor_injury_radiation
Impact: low
Show code
old_heal_actor_injury_radiation = dialogs.heal_actor_injury_radiation
L1439 🔴 global_write
Global write: old_heal_actor_injury
Impact: low
Show code
old_heal_actor_injury = dialogs.heal_actor_injury
L391 🟡 potential_nil_access
Potential nil access: 'item_in_slot' from :item_in_slot() used without nil check
Impact: low
Show code
local section_name = item_in_slot:section()
L419 🟡 potential_nil_access
Potential nil access: 'item_in_slot' from :item_in_slot() used without nil check
Impact: low
Show code
if item_in_slot:weapon_is_scope() then
L195 🟡 unused_local_variable
Local variable 'playername' is assigned but never used
Impact: low
Show code
local playername
L340 🟡 unused_local_variable
Local variable 'stamina' is assigned but never used
Impact: low
Show code
local stamina=db.actor.power
L441 🟡 unused_local_variable
Local variable 'sprint_coef' is assigned but never used
Impact: low
Show code
local sprint_coef = 0.0625 * legs_summ + 0.375
L517 🟡 unused_local_variable
Local variable 'volume_sound_x' is assigned but never used
Impact: low
Show code
local volume_sound_x = get_console_cmd(2,"snd_volume_eff")
L967 🟡 unused_local_variable
Local variable 'green' is assigned but never used
Impact: low
Show code
local green = math.floor(255 * ((100 - 100)/100))
L968 🟡 unused_local_variable
Local variable 'red' is assigned but never used
Impact: low
Show code
local red = math.floor(255 * (100/100))
L1228 🟡 unused_local_variable
Local variable 'low_cr' is assigned but never used
Impact: low
Show code
local low_cr = cr and IsMoveState('mcAccel')

zzz_player_injuries_mcm.script

L20 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "body_health_system",sh=true ,gr={

185- Shader Driven Scopes - CrookR

2 files (🟢2 🟡5 🔴1 🔵3)

fakelens.script

L55 🟢 repeated_wpn_id()
wpn:id() called 5x in updateScope
Impact: low
Show code
Cache wpn:id() result
L98 🟢 repeated_get_console
get_console called 2x in actor_on_update
Impact: low
Show code
local console = get_console()
L32 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("--" .. wpn:id() .. "--")
L33 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("scope: " .. scopeState .. " | sensitivity: " .. ui_options.get("control/general/mouse_sens"))
L34 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("factor: " .. tostring(zf / sf) .. " | base zoom: " .. tostring(scopeBaseFactors[wpn:id()]))
L25 🟡 potential_nil_access
Potential nil access: 'ply' from db.actor() used without nil check
Impact: low
Show code
if not ( ply and ply:alive() ) then return end
L28 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
local cweapon = wpn:cast_Weapon()
L32 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
printf("--" .. wpn:id() .. "--")
L34 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
printf("factor: " .. tostring(zf / sf) .. " | base zoom: " .. tostring(scopeBaseFactors[wpn:id()]))
L40 🟡 potential_nil_access
Potential nil access: 'ply' from db.actor() used without nil check
Impact: low
Show code
if not ( ply and ply:alive() ) then return end

scopeRadii.script

L4 🔴 global_write
Global write: scopeRadii
Impact: low
Show code
scopeRadii = {

186- Shader Driven Scopes BAS patch - CrookR

1 file (🟢0 🟡0 🔴1 🔵0)

scopeRadii.script

L4 🔴 global_write
Global write: scopeRadii
Impact: low
Show code
scopeRadii = {

189- Beef's NVG - theRealBeef

3 files (🟢9 🟡29 🔴28 🔵6)

item_device.script

L237 🟢 uncached_globals_summary
Cache 1 globals in on_key_release
Impact: medium
Show code
L270: math.floor L270: math.floor
L942 🟢 uncached_globals_summary
Cache 1 globals in process_flicker
Impact: medium
Show code
L954: math.random L955: math.random
L63 🟢 repeated_device
device called 4x in <global>
Impact: low
Show code
local dev = device()
L139 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR item_device | reading from items\\settings\\devices.ltx | section [%s] or power consumption values don't exist", sec)
L154 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("item_device | %s | " .. txt, time_global(), ...)
L226 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("beef - key on-press")
L231 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("beef - time event fired for nvg turn-on")
L248 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("beef - key on-release")
L252 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("beef - brightness adjust")
L18 🔴 global_write
Global write: dev_consumption
Impact: low
Show code
dev_consumption = {} -- [sec] = {...} | Power consumption of device per stage
L19 🔴 global_write
Global write: dev_consumption_act
Impact: low
Show code
dev_consumption_act = {} -- [sec] = {...} | Power consumption of device per action (stage 2)
L20 🔴 global_write
Global write: dev_consumption_tot
Impact: low
Show code
dev_consumption_tot = {} -- [sec] = num | Total power consumption of a device
L21 🔴 global_write
Global write: dev_critical
Impact: low
Show code
dev_critical = {} -- [sec] = num | Power limit, devices go off when their power go below this value
L40 🔴 global_write
Global write: devices
Impact: low
Show code
devices = {}
L41 🔴 global_write
Global write: device_battery
Impact: low
Show code
device_battery = nil
L42 🔴 global_write
Global write: device_geiger
Impact: low
Show code
device_geiger = nil
L43 🔴 global_write
Global write: device_npc_pda
Impact: low
Show code
device_npc_pda = {}
L61 🔴 global_write
Global write: nv_state
Impact: low
Show code
nv_state = false -- make nv_state a global variable so we can access it from beefs_nvgs
L78 🔴 global_write
Global write: dosimeter_env_rads_mode
Impact: low
Show code
dosimeter_env_rads_mode = false
L93 🔴 global_write
Global write: device_battery
Impact: low
Show code
device_battery = ini_device:r_sec_ex("settings","battery","batteries_dead")
L94 🔴 global_write
Global write: device_geiger
Impact: low
Show code
device_geiger = ini_device:r_sec_ex("settings","geiger","detector_geiger")
L264 🔴 global_write
Global write: dosimeter_env_rads_mode
Impact: low
Show code
dosimeter_env_rads_mode = not dosimeter_env_rads_mode
L265 🔴 global_write
Global write: dosimeter_mode_string
Impact: low
Show code
dosimeter_mode_string = dosimeter_env_rads_mode and game.translate_string("st_environment_rads") or game.translate_string("st_actor_rads")
L618 🔴 global_write
Global write: nv_state
Impact: low
Show code
nv_state = true
L624 🔴 global_write
Global write: nv_state
Impact: low
Show code
nv_state = false
L230 🟡 potential_nil_access
Potential nil access: 'torch' from :item_in_slot() used without nil check
Impact: low
Show code
set_nightvision(torch and torch:section(), not nv_state)
L310 🟡 potential_nil_access
Potential nil access: 'pda' from :item_in_slot() used without nil check
Impact: low
Show code
if pda and (not temp_con[pda:id()]) then
L316 🟡 potential_nil_access
Potential nil access: 'det' from :item_in_slot() used without nil check
Impact: low
Show code
if det and (not temp_con[det:id()]) then
L322 🟡 potential_nil_access
Potential nil access: 'torch' from :item_in_slot() used without nil check
Impact: low
Show code
if torch and (not temp_con[torch:id()]) then
L333 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if (p and p:id() == AC_ID) then
L383 🟡 potential_nil_access
Potential nil access: 'obj' from :item_in_slot() used without nil check
Impact: low
Show code
if obj and IsItem("device",obj:section()) then
L390 🟡 potential_nil_access
Potential nil access: 'torch' from :item_in_slot() used without nil check
Impact: low
Show code
if torch and torch:torch_enabled() then
L446 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L457 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then
L550 🟡 potential_nil_access
Potential nil access: 'torch' from :item_in_slot() used without nil check
Impact: low
Show code
local id = torch and torch:id()
L594 🟡 potential_nil_access
Potential nil access: 'torch' from :item_in_slot() used without nil check
Impact: low
Show code
local torch_sec = torch and torch:section()
L657 🟡 potential_nil_access
Potential nil access: 'pda' from :item_in_slot() used without nil check
Impact: low
Show code
if actor_only and device_npc_pda[pda:section()] then
L722 🟡 potential_nil_access
Potential nil access: 'parent' from :parent() used without nil check
Impact: low
Show code
if parent and (parent:id() ~= AC_ID) then
L145 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, sec, value = ini_device:r_line_ex("npc_pda",i,"","")

z_beefs_nvgs.script

L84 🟢 uncached_globals_summary
Cache 2 globals in pack_nvg_data
Impact: medium
Show code
L86: tostring L87: tostring L88: math.floor L89: math.floor
L98 🟢 uncached_globals_summary
Cache 1 globals in pack_nvg_data_2
Impact: medium
Show code
L100: tostring L101: tostring
L113 🟢 repeated_get_console
get_console called 3x in update_nvgs
Impact: low
Show code
local console = get_console()
L194 🟢 repeated_itm_section()
itm:section() called 3x in item_device.set_nightvision
Impact: low
Show code
Cache itm:section() result
L208 🟢 repeated_get_console
get_console called 4x in item_device.set_nightvision
Impact: low
Show code
local console = get_console()
L432 🟢 repeated_get_console
get_console called 4x in actor_on_weapon_zoom_in
Impact: low
Show code
local console = get_console()
L69 🔴 global_write
Global write: nvg_num_tubes_gen1
Impact: low
Show code
nvg_num_tubes_gen1 = z_beefs_nvgs_mcm.get_config("nvg_gen1_tubes_mcm")
L73 🔴 global_write
Global write: nvg_mode_gen2
Impact: low
Show code
nvg_mode_gen2 = z_beefs_nvgs_mcm.get_config("nvg_gen2_mode_mcm")
L74 🔴 global_write
Global write: nvg_mode_gen3
Impact: low
Show code
nvg_mode_gen3 = z_beefs_nvgs_mcm.get_config("nvg_gen3_mode_mcm")
L428 🔴 global_write
Global write: zoom_type
Impact: low
Show code
zoom_type = wpn:cast_Weapon():GetZoomType()
L468 🔴 global_write
Global write: zoom_type
Impact: low
Show code
zoom_type = nil
L527 🔴 global_write
Global write: tg
Impact: low
Show code
tg = time_global()
L563 🔴 global_write
Global write: zoom_type
Impact: low
Show code
zoom_type = wpn:cast_Weapon():GetZoomType()
L564 🔴 global_write
Global write: zoomed
Impact: low
Show code
zoomed = wpn:cast_Weapon():IsZoomed()
L565 🔴 global_write
Global write: scoped
Impact: low
Show code
scoped = wpn:cast_Weapon():IsScopeAttached()
L612 🔴 global_write
Global write: zoom_type
Impact: low
Show code
zoom_type = wpn:cast_Weapon():GetZoomType()
L613 🔴 global_write
Global write: scoped_weapon_is_zoomed
Impact: low
Show code
scoped_weapon_is_zoomed = wpn and IsWeapon(wpn) and wpn:weapon_is_scope()
L194 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
local hud = ini_sys:r_string_ex(itm:section(),"hud") or "hud_base"
L199 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
local kind = ini_sys:r_string_ex(itm:section(),"kind") or nil
L200 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
local class = ini_sys:r_string_ex(itm:section(),"class") or nil
L428 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check (auto-fixable)
Impact: low
Show code
zoom_type = wpn:cast_Weapon():GetZoomType()
L437 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if wpn:weapon_scope_status() == 2 then
L438 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if wpn:weapon_is_scope() then
L440 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
scopeName = utils_item.get_param(scope, wpn:id(), "scope_texture", "string")
L443 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
scopeName = utils_item.get_param(wpn:section(), wpn:id(), "scope_texture", "string")
L443 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
scopeName = utils_item.get_param(wpn:section(), wpn:id(), "scope_texture", "string")
L563 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
zoom_type = wpn:cast_Weapon():GetZoomType()
L564 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
zoomed = wpn:cast_Weapon():IsZoomed()
L565 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
scoped = wpn:cast_Weapon():IsScopeAttached()
L612 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check (auto-fixable)
Impact: low
Show code
zoom_type = wpn:cast_Weapon():GetZoomType()
L613 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
scoped_weapon_is_zoomed = wpn and IsWeapon(wpn) and wpn:weapon_is_scope()
L43 🟡 unused_local_variable
Local variable 'snd_headlamp' is assigned but never used
Impact: low
Show code
local snd_headlamp = sound_object('interface\\inv_torch')

z_beefs_nvgs_mcm.script

L23 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "beef_nvg",sh=true ,gr={

19- Horror Overhaul - DesmanMetzger

2 files (🟢3 🟡7 🔴5 🔵0)

psi_storm_manager.script

L123 🟢 uncached_globals_summary
Cache 1 globals in new_psi_storm_time
Impact: medium
Show code
L127: math.floor L132: math.floor
L193 🟢 uncached_globals_summary
Cache 1 globals in finish
Impact: medium
Show code
L206: pairs L216: pairs
L19 🔴 global_write
Global write: PsiStormManager
Impact: low
Show code
PsiStormManager = nil
L21 🔴 global_write
Global write: PsiStormManager
Impact: low
Show code
PsiStormManager = PsiStormManager or CPsiStormManager()
L507 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
se_npc = sim:object(id)
L509 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
squad = squad_id and sim:object(squad_id)
L545 🟡 potential_nil_access
Potential nil access: 'crow' from level.object_by_id() used without nil check
Impact: low
Show code
if(crow and crow:alive() and distance_2d(pos, crow:position())<25) then
L545 🟡 potential_nil_access
Potential nil access: 'crow' from level.object_by_id() used without nil check
Impact: low
Show code
if(crow and crow:alive() and distance_2d(pos, crow:position())<25) then
L29 🟡 unused_local_variable
Local variable 'prev_game_sec' is assigned but never used
Impact: low
Show code
local prev_game_sec = -1
L31 🟡 unused_local_variable
Local variable 'diff_game_sec' is assigned but never used
Impact: low
Show code
local diff_game_sec = -1
L563 🟡 unused_local_variable
Local variable 'time' is assigned but never used
Impact: low
Show code
local time = 0

sr_psy_antenna.script

L123 🟢 uncached_globals_summary
Cache 1 globals in generate_phantoms
Impact: medium
Show code
L128: math.random L132: math.random
L8 🔴 global_write
Global write: psy_antenna
Impact: low
Show code
psy_antenna = false
L446 🔴 global_write
Global write: psy_antenna
Impact: low
Show code
psy_antenna = PsyAntenna()
L456 🔴 global_write
Global write: psy_antenna
Impact: low
Show code
psy_antenna = PsyAntenna()

190- Screen Space Shaders 15.0 - Ascii1457

9 files (🟢2 🟡6 🔴15 🔵0)

ssfx_001_mcm.script

L8 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "general", sh=true, text="ui_mcm_ssfx_module_general", gr ={

ssfx_001_settings.script

L7 🔴 global_write
Global write: ssfx_default_settings
Impact: low
Show code
ssfx_default_settings = {

ssfx_interactive_grass_mcm.script

L8 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "inter_grass", sh=true, text="ui_mcm_ssfx_module_inter_grass", gr ={

ssfx_interactive_grass_settings.script

L8 🔴 global_write
Global write: ssfx_default_settings
Impact: low
Show code
ssfx_default_settings =

ssfx_shadow_cascades_mcm.script

L8 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "shw_cascades", sh=true, text="ui_mcm_ssfx_module_shw_cascades", gr ={

ssfx_shadow_cascades_settings.script

L8 🔴 global_write
Global write: ssfx_default_settings
Impact: low
Show code
ssfx_default_settings =

ssfx_weapons_dof.script

L284 🟢 repeated_itm_section()
itm:section() called 2x in actor_on_update
Impact: low
Show code
Cache itm:section() result
L452 🟢 repeated_get_console
get_console called 4x in on_option_change
Impact: low
Show code
local console = get_console()
L166 🔴 global_write
Global write: itm
Impact: low
Show code
itm = db.actor:active_item()
L232 🔴 global_write
Global write: anim_tm
Impact: low
Show code
anim_tm = tm * 0.001
L236 🔴 global_write
Global write: anim_tm
Impact: low
Show code
anim_tm = anim_tm * ssfx_weapons_dof_settings.items_time[ssfx_itm_in_use]
L238 🔴 global_write
Global write: anim_tm
Impact: low
Show code
anim_tm = anim_tm * 0.7
L264 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
local itm_state = itm:get_state()
L282 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
if itm:get_state() == 7 then -- Reload start
L284 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
sec = itm:section()
L329 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
sec = itm:section()
L332 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
if itm:get_ammo_in_magazine() == ini_sys:r_u32(sec, "ammo_mag_size") then
L347 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
if itm:get_state() ~= 7 and ssfx_reloading > 0 then

ssfx_weapons_dof_mcm.script

L8 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "wpn_dof", sh=true, text="ui_mcm_ssfx_module_wpn_dof", gr ={

ssfx_weapons_dof_settings.script

L7 🔴 global_write
Global write: ssfx_default_settings
Impact: low
Show code
ssfx_default_settings = {
L31 🔴 global_write
Global write: wpn_nodof
Impact: low
Show code
wpn_nodof = {
L57 🔴 global_write
Global write: items_time
Impact: low
Show code
items_time = {
L103 🔴 global_write
Global write: wpn_reloadtime
Impact: low
Show code
wpn_reloadtime = {

190- Screen Space Shaders 23 - Ascii1457

59 files (🟢19 🟡10 🔴86 🔵4)

bind_anomaly_field.script

L51 🟢 uncached_globals_summary
Cache 1 globals in ini_settings
Impact: medium
Show code
L72: tonumber L96: tonumber
L412 🟢 uncached_globals_summary
Cache 1 globals in pulse_anomaly_update
Impact: medium
Show code
L432: math.random L437: math.random
L30 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L48 🔴 global_write
Global write: dyn_anomalies
Impact: low
Show code
dyn_anomalies = {} -- [level][id] = name
L501 🔴 global_write
Global write: dyn_anomalies
Impact: low
Show code
dyn_anomalies = m_data.dyn_anomalies or {}
L538 🔴 global_write
Global write: fields_by_names
Impact: low
Show code
fields_by_names = {}

ssfx_001_mcm.script

L21 🟢 repeated_get_console
get_console called 6x in on_option_change
Impact: low
Show code
local console = get_console()
L8 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "general", sh=true, text="ui_mcm_ssfx_module_general", gr ={

ssfx_001_settings.script

L7 🔴 global_write
Global write: ssfx_default_settings
Impact: low
Show code
ssfx_default_settings = {

ssfx_ao.script

L26 🟢 repeated_get_console
get_console called 3x in apply_ao_settings
Impact: low
Show code
local console = get_console()
L21 🔴 global_write
Global write: module_installed
Impact: low
Show code
module_installed = true
L35 🔴 global_write
Global write: module_id
Impact: low
Show code
module_id = "ao"

ssfx_ao_mcm.script

L8 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "ao", sh=true, text="ui_mcm_ssfx_module_ao", gr = {

ssfx_ao_settings.script

L8 🔴 global_write
Global write: ssfx_default_settings
Impact: low
Show code
ssfx_default_settings =

ssfx_florafixes_mcm.script

L8 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "florafixes", sh=true, text="ui_mcm_ssfx_module_florafixes", gr ={

ssfx_florafixes_settings.script

L8 🔴 global_write
Global write: ssfx_default_settings
Impact: low
Show code
ssfx_default_settings =

ssfx_fog_mcm.script

L8 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "fog", sh=true, text="ui_mcm_ssfx_module_fog", gr ={

ssfx_fog_settings.script

L8 🔴 global_write
Global write: ssfx_default_settings
Impact: low
Show code
ssfx_default_settings =

ssfx_il.script

L23 🟢 repeated_get_console
get_console called 3x in apply_il_settings
Impact: low
Show code
local console = get_console()
L18 🔴 global_write
Global write: module_installed
Impact: low
Show code
module_installed = true
L32 🔴 global_write
Global write: module_id
Impact: low
Show code
module_id = "il"

ssfx_il_mcm.script

L8 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "il", sh=true, text="ui_mcm_ssfx_module_il", gr = {

ssfx_il_settings.script

L8 🔴 global_write
Global write: ssfx_default_settings
Impact: low
Show code
ssfx_default_settings =

ssfx_interactive_grass.script

L26 🟢 repeated_get_console
get_console called 3x in apply_interactive_grass_settings
Impact: low
Show code
local console = get_console()

ssfx_interactive_grass_mcm.script

L8 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "inter_grass", sh=true, text="ui_mcm_ssfx_module_inter_grass", gr ={

ssfx_interactive_grass_settings.script

L8 🔴 global_write
Global write: ssfx_default_settings
Impact: low
Show code
ssfx_default_settings =

ssfx_lut.script

L139 🟢 repeated_level_name
level.name called 3x in actor_on_first_update
Impact: low
Show code
local level_name = level.name()
L140 🔴 global_write
Global write: Map_LUT
Impact: low
Show code
Map_LUT = ssfx_maps[level.name()].group or ssfx_lut_default.group
L143 🔴 global_write
Global write: Map_LUT
Impact: low
Show code
Map_LUT = ssfx_lut_default.group

ssfx_parallax_mcm.script

L9 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "parallax", sh=true, text="ui_mcm_ssfx_module_parallax", gr = {

ssfx_parallax_settings.script

L8 🔴 global_write
Global write: ssfx_default_settings
Impact: low
Show code
ssfx_default_settings =

ssfx_pp_0taa.script

L12 🔴 global_write
Global write: module_installed
Impact: low
Show code
module_installed = true
L24 🔴 global_write
Global write: module_id
Impact: low
Show code
module_id = "ssfx_pp/ssfx_taa"

ssfx_pp_0taa_settings.script

L8 🔴 global_write
Global write: ssfx_default_settings
Impact: low
Show code
ssfx_default_settings =

ssfx_pp_bloom.script

L26 🟢 repeated_get_console
get_console called 3x in apply_bloom_settings
Impact: low
Show code
local console = get_console()
L21 🔴 global_write
Global write: module_installed
Impact: low
Show code
module_installed = true
L35 🔴 global_write
Global write: module_id
Impact: low
Show code
module_id = "ssfx_pp/ssfx_bloom"

ssfx_pp_bloom_settings.script

L8 🔴 global_write
Global write: ssfx_default_settings
Impact: low
Show code
ssfx_default_settings =

ssfx_pp_mblur.script

L14 🔴 global_write
Global write: module_installed
Impact: low
Show code
module_installed = true
L26 🔴 global_write
Global write: module_id
Impact: low
Show code
module_id = "ssfx_pp/ssfx_motionblur"

ssfx_pp_mblur_settings.script

L8 🔴 global_write
Global write: ssfx_default_settings
Impact: low
Show code
ssfx_default_settings =

ssfx_pp_mcm.script

L8 🔴 global_write
Global write: op
Impact: low
Show code
op = { id = "ssfx_pp", sh=false ,gr = {

ssfx_rain.script

L30 🟢 repeated_get_console
get_console called 4x in apply_interactive_grass_settings
Impact: low
Show code
local console = get_console()
L25 🔴 global_write
Global write: module_installed
Impact: low
Show code
module_installed = true
L41 🔴 global_write
Global write: module_id
Impact: low
Show code
module_id = "ssfx_rain_module/ssfx_rain_main"

ssfx_rain_footsteps.script

L18 🔴 global_write
Global write: module_installed
Impact: low
Show code
module_installed = true
L76 🔴 global_write
Global write: Actor_Crouch
Impact: low
Show code
Actor_Crouch = ssfx_rf_vol_multi_walk * (bit_and(Actor_State, 16) ~= 0 and 1 or 0)
L77 🔴 global_write
Global write: Actor_Walk
Impact: low
Show code
Actor_Walk = ssfx_rf_vol_multi_walk * (bit_and(Actor_State, 32) ~= 0 and 1 or 0)
L78 🔴 global_write
Global write: Actor_Aiming
Impact: low
Show code
Actor_Aiming = ssfx_rf_vol_multi_walk * Weapon_Aiming
L81 🔴 global_write
Global write: Actor_Sprint
Impact: low
Show code
Actor_Sprint = bit_and(Actor_State, 4096) ~= 0
L84 🔴 global_write
Global write: Vol_Mod
Impact: low
Show code
Vol_Mod = 1.0 - (Actor_Crouch + Actor_Walk + Actor_Aiming)
L85 🔴 global_write
Global write: Vol_Mod
Impact: low
Show code
Vol_Mod = Actor_Sprint and ssfx_rf_vol_multi_run or Vol_Mod
L95 🔴 global_write
Global write: variation
Impact: low
Show code
variation = math.random(0.0, ssfx_rf_vol_variation * 100) / 100
L59 🟡 unused_local_variable
Local variable 'TestValue' is assigned but never used
Impact: low
Show code
local TestValue = 0

ssfx_rain_footsteps_settings.script

L8 🔴 global_write
Global write: ssfx_default_settings
Impact: low
Show code
ssfx_default_settings =

ssfx_rain_hud_raindrops.script

L20 🔴 global_write
Global write: module_installed
Impact: low
Show code
module_installed = true
L30 🔴 global_write
Global write: Rain_factor
Impact: low
Show code
Rain_factor = level.rain_factor();
L37 🔴 global_write
Global write: delta_time
Impact: low
Show code
delta_time = device().time_delta;
L46 🔴 global_write
Global write: rain_speed_factor
Impact: low
Show code
rain_speed_factor = (1.5 - Rain_factor) * 10
L88 🔴 global_write
Global write: val_density
Impact: low
Show code
val_density = 0.15 * (3.5 - ssfx_hud_raindrops_density) -- 0.5 ~ 3.0
L89 🔴 global_write
Global write: val_texsize
Impact: low
Show code
val_texsize = 2.0 - ssfx_hud_raindrops_size
L26 🟡 unused_local_variable
Local variable 'dbug_time' is assigned but never used
Impact: low
Show code
local dbug_time = 0;

ssfx_rain_hud_raindrops_settings.script

L8 🔴 global_write
Global write: ssfx_default_settings
Impact: low
Show code
ssfx_default_settings =

ssfx_rain_mcm.script

L8 🔴 global_write
Global write: op
Impact: low
Show code
op = { id = "ssfx_rain_module", sh=false ,gr = {

ssfx_rain_settings.script

L8 🔴 global_write
Global write: ssfx_default_settings
Impact: low
Show code
ssfx_default_settings =

ssfx_shadow_cascades_mcm.script

L8 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "shw_cascades", sh=true, text="ui_mcm_ssfx_module_shw_cascades", gr ={

ssfx_shadow_cascades_settings.script

L8 🔴 global_write
Global write: ssfx_default_settings
Impact: low
Show code
ssfx_default_settings =

ssfx_shadows.script

L18 🟢 repeated_get_console
get_console called 4x in apply_shadows_settings
Impact: low
Show code
local console = get_console()

ssfx_shadows_mcm.script

L8 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "shadows", sh=true, text="ui_mcm_ssfx_module_shadows", gr ={

ssfx_shadows_settings.script

L8 🔴 global_write
Global write: ssfx_default_settings
Impact: low
Show code
ssfx_default_settings =

ssfx_ssr.script

L23 🟢 repeated_get_console
get_console called 3x in apply_ssr_settings
Impact: low
Show code
local console = get_console()

ssfx_ssr_mcm.script

L8 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "ssr", sh=true, text="ui_mcm_ssfx_module_ssr", gr ={

ssfx_ssr_settings.script

L8 🔴 global_write
Global write: ssfx_default_settings
Impact: low
Show code
ssfx_default_settings =

ssfx_sss_mcm.script

L8 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "sss", sh=true, text="ui_mcm_ssfx_module_sss", gr ={

ssfx_sss_settings.script

L8 🔴 global_write
Global write: ssfx_default_settings
Impact: low
Show code
ssfx_default_settings =

ssfx_terrain.script

L23 🟢 repeated_get_console
get_console called 5x in apply_terrain_settings
Impact: low
Show code
local console = get_console()

ssfx_terrain_mcm.script

L9 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "terrain", sh=true, text="ui_mcm_ssfx_module_terrain", gr = {

ssfx_terrain_parallax.script

L46 🟢 repeated_level_name
level.name called 2x in actor_on_first_update
Impact: low
Show code
local level_name = level.name()
L48 🟢 repeated_get_console
get_console called 2x in actor_on_first_update
Impact: low
Show code
local console = get_console()

ssfx_terrain_settings.script

L8 🔴 global_write
Global write: ssfx_default_settings
Impact: low
Show code
ssfx_default_settings =

ssfx_water.script

L29 🟢 repeated_get_console
get_console called 3x in apply_water_settings
Impact: low
Show code
local console = get_console()
L24 🔴 global_write
Global write: module_installed
Impact: low
Show code
module_installed = true
L38 🔴 global_write
Global write: module_id
Impact: low
Show code
module_id = "water"

ssfx_water_mcm.script

L8 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "water", sh=true, text="ui_mcm_ssfx_module_water", gr = {

ssfx_water_settings.script

L8 🔴 global_write
Global write: ssfx_default_settings
Impact: low
Show code
ssfx_default_settings =

ssfx_weapons_dof.script

L292 🟢 repeated_itm_section()
itm:section() called 2x in actor_on_update
Impact: low
Show code
Cache itm:section() result
L460 🟢 repeated_get_console
get_console called 4x in on_option_change
Impact: low
Show code
local console = get_console()
L166 🔴 global_write
Global write: itm
Impact: low
Show code
itm = db.actor:active_item()
L237 🔴 global_write
Global write: anim_tm
Impact: low
Show code
anim_tm = tm * 0.001
L241 🔴 global_write
Global write: anim_tm
Impact: low
Show code
anim_tm = anim_tm * ssfx_weapons_dof_settings.items_time[ssfx_itm_in_use]
L243 🔴 global_write
Global write: anim_tm
Impact: low
Show code
anim_tm = anim_tm * 0.7
L269 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
local itm_state = itm:get_state()
L290 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
if itm:get_state() == 7 then -- Reload start
L292 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
sec = itm:section()
L337 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
sec = itm:section()
L340 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
if itm:get_ammo_in_magazine() == ini_sys:r_u32(sec, "ammo_mag_size") then
L355 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
if itm:get_state() ~= 7 and ssfx_reloading > 0 then

ssfx_weapons_dof_mcm.script

L8 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "wpn_dof", sh=true, text="ui_mcm_ssfx_module_wpn_dof", gr ={

ssfx_weapons_dof_settings.script

L7 🔴 global_write
Global write: ssfx_default_settings
Impact: low
Show code
ssfx_default_settings = {
L31 🔴 global_write
Global write: wpn_nodof
Impact: low
Show code
wpn_nodof = {
L57 🔴 global_write
Global write: items_time
Impact: low
Show code
items_time = {
L103 🔴 global_write
Global write: wpn_reloadtime
Impact: low
Show code
wpn_reloadtime = {

ssfx_wetness.script

L49 🟢 repeated_get_console
get_console called 8x in apply_extra_settings
Impact: low
Show code
local console = get_console()
L34 🔴 global_write
Global write: module_installed
Impact: low
Show code
module_installed = true
L39 🔴 global_write
Global write: Wetness_gloss
Impact: low
Show code
Wetness_gloss = ssfx_gloss_min + (math.max(ssfx_gloss_auto_max - ssfx_gloss_min, 0) * level.rain_wetness())
L59 🔴 global_write
Global write: ripples_size
Impact: low
Show code
ripples_size = math.max(2.0 - ssfx_wet_ripples_size, 0.01) -- Change how the value works to be more intuitive ( < 1.0 smaller | > 1.0 bigger )
L62 🔴 global_write
Global write: waterfall_size
Impact: low
Show code
waterfall_size = math.max(2.0 - ssfx_wet_waterfall_size, 0.01) -- Change how the value works to be more intuitive ( < 1.0 smaller | > 1.0 bigger )
L65 🔴 global_write
Global write: wet_resolution
Impact: low
Show code
wet_resolution = math.pow(2, ssfx_wet_res + 6)

ssfx_wetness_mcm.script

L8 🔴 global_write
Global write: op
Impact: low
Show code
op = { id = "ssfx_wetness", sh=false ,gr = {

ssfx_wetness_settings.script

L8 🔴 global_write
Global write: ssfx_default_settings
Impact: low
Show code
ssfx_default_settings =

ssfx_wind_mcm.script

L8 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "wind", sh=true, text="ui_mcm_ssfx_module_wind", gr ={

ssfx_wind_settings.script

L8 🔴 global_write
Global write: ssfx_default_settings
Impact: low
Show code
ssfx_default_settings =

ui_debug_weather.script

L1112 🟢 uncached_globals_summary
Cache 1 globals in Apply
Impact: medium
Show code
L1120: type L1146: type
L1598 🟡 string_concat_in_loop
String concat in loop: folder = folder .. x
Impact: critical
Show code
folder = folder .. p[i] .. "\\"
L1322 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! group doesn't exist for selecte_g: %s", self.select_g)
L1672 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("- main_menu off")
L1717 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("WeatherEditor | " .. fmt, ...)
L716 🔴 global_write
Global write: point
Impact: low
Show code
point = cnt
L1004 🟡 unused_local_variable
Local variable 'bind' is assigned but never used
Impact: low
Show code
local bind = dik_to_bind(dik)

196- DLTX Minimodpack - Demonized

3 files (🟢3 🟡10 🔴6 🔵13)

bind_crow.script

L64 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("releasing object ["..self.object:name().."]")
L6 🔴 global_write
Global write: crow_storage
Impact: low
Show code
crow_storage = {}
L7 🔴 global_write
Global write: crow_counter
Impact: low
Show code
crow_counter = 0
L9 🔴 global_write
Global write: knifes
Impact: low
Show code
knifes = {
L78 🟡 potential_nil_access
Potential nil access: 'obj' from :active_item() used without nil check
Impact: low
Show code
knife_equipped = string.match(tostring(obj:section()),"knife") or knifes[obj:section()]
L78 🟡 potential_nil_access
Potential nil access: 'obj' from :active_item() used without nil check
Impact: low
Show code
knife_equipped = string.match(tostring(obj:section()),"knife") or knifes[obj:section()]

ui_mutant_loot.script

L343 🟢 uncached_globals_summary
Cache 1 globals in SetMutantImage
Impact: medium
Show code
L355: tostring L356: tostring
L198 🟢 repeated_obj_id()
obj:id() called 5x in monster_on_actor_use_callback
Impact: low
Show code
Cache obj:id() result
L174 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!ERROR ui_mutant_loot | no game object passed!")
L513 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR ui_mutant_loot | can't retrieve online object of mutant [%s](%s)", self.section, self.id)
L382 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local backpack = actor:item_in_slot(13)
L386 🟡 potential_nil_access
Potential nil access: 'backpack' from :item_in_slot() used without nil check
Impact: low
Show code
if (needs_equipped_hk and (backpack and (backpack:section() == sec_kit_hunt))) or (not needs_equipped_hk and db.actor:object(sec_kit_hunt)) then
L380 🟡 unused_local_variable
Local variable 'sim' is assigned but never used
Impact: low
Show code
local sim = alife()
L110 🟡 unused_local_variable
Local variable 'npc_id' is assigned but never used
Impact: low
Show code
local npc_id = npc and npc:id()
L111 🟡 unused_local_variable
Local variable 'npc_pos' is assigned but never used
Impact: low
Show code
local npc_pos = npc and npc:position()
L112 🟡 unused_local_variable
Local variable 'npc_lvl_id' is assigned but never used
Impact: low
Show code
local npc_lvl_id = npc and npc:level_vertex_id()
L113 🟡 unused_local_variable
Local variable 'npc_game_id' is assigned but never used
Impact: low
Show code
local npc_game_id = npc and npc:game_vertex_id()
L138 🟡 unused_local_variable
Local variable 'uses' is assigned but never used
Impact: low
Show code
local sec_d, uses = utils_item.get_defined_uses(sec)

zz_itms_manager_more_drops_from_drugs.script

L27 🟢 uncached_globals_summary
Cache 1 globals in give_items_after_use
Impact: medium
Show code
L31: ipairs L36: ipairs
L30 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("- %s uses: [%s]", sec, uses)
L32 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("giving item %s", item)
L37 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("giving item on empty %s", item)
L43 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("giving item %s", item)
L52 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("calling override itms_manager.actor_on_item_use")
L63 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(dbg_str, sec, jar[sec])
L68 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(dbg_str, sec, jar_textolite_syringe[sec])
L73 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(dbg_str, sec, jar_film_syringe_textolite[sec])
L78 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(dbg_str, sec, jar_film_textolite[sec])
L83 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(dbg_str, sec, film[sec])
L2 🔴 global_write
Global write: ini_manager
Impact: low
Show code
ini_manager = ini_manager or ini_file("items\\settings\\itms_manager.ltx")
L9 🔴 global_write
Global write: item_group
Impact: low
Show code
item_group = {}
L93 🔴 global_write
Global write: base_itms_manager_actor_on_item_use
Impact: low
Show code
base_itms_manager_actor_on_item_use = itms_manager.actor_on_item_use

197- New Storylines (DLTX minimodpack) - Demonized

6 files (🟢9 🟡3 🔴8 🔵26)

ah_dialogs.script

L136 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Óðîâåíü_"..ah_level_counter)
L139 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Èäåì ê Ñêàáèíñêîìó")
L199 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Òóòòèäó_ÁÈÁÈÁ")
L327 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Ïåðâàÿ îøèáêà")
L330 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Âòîðàÿ îøèáêà")
L333 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Òðåòüÿ îøèáêà")

grok_additional_storyline_npc_invincible.script

L21 🟢 repeated_shit_draftsman_id()
shit.draftsman:id() called 2x in npc_on_before_hit
Impact: low
Show code
Cache shit.draftsman:id() result
L21 🟢 repeated_db_actor_id()
db.actor:id() called 2x in npc_on_before_hit
Impact: low
Show code
Cache db.actor:id() result
L1 🔴 global_write
Global write: ads_npcs
Impact: low
Show code
ads_npcs = {

hidden_threat.script

L210 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![SLHT] Storyline | Hidden Threat : disabled")
L214 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![SLHT] Storyline | Hidden Threat : disabled")
L216 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("-[SLHT] Storyline | Hidden Threat : enabled")

operacia_monolith.script

L20 🟢 repeated_alife
alife called 6x in actor_on_update
Impact: low
Show code
local sim = alife()
L341 🟢 repeated_alife
alife called 3x in dolg_story_task_3
Impact: low
Show code
local sim = alife()
L348 🟢 repeated_alife
alife called 3x in dolg_story_task_4
Impact: low
Show code
local sim = alife()
L355 🟢 repeated_alife
alife called 3x in dolg_story_task_5
Impact: low
Show code
local sim = alife()
L13 🟡 unused_local_variable
Local variable 'level_name' is assigned but never used
Impact: low
Show code
local level_name = level.name()

task_functor_hidden_threat.script

L262 🟢 repeated_level_name
level.name called 3x in <global>
Impact: low
Show code
local level_name = level.name()

utils_slht.script

L242 🟢 uncached_globals_summary
Cache 1 globals in exchange_ammo_with_actor
Impact: medium
Show code
L247: tonumber L248: tonumber
L273 🟢 repeated_level_name
level.name called 4x in aes_companion_squad_in_level
Impact: low
Show code
local level_name = level.name()
L148 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[SLHT] Flag or Section: not found")
L169 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[SLHT] %s | Item = %s", tostring(flag), txt)
L200 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![SLHT] Wrong parametr 'who=%s' for news!!!",tostring(who))
L217 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![SLHT] Wrong 'npc_table=%s' for news!!!",tostring(who))
L226 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[SLHT]!Warning: couldn't load file gamedata/configs/items/settings/hidden_threat_spooner_barter.ltx, feature disabled!")
L375 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[SLHT] Adding postprocces [%s] | ID = %s | looped = %s", tostring(p[1]), tostring(num), tostring(looped))
L379 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[SLHT] Postprocces [%s] is no set!", tostring(p[1]))
L528 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~[SLHT] Alife release [%s]", tostring(p[1]))
L554 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[SLHT] TimeEventDisabled | ID: %s", tostring(k))
L555 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("*** Day:%s Time:%s:%s:%s",
L623 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[SLHT] TimeEventEnabled | ID: %s", tostring(teid))
L624 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("*** Value: %s seconds",tostring(value))
L625 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("*** Start: Day:%s Time:%s:%s:%s",
L630 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("*** End: Day:%s Time:%s:%s:%s",
L646 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Hidden Threat, no smart specified")
L651 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Hidden Threat, no smart found with name %s", smart_name)
L661 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Hidden Threat, cleaning scene from monster %s, dist_sqr %s", se_obj:name(), dist)
L11 🔴 global_write
Global write: debug_mode
Impact: low
Show code
debug_mode = false
L18 🔴 global_write
Global write: reward_table
Impact: low
Show code
reward_table = {}
L21 🔴 global_write
Global write: task_table
Impact: low
Show code
task_table = ini_file("misc\\tasks_hidden_threat.ltx")
L43 🔴 global_write
Global write: points
Impact: low
Show code
points = {
L602 🔴 global_write
Global write: HTCreateTimeEvent
Impact: low
Show code
HTCreateTimeEvent = function(teid,value,func,...)
L607 🔴 global_write
Global write: value
Impact: low
Show code
value = tonumber(value)
L676 🔴 global_write
Global write: reward_table
Impact: low
Show code
reward_table = m_data.slht_reward_table or {}
L522 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local obj = sim:object(i)
L526 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
sim:release(obj,true)

201- SquareDOV (square minimap) - RavenAscendant

1 file (🟢0 🟡0 🔴1 🔵0)

ui_minimap_counter.script

L157 🔴 global_write
Global write: sound
Impact: low
Show code
sound = enable_contact_offline and "squaredov\\contact_2" or ("squaredov\\contact_" .. math.random(2))

203- YACS Better Campfire Saves (forces campfire saves but they are better) - Ishmaeel

1 file (🟢1 🟡0 🔴2 🔵2)

ish_campfire_saving.script

L111 🟢 table_insert_append
table.insert(friendly_bases, v) -> friendly_bases[#friendly_bases+1] = v
Impact: high
Show code
table.insert(friendly_bases, smart)
L235 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("///YACS Save")
L261 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(message)
L19 🔴 global_write
Global write: bonus_bases
Impact: low
Show code
bonus_bases = {}
L23 🔴 global_write
Global write: the_bawses
Impact: low
Show code
the_bawses = {zat_b18_noah = true, m_trader = true, m_lesnik = true}

204- Limited Fast Travel (walking is good for your health) - Demonized

4 files (🟢0 🟡12 🔴35 🔵0)

fast_travel_limiter_mcm.script

L1 🔴 global_write
Global write: op
Impact: low
Show code
op = {

game_backpack_travel.script

L8 🔴 global_write
Global write: bp_travel
Impact: low
Show code
bp_travel = nil
L9 🔴 global_write
Global write: bp_combat
Impact: low
Show code
bp_combat = nil
L10 🔴 global_write
Global write: bp_damage
Impact: low
Show code
bp_damage = nil
L11 🔴 global_write
Global write: bp_notime
Impact: low
Show code
bp_notime = nil
L12 🔴 global_write
Global write: bp_storm
Impact: low
Show code
bp_storm = nil
L13 🔴 global_write
Global write: bp_weight
Impact: low
Show code
bp_weight = nil
L120 🔴 global_write
Global write: bp_travel
Impact: low
Show code
bp_travel = ui_options.get("gameplay/backpack_travel/state")
L121 🔴 global_write
Global write: bp_combat
Impact: low
Show code
bp_combat = ui_options.get("gameplay/backpack_travel/on_combat")
L122 🔴 global_write
Global write: bp_damage
Impact: low
Show code
bp_damage = ui_options.get("gameplay/backpack_travel/on_damage")
L123 🔴 global_write
Global write: bp_notime
Impact: low
Show code
bp_notime = ui_options.get("gameplay/backpack_travel/time")
L124 🔴 global_write
Global write: bp_storm
Impact: low
Show code
bp_storm = ui_options.get("gameplay/backpack_travel/on_emission")
L125 🔴 global_write
Global write: bp_weight
Impact: low
Show code
bp_weight = ui_options.get("gameplay/backpack_travel/on_overweight")
L26 🟡 potential_nil_access
Potential nil access: 'bkpk' from :item_in_slot() used without nil check (auto-fixable)
Impact: low
Show code
w = w + (bkpk and ini_sys:r_float_ex(bkpk:section(),"additional_inventory_weight") or 0)
L59 🟡 potential_nil_access
Potential nil access: 'suit' from :item_in_slot() used without nil check
Impact: low
Show code
local diff = db.actor:get_total_weight() - db.actor:get_actor_max_walk_weight() - (suit and suit:get_additional_max_weight() or 0) - bbp_extra_weight()
L114 🟡 potential_nil_access
Potential nil access: 'b' from level.object_by_id() used without nil check
Impact: low
Show code
b:use(db.actor)

game_fast_travel.script

L9 🔴 global_write
Global write: enabled
Impact: low
Show code
enabled = 0
L10 🔴 global_write
Global write: combattravel
Impact: low
Show code
combattravel = false
L11 🔴 global_write
Global write: weighttravel
Impact: low
Show code
weighttravel = false
L12 🔴 global_write
Global write: damagetravel
Impact: low
Show code
damagetravel = false
L13 🔴 global_write
Global write: stormtravel
Impact: low
Show code
stormtravel = false
L14 🔴 global_write
Global write: longnames
Impact: low
Show code
longnames = false
L15 🔴 global_write
Global write: markermessage
Impact: low
Show code
markermessage = false
L16 🔴 global_write
Global write: notime
Impact: low
Show code
notime = false
L17 🔴 global_write
Global write: tsmarts
Impact: low
Show code
tsmarts = nil
L165 🔴 global_write
Global write: st_list_1
Impact: low
Show code
st_list_1 = game.translate_string("ui_mm_travel_list_1")
L167 🔴 global_write
Global write: enabled
Impact: low
Show code
enabled = ui_options.get("gameplay/fast_travel/state")
L168 🔴 global_write
Global write: combattravel
Impact: low
Show code
combattravel = ui_options.get("gameplay/fast_travel/on_combat")
L169 🔴 global_write
Global write: weighttravel
Impact: low
Show code
weighttravel = ui_options.get("gameplay/fast_travel/on_overweight")
L170 🔴 global_write
Global write: damagetravel
Impact: low
Show code
damagetravel = ui_options.get("gameplay/fast_travel/on_damage")
L171 🔴 global_write
Global write: stormtravel
Impact: low
Show code
stormtravel = ui_options.get("gameplay/fast_travel/on_emission")
L172 🔴 global_write
Global write: longnames
Impact: low
Show code
longnames = ui_options.get("gameplay/fast_travel/long_names")
L173 🔴 global_write
Global write: markermessage
Impact: low
Show code
markermessage = ui_options.get("gameplay/fast_travel/visit_message")
L174 🔴 global_write
Global write: notime
Impact: low
Show code
notime = ui_options.get("gameplay/fast_travel/time")
L178 🔴 global_write
Global write: tsmarts
Impact: low
Show code
tsmarts = utils_data.collect_section(pini,faction,true)
L30 🟡 potential_nil_access
Potential nil access: 'bkpk' from :item_in_slot() used without nil check (auto-fixable)
Impact: low
Show code
w = w + (bkpk and ini_sys:r_float_ex(bkpk:section(),"additional_inventory_weight") or 0)
L77 🟡 potential_nil_access
Potential nil access: 'suit' from :item_in_slot() used without nil check
Impact: low
Show code
local diff = db.actor:get_total_weight() - db.actor:get_actor_max_walk_weight() - (suit and suit:get_additional_max_weight() or 0) - bbp_extra_weight()
L185 🟡 potential_nil_access
Potential nil access: 'smart' from :object() used without nil check
Impact: low
Show code
if (smart and smart:clsid() == clsid.smart_terrain and tsmarts[smart:name()]) then
L185 🟡 potential_nil_access
Potential nil access: 'smart' from :object() used without nil check
Impact: low
Show code
if (smart and smart:clsid() == clsid.smart_terrain and tsmarts[smart:name()]) then

zz_game_fast_travel_limiter.script

L54 🔴 global_write
Global write: next_travel
Impact: low
Show code
next_travel = 0
L112 🔴 global_write
Global write: next_travel
Impact: low
Show code
next_travel = get_time_elapsed() + settings.next_travel_inc
L181 🔴 global_write
Global write: next_travel
Impact: low
Show code
next_travel = m_data.ftl_next_travel or 0
L64 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
if simulation_objects.is_on_the_same_level(sim:actor(), smart) then
L65 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local dist = smart.position:distance_to(actor:position())
L92 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local money = actor:money()
L105 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:give_money(-tax)
L110 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:give_game_news(news_caption, news_text, news_ico, 0, 6000, 0)

205- Old to ammo to new ammo converter (less item bloat) - Great_Day

1 file (🟢5 🟡12 🔴1 🔵3)

item_weapon.script

L74 🟢 repeated_weapon_section()
weapon:section() called 3x in attach_scope
Impact: low
Show code
Cache weapon:section() result
L101 🟢 repeated_weapon_section()
weapon:section() called 3x in detach_scope
Impact: low
Show code
Cache weapon:section() result
L893 🟢 repeated_wpn_section()
wpn:section() called 4x in update_overheat
Impact: low
Show code
Cache wpn:section() result
L899 🟢 repeated_wpn_id()
wpn:id() called 4x in update_overheat
Impact: low
Show code
Cache wpn:id() result
L970 🟢 repeated_item_section()
item:section() called 2x in actor_on_item_use
Impact: low
Show code
Cache item:section() result
L108 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ item_weapon.detach_scope | weapon owner not found")
L309 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR: Couldn't relocate_item_from_actor | not enough item [%s] recolated! need %s more", section, cnt)
L730 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("ERROR: could not find ammo list for [%s] - grenade mode: %s", self.section, self.grenade_mode)
L870 🔴 global_write
Global write: can_overheat
Impact: low
Show code
can_overheat = true
L178 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
if weapon and weapon:weapon_silencer_status() == 2 then
L207 🟡 potential_nil_access
Potential nil access: 'weapon' from level.object_by_id() used without nil check
Impact: low
Show code
if weapon and weapon:parent() and weapon:parent():id() == AC_ID then
L207 🟡 potential_nil_access
Potential nil access: 'weapon' from level.object_by_id() used without nil check
Impact: low
Show code
if weapon and weapon:parent() and weapon:parent():id() == AC_ID then
L393 🟡 potential_nil_access
Potential nil access: 'npc' from db.actor() used without nil check
Impact: low
Show code
npc:iterate_inventory_box(collect)
L395 🟡 potential_nil_access
Potential nil access: 'npc' from db.actor() used without nil check
Impact: low
Show code
npc:iterate_inventory(collect)
L415 🟡 potential_nil_access
Potential nil access: 'item' from level.object_by_id() used without nil check
Impact: low
Show code
item:ammo_set_count(box_size)
L419 🟡 potential_nil_access
Potential nil access: 'npc' from db.actor() used without nil check
Impact: low
Show code
npc:drop_item(item)
L588 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if wpn and IsWeapon(wpn) and (not IsItem("fake_ammo_wpn",wpn:section())) then
L785 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if wpn and (wpn:section() == self.section) then
L820 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if wpn and (wpn:section() == self.section) and self.avail[n] then
L988 🟡 potential_nil_access
Potential nil access: 'parent' from :parent() used without nil check
Impact: low
Show code
if not (IsWeapon(obj_2) and parent and parent:id() == AC_ID) then
L510 🟡 unused_local_variable
Local variable 'prev_state' is assigned but never used
Impact: low
Show code
local prev_state = obj_2:get_state()

206- Areas transition without confirmation (smoother gameflow) - Tom_Sharikov

1 file (🟢2 🟡0 🔴0 🔵1)

ui_sr_teleport.script

L83 🟢 uncached_globals_summary
Cache 1 globals in travel
Impact: medium
Show code
L91: tonumber L91: tonumber
L134 🟢 uncached_globals_summary
Cache 1 globals in OnMsgCancel
Impact: medium
Show code
L144: tonumber L144: tonumber
L21 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("sr_teleport_sections.ltx: section doesn't exist %s",obj and obj:name())

207- Anomaly Magazines (Disable G.A.M.M.A. Unjam Reload) - RavenAscendant

13 files (🟢14 🟡43 🔴148 🔵8)

a_magazine.script

L1 🔴 global_write
Global write: print_dbg
Impact: low
Show code
print_dbg = magazines.print_dbg
L2 🔴 global_write
Global write: is_magazine
Impact: low
Show code
is_magazine = magazine_binder.is_magazine
L4 🔴 global_write
Global write: GetCost
Impact: low
Show code
GetCost = utils_item.get_item_cost

ish_mag_bars.script

L21 🟡 unused_local_variable
Local variable 'vanilla_bar_list_for_reference_not_used_here' is assigned but never used
Impact: low
Show code
local vanilla_bar_list_for_reference_not_used_here = {

mag_hud.script

L162 🟢 uncached_globals_summary
Cache 1 globals in Update
Impact: medium
Show code
L204: pairs L213: pairs
L367 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("sacle %s", scale)
L186 🔴 global_write
Global write: id
Impact: low
Show code
id = item:id()
L299 🔴 global_write
Global write: count
Impact: low
Show code
count = self.count
L401 🔴 global_write
Global write: p_width
Impact: low
Show code
p_width = parent_width or 1024
L402 🔴 global_write
Global write: p_center
Impact: low
Show code
p_center = p_width/2
L403 🔴 global_write
Global write: width
Impact: low
Show code
width = ele:GetWidth()
L404 🔴 global_write
Global write: pos
Impact: low
Show code
pos = ele:GetWndPos()
L405 🔴 global_write
Global write: anchorpos
Impact: low
Show code
anchorpos = {}
L409 🔴 global_write
Global write: ratio
Impact: low
Show code
ratio = (device().height / device().width) / (768 / 1024)
L410 🔴 global_write
Global write: xadjust
Impact: low
Show code
xadjust = anchorpos.left
L413 🔴 global_write
Global write: xadjust
Impact: low
Show code
xadjust = p_width - (p_width - (anchor and anchorpos[anchor] or anchorpos.left))*ratio
L415 🔴 global_write
Global write: xadjust
Impact: low
Show code
xadjust = p_center - (p_center - (anchor and anchorpos[anchor] or anchorpos.left))*ratio
L417 🔴 global_write
Global write: xadjust
Impact: low
Show code
xadjust = ratio * (anchor and anchorpos[anchor] or anchorpos.left)
L14 🟡 unused_local_variable
Local variable 'gc' is assigned but never used
Impact: low
Show code
local gc = game.translate_string
L23 🟡 unused_local_variable
Local variable 'show_bgrd' is assigned but never used
Impact: low
Show code
local show_bgrd

magazine_binder.script

L169 🟢 table_insert_append
table.insert(t, v) -> t[#t+1] = v
Impact: high
Show code
table.insert(t, v2)
L180 🟢 uncached_globals_summary
Cache 1 globals in type_correction
Impact: medium
Show code
L184: type L186: type
L42 🟡 string_concat_in_loop
String concat in loop: s = s .. x
Impact: critical
Show code
s = s .. v .. " "
L62 🔴 global_write
Global write: tbl
Impact: low
Show code
tbl = {}
L310 🔴 global_write
Global write: carried
Impact: low
Show code
carried = get_total_carried()
L657 🔴 global_write
Global write: ready_color
Impact: low
Show code
ready_color = GetARGB(100, 255, 159, 82)
L191 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
section = obj:section()
L523 🟡 potential_nil_access
Potential nil access: 'wpn_obj' from level.object_by_id() used without nil check
Impact: low
Show code
if wpn_obj and wpn_obj:weapon_in_grenade_mode() then return end

magazines.script

L209 🟢 repeated_item_section()
item:section() called 3x in on_item_drag_dropped
Impact: low
Show code
Cache item:section() result
L209 🟢 repeated_weapon_section()
weapon:section() called 3x in on_item_drag_dropped
Impact: low
Show code
Cache weapon:section() result
L222 🟢 repeated_weapon_id()
weapon:id() called 3x in on_item_drag_dropped
Impact: low
Show code
Cache weapon:id() result
L375 🟢 repeated_ammo_section()
ammo:section() called 3x in chamber_single_round
Impact: low
Show code
Cache ammo:section() result
L816 🟢 repeated_magazine_id()
magazine:id() called 3x in fast_unload_magazine
Impact: low
Show code
Cache magazine:id() result
L36 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
dbg_log:log( text , ...)
L38 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( "RAX: | %s | "..text ,time_global(), ...)
L50 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
err_log:log( text , ...)
L52 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe( "ERR: | %s | "..text ,time_global(), ...)
L6 🔴 global_write
Global write: gc
Impact: low
Show code
gc = game.translate_string
L7 🔴 global_write
Global write: get_mag_data
Impact: low
Show code
get_mag_data = magazine_binder.get_data
L8 🔴 global_write
Global write: set_mag_data
Impact: low
Show code
set_mag_data = magazine_binder.set_data
L9 🔴 global_write
Global write: is_supported_weapon
Impact: low
Show code
is_supported_weapon = magazine_binder.is_supported_weapon
L10 🔴 global_write
Global write: get_magazine_caliber
Impact: low
Show code
get_magazine_caliber = magazine_binder.get_magazine_caliber
L11 🔴 global_write
Global write: weapon_default_magazine
Impact: low
Show code
weapon_default_magazine = magazine_binder.weapon_default_magazine
L12 🔴 global_write
Global write: is_compatible
Impact: low
Show code
is_compatible = magazine_binder.is_compatible
L13 🔴 global_write
Global write: isMagazine
Impact: low
Show code
isMagazine = magazine_binder.is_magazine
L14 🔴 global_write
Global write: is_magazine
Impact: low
Show code
is_magazine = magazine_binder.is_magazine
L15 🔴 global_write
Global write: get_mag_loaded
Impact: low
Show code
get_mag_loaded = magazine_binder.get_mag_loaded
L16 🔴 global_write
Global write: is_carried_mag
Impact: low
Show code
is_carried_mag = magazine_binder.is_carried_mag
L17 🔴 global_write
Global write: toggle_carried_mag
Impact: low
Show code
toggle_carried_mag = magazine_binder.toggle_carried_mag
L18 🔴 global_write
Global write: get_carried_mags
Impact: low
Show code
get_carried_mags = magazine_binder.get_carried_mags
L19 🔴 global_write
Global write: room_in_pouch
Impact: low
Show code
room_in_pouch = magazine_binder.room_in_pouch
L20 🔴 global_write
Global write: get_retool_section
Impact: low
Show code
get_retool_section = magazine_binder.get_retool_section
L21 🔴 global_write
Global write: get_weapon_base_type
Impact: low
Show code
get_weapon_base_type = magazine_binder.get_weapon_base_type
L22 🔴 global_write
Global write: get_magazine_base_type
Impact: low
Show code
get_magazine_base_type = magazine_binder.get_magazine_base_type
L23 🔴 global_write
Global write: get_mags_for_basetype
Impact: low
Show code
get_mags_for_basetype = magazine_binder.get_mags_for_basetype
L24 🔴 global_write
Global write: dump_data
Impact: low
Show code
dump_data = magazine_binder.dump_data
L25 🔴 global_write
Global write: get_mags_by_ammo_type
Impact: low
Show code
get_mags_by_ammo_type = magazine_binder.get_mags_by_ammo_type
L26 🔴 global_write
Global write: get_config
Impact: low
Show code
get_config = magazines_mcm.get_config
L135 🔴 global_write
Global write: cache_mag_time
Impact: low
Show code
cache_mag_time = {}
L317 🔴 global_write
Global write: weapon
Impact: low
Show code
weapon = get_object_by_id(id)
L495 🔴 global_write
Global write: se_mag
Impact: low
Show code
se_mag = alife_create_item(mag_data.section, weapon:parent())
L620 🔴 global_write
Global write: FADArun
Impact: low
Show code
FADArun = enhanced_animations and enhanced_animations.used_item and true or false
L715 🔴 global_write
Global write: ext_ammo_obj
Impact: low
Show code
ext_ammo_obj = get_object_by_id(ext_ammo_box)
L720 🔴 global_write
Global write: new_ammo_box
Impact: low
Show code
new_ammo_box = find_next_box(ammo_section, ext_ammo_box)
L932 🔴 global_write
Global write: new_obj
Impact: low
Show code
new_obj = alife_create_item(retool_section, obj:parent())
L1058 🔴 global_write
Global write: args
Impact: low
Show code
args = str_explode(k, ",")
L83 🟡 potential_nil_access
Potential nil access: 'parent' from :parent() used without nil check
Impact: low
Show code
if parent:id() == 0 then return false end
L84 🟡 potential_nil_access
Potential nil access: 'parent' from :parent() used without nil check
Impact: low
Show code
local se_parent = alife_object(parent:id())
L576 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local id = weapon:id()
L578 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local state = weapon and weapon:get_state()
L654 🟡 potential_nil_access
Potential nil access: 'current_weapon' from :active_item() used without nil check
Impact: low
Show code
if (current_weapon and current_weapon:id() ~= weapon_id) and time_global() < timeout + 5000 then return false end
L659 🟡 potential_nil_access
Potential nil access: 'weapon' from level.object_by_id() used without nil check (auto-fixable)
Impact: low
Show code
print_dbg("ujwt weapon:%s", weapon and weapon:name())
L758 🟡 potential_nil_access
Potential nil access: 'mag_parent' from db.actor() used without nil check
Impact: low
Show code
create_ammo(round, mag_parent:position(), mag_parent:level_vertex_id(), mag_parent:game_vertex_id(), mag_parent:id(), 1)
L758 🟡 potential_nil_access
Potential nil access: 'mag_parent' from db.actor() used without nil check
Impact: low
Show code
create_ammo(round, mag_parent:position(), mag_parent:level_vertex_id(), mag_parent:game_vertex_id(), mag_parent:id(), 1)
L758 🟡 potential_nil_access
Potential nil access: 'mag_parent' from db.actor() used without nil check
Impact: low
Show code
create_ammo(round, mag_parent:position(), mag_parent:level_vertex_id(), mag_parent:game_vertex_id(), mag_parent:id(), 1)
L758 🟡 potential_nil_access
Potential nil access: 'mag_parent' from db.actor() used without nil check
Impact: low
Show code
create_ammo(round, mag_parent:position(), mag_parent:level_vertex_id(), mag_parent:game_vertex_id(), mag_parent:id(), 1)
L789 🟡 potential_nil_access
Potential nil access: 'parent' from :parent() used without nil check
Impact: low
Show code
parent:iterate_inventory_box(itr_box)
L791 🟡 potential_nil_access
Potential nil access: 'parent' from :parent() used without nil check
Impact: low
Show code
parent:iterate_inventory(itr_box)
L796 🟡 potential_nil_access
Potential nil access: 'ammo_box' from level.object_by_id() used without nil check
Impact: low
Show code
local loaded = ammo_box:ammo_get_count() > ammo_to_load and ammo_to_load or ammo_box:ammo_get_count()
L796 🟡 potential_nil_access
Potential nil access: 'ammo_box' from level.object_by_id() used without nil check
Impact: low
Show code
local loaded = ammo_box:ammo_get_count() > ammo_to_load and ammo_to_load or ammo_box:ammo_get_count()
L797 🟡 potential_nil_access
Potential nil access: 'ammo_box' from level.object_by_id() used without nil check
Impact: low
Show code
local release_box = loaded == ammo_box:ammo_get_count()
L803 🟡 potential_nil_access
Potential nil access: 'ammo_box' from level.object_by_id() used without nil check
Impact: low
Show code
ammo_to_load = ammo_to_load - ammo_box:ammo_get_count()
L806 🟡 potential_nil_access
Potential nil access: 'ammo_box' from level.object_by_id() used without nil check
Impact: low
Show code
ammo_box:ammo_set_count(ammo_box:ammo_get_count() - loaded)
L806 🟡 potential_nil_access
Potential nil access: 'ammo_box' from level.object_by_id() used without nil check
Impact: low
Show code
ammo_box:ammo_set_count(ammo_box:ammo_get_count() - loaded)

magazines_keybinds.script

L2 🔴 global_write
Global write: print_dbg
Impact: low
Show code
print_dbg = magazines.print_dbg
L5 🔴 global_write
Global write: InventoryClick
Impact: low
Show code
InventoryClick = ui_inventory.UIInventory.On_CC_Mouse1

magazines_loot.script

L225 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!!! FRAUD DETECTED !!! Item %s should not have mag data!", sec)
L4 🔴 global_write
Global write: gc
Impact: low
Show code
gc = game.translate_string
L5 🔴 global_write
Global write: get_data
Impact: low
Show code
get_data = magazine_binder.get_data
L6 🔴 global_write
Global write: set_data
Impact: low
Show code
set_data = magazine_binder.set_data
L7 🔴 global_write
Global write: get_mag_loaded
Impact: low
Show code
get_mag_loaded = magazine_binder.get_mag_loaded
L8 🔴 global_write
Global write: prep_weapon
Impact: low
Show code
prep_weapon = magazines.prep_weapon
L9 🔴 global_write
Global write: is_supported_weapon
Impact: low
Show code
is_supported_weapon = magazine_binder.is_supported_weapon
L10 🔴 global_write
Global write: get_magazine_caliber
Impact: low
Show code
get_magazine_caliber = magazine_binder.get_magazine_caliber
L11 🔴 global_write
Global write: is_magazine
Impact: low
Show code
is_magazine = magazine_binder.is_magazine
L12 🔴 global_write
Global write: weapon_default_magazine
Impact: low
Show code
weapon_default_magazine = magazine_binder.weapon_default_magazine
L13 🔴 global_write
Global write: weapon_improved_magazine
Impact: low
Show code
weapon_improved_magazine = magazine_binder.weapon_improved_magazine
L14 🔴 global_write
Global write: create_mag_data
Impact: low
Show code
create_mag_data = magazine_binder.create_mag_data
L15 🔴 global_write
Global write: print_dbg
Impact: low
Show code
print_dbg = magazines.print_dbg
L16 🔴 global_write
Global write: get_weapon_base_type
Impact: low
Show code
get_weapon_base_type = magazine_binder.get_weapon_base_type
L17 🔴 global_write
Global write: get_mags_for_basetype
Impact: low
Show code
get_mags_for_basetype = magazine_binder.get_mags_for_basetype
L18 🔴 global_write
Global write: valid_mag_data
Impact: low
Show code
valid_mag_data = magazine_binder.valid_mag_data
L19 🔴 global_write
Global write: get_config
Impact: low
Show code
get_config = magazines_mcm.get_config
L20 🔴 global_write
Global write: validate_mag
Impact: low
Show code
validate_mag = magazine_binder.validate_mag
L21 🔴 global_write
Global write: validate_wep
Impact: low
Show code
validate_wep = magazine_binder.validate_wep
L33 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update
L162 🔴 global_write
Global write: SetWepCondition
Impact: low
Show code
SetWepCondition = death_manager.set_weapon_drop_condition
L25 🟡 unused_local_variable
Local variable 'string_format' is assigned but never used
Impact: low
Show code
local string_format = string.format
L29 🟡 unused_local_variable
Local variable 'mag_timer_global' is assigned but never used
Impact: low
Show code
local mag_timer_global = nil
L30 🟡 unused_local_variable
Local variable 'tm' is assigned but never used
Impact: low
Show code
local tm = {}

magazines_mcm.script

L78 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "magazines",gr={

mags_patches.script

L206 🟢 repeated_obj_id()
obj:id() called 3x in ui_item.build_desc_header
Impact: low
Show code
Cache obj:id() result
L745 🟢 repeated_wpn_id()
wpn:id() called 4x in SwitchNextAmmo
Impact: low
Show code
Cache wpn:id() result
L780 🟢 repeated_wpn_id()
wpn:id() called 4x in OnAmmo
Impact: low
Show code
Cache wpn:id() result
L227 🟡 string_concat_in_loop
String concat in loop: _str = _str .. x
Impact: critical
Show code
_str = _str .. clr_p .. gc("st_dot") .. " ".. clr_1 .. gc("st_mag_"..k) .. " " .. utils_xml.get_color_con(color_ratio) .. v .. "/" .. total ..(total > outfit_slots[k] and string.format(gc("st_mag_bonus"),outfit_slots[k],total - outfit_slots[k] ) or "") .. "\\n"
L233 🟡 string_concat_in_loop
String concat in loop: _str = _str .. x
Impact: critical
Show code
_str = _str .. clr_p .. gc("st_dot") .. " ".. clr_1 .. gc("st_mag_"..k)..slots.. "\\n"
L299 🟡 string_concat_in_loop
String concat in loop: _str = _str .. x
Impact: critical
Show code
_str = _str .. "\\n " .. gc("st_dot").." ".. collected[#collected - i + 1]
L3 🔴 global_write
Global write: gc
Impact: low
Show code
gc = game.translate_string
L4 🔴 global_write
Global write: get_data
Impact: low
Show code
get_data = magazine_binder.get_data
L5 🔴 global_write
Global write: set_data
Impact: low
Show code
set_data = magazine_binder.set_data
L6 🔴 global_write
Global write: dump_data
Impact: low
Show code
dump_data = magazine_binder.dump_data
L7 🔴 global_write
Global write: is_supported_weapon
Impact: low
Show code
is_supported_weapon = magazine_binder.is_supported_weapon
L8 🔴 global_write
Global write: get_magazine_caliber
Impact: low
Show code
get_magazine_caliber = magazine_binder.get_magazine_caliber
L9 🔴 global_write
Global write: is_compatible
Impact: low
Show code
is_compatible = magazine_binder.is_compatible
L10 🔴 global_write
Global write: is_magazine
Impact: low
Show code
is_magazine = magazine_binder.is_magazine
L11 🔴 global_write
Global write: get_weapon_base_type
Impact: low
Show code
get_weapon_base_type = magazine_binder.get_weapon_base_type
L12 🔴 global_write
Global write: is_carried_mag
Impact: low
Show code
is_carried_mag = magazine_binder.is_carried_mag
L13 🔴 global_write
Global write: toggle_carried_mag
Impact: low
Show code
toggle_carried_mag = magazine_binder.toggle_carried_mag
L14 🔴 global_write
Global write: room_in_pouch
Impact: low
Show code
room_in_pouch = magazine_binder.room_in_pouch
L15 🔴 global_write
Global write: eject
Impact: low
Show code
eject = magazines.eject_magazine
L16 🔴 global_write
Global write: get_total_carried
Impact: low
Show code
get_total_carried = magazine_binder.get_total_carried
L17 🔴 global_write
Global write: get_loadout_size
Impact: low
Show code
get_loadout_size = magazine_binder.get_loadout_size
L18 🔴 global_write
Global write: weapon_default_magazine
Impact: low
Show code
weapon_default_magazine = magazine_binder.weapon_default_magazine
L19 🔴 global_write
Global write: get_mag_loaded
Impact: low
Show code
get_mag_loaded = magazine_binder.get_mag_loaded
L20 🔴 global_write
Global write: print_dbg
Impact: low
Show code
print_dbg = magazines.print_dbg
L21 🔴 global_write
Global write: has_loadout_slots
Impact: low
Show code
has_loadout_slots = magazine_binder.has_loadout_slots
L22 🔴 global_write
Global write: get_loadout_slots
Impact: low
Show code
get_loadout_slots = magazine_binder.get_loadout_slots
L23 🔴 global_write
Global write: create_mag_data
Impact: low
Show code
create_mag_data = magazine_binder.create_mag_data
L24 🔴 global_write
Global write: validate_mag
Impact: low
Show code
validate_mag = magazine_binder.validate_mag
L25 🔴 global_write
Global write: validate_wep
Impact: low
Show code
validate_wep = magazine_binder.validate_wep
L26 🔴 global_write
Global write: create_time_event
Impact: low
Show code
create_time_event = magazines.create_time_event
L27 🔴 global_write
Global write: get_sec_chambered
Impact: low
Show code
get_sec_chambered = magazines.get_sec_chambered
L28 🔴 global_write
Global write: get_config
Impact: low
Show code
get_config = magazines_mcm.get_config
L42 🔴 global_write
Global write: mousebase
Impact: low
Show code
mousebase = utils_ui.UICellContainer.On_Mouse1
L84 🔴 global_write
Global write: DisassemblyWeapon
Impact: low
Show code
DisassemblyWeapon = item_parts.disassembly_weapon
L100 🔴 global_write
Global write: WorkshopUpgrade
Impact: low
Show code
WorkshopUpgrade = ui_workshop.UIWorkshopUpgrade.Upgrade
L122 🔴 global_write
Global write: WorkshopRepair
Impact: low
Show code
WorkshopRepair = ui_workshop.UIWorkshopRepair.Repair
L143 🔴 global_write
Global write: CanRepair
Impact: low
Show code
CanRepair = inventory_upgrades.can_repair_item
L149 🔴 global_write
Global write: TechUpgrade
Impact: low
Show code
TechUpgrade = ui_inventory.UIInventory.RMode_UpgradeYes
L165 🔴 global_write
Global write: UnloadAll
Impact: low
Show code
UnloadAll = item_weapon.unload_all_weapons
L200 🔴 global_write
Global write: original_build_desc_header
Impact: low
Show code
original_build_desc_header = ui_item.build_desc_header
L274 🔴 global_write
Global write: original_build_desc_footer
Impact: low
Show code
original_build_desc_footer = ui_item.build_desc_footer
L297 🔴 global_write
Global write: collected
Impact: low
Show code
collected = collect_mag_data(mag_data, true)
L320 🔴 global_write
Global write: CloneWep
Impact: low
Show code
CloneWep = _G.alife_clone_weapon
L394 🔴 global_write
Global write: id_1
Impact: low
Show code
id_1 = alife_create_item(default_mag, db.actor)
L395 🔴 global_write
Global write: id_2
Impact: low
Show code
id_2 = alife_create_item(default_mag, db.actor)
L404 🔴 global_write
Global write: NewGameEquipment
Impact: low
Show code
NewGameEquipment = itms_manager.new_game_equippment
L410 🔴 global_write
Global write: AzazelDeath
Impact: low
Show code
AzazelDeath = gamemode_azazel.actor_on_before_death
L471 🔴 global_write
Global write: BarTele
Impact: low
Show code
BarTele = xr_effects.bar_arena_teleport
L862 🔴 global_write
Global write: DetachScope
Impact: low
Show code
DetachScope = item_weapon.detach_scope
L864 🔴 global_write
Global write: AttachScope
Impact: low
Show code
AttachScope = item_weapon.attach_scope
L528 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if wpn and IsWeapon(wpn) and (not IsItem("fake_ammo_wpn",wpn:section())) then
L720 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if wpn and (wpn:section() == self.section) then
L775 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if wpn and (wpn:section() == self.section) and self.avail[n] then
L313 🟡 unused_local_variable
Local variable 'string_find' is assigned but never used
Impact: low
Show code
local string_find = string.find
L181 🟡 unused_local_variable
Local variable 'math_ceil' is assigned but never used
Impact: low
Show code
local math_ceil = math.ceil
L185 🟡 unused_local_variable
Local variable 'clr_y' is assigned but never used
Impact: low
Show code
local clr_y = utils_xml.get_color("yellow")
L186 🟡 unused_local_variable
Local variable 'clr_o' is assigned but never used
Impact: low
Show code
local clr_o = utils_xml.get_color("d_orange")
L189 🟡 unused_local_variable
Local variable 'clr_b' is assigned but never used
Impact: low
Show code
local clr_b = utils_xml.get_color("d_cyan")
L190 🟡 unused_local_variable
Local variable 'clr_b1' is assigned but never used
Impact: low
Show code
local clr_b1 = utils_xml.get_color("pda_blue")
L191 🟡 unused_local_variable
Local variable 'clr_b2' is assigned but never used
Impact: low
Show code
local clr_b2 = utils_xml.get_color("d_blue")
L194 🟡 unused_local_variable
Local variable 'clr_w' is assigned but never used
Impact: low
Show code
local clr_w = utils_xml.get_color("pda_white")
L314 🟡 unused_local_variable
Local variable 'string_gsub' is assigned but never used
Impact: low
Show code
local string_gsub = string.gsub

rax_icon_layers.script

L28 🟢 table_insert_append
table.insert(icon_layers[name], v) -> icon_layers[name][#icon_layers[name]+1] = v
Impact: high
Show code
table.insert(icon_layers[name], functor)

rax_persistent_highlight.script

L24 🟢 table_insert_append
table.insert(persistent_highlights[name], v) -> persistent_highlights[name][#persistent_highlights[name]+1] = v
Impact: high
Show code
table.insert(persistent_highlights[name], functor)
L57 🟢 uncached_globals_summary
Cache 1 globals in change_alpha
Impact: medium
Show code
L61: bit.band L62: bit.band
L44 🔴 global_write
Global write: persistant_highlight
Impact: low
Show code
persistant_highlight = self:GetPersistantHighlight()
L47 🔴 global_write
Global write: color
Impact: low
Show code
color = main_clr and change_alpha(persistant_highlight, 255) or persistant_highlight -- if main_clr set the alpha to max for reasons.
L55 🔴 global_write
Global write: clr_cache
Impact: low
Show code
clr_cache = {}
L61 🔴 global_write
Global write: b
Impact: low
Show code
b = bit.band(clr, 255)
L62 🔴 global_write
Global write: g
Impact: low
Show code
g = bit.band(bit.rshift(clr, 8), 255)
L63 🔴 global_write
Global write: r
Impact: low
Show code
r = bit.band(bit.rshift(clr, 16), 255)

rax_stacking_control.script

L54 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR UICellContainer:ValidateSimilar | no data recieved!")
L86 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR UICellContainer:FindSimilar | no data recieved!")

yyy_mag_sorting.script

L6 🔴 global_write
Global write: is_magazine
Impact: low
Show code
is_magazine = magazine_binder.is_magazine
L7 🔴 global_write
Global write: is_carried_mag
Impact: low
Show code
is_carried_mag = magazine_binder.is_carried_mag
L8 🔴 global_write
Global write: print_dbg
Impact: low
Show code
print_dbg = magazines.print_dbg
L11 🔴 global_write
Global write: ini
Impact: low
Show code
ini = ini_sys
L14 🔴 global_write
Global write: ui_catagories
Impact: low
Show code
ui_catagories = {}
L15 🔴 global_write
Global write: item_order
Impact: low
Show code
item_order = {}
L17 🔴 global_write
Global write: ab_w
Impact: low
Show code
ab_w, ab_h, ab_k = {}, {}, {}
L17 🔴 global_write
Global write: ab_h
Impact: low
Show code
ab_w, ab_h, ab_k = {}, {}, {}
L17 🔴 global_write
Global write: ab_k
Impact: low
Show code
ab_w, ab_h, ab_k = {}, {}, {}
L18 🔴 global_write
Global write: a_sec
Impact: low
Show code
a_sec, a_w, a_h, a_k = nil, nil, nil, nil
L18 🔴 global_write
Global write: a_w
Impact: low
Show code
a_sec, a_w, a_h, a_k = nil, nil, nil, nil
L18 🔴 global_write
Global write: a_h
Impact: low
Show code
a_sec, a_w, a_h, a_k = nil, nil, nil, nil
L18 🔴 global_write
Global write: a_k
Impact: low
Show code
a_sec, a_w, a_h, a_k = nil, nil, nil, nil
L19 🔴 global_write
Global write: b_sec
Impact: low
Show code
b_sec, b_w, b_h, b_k = nil, nil, nil, nil
L19 🔴 global_write
Global write: b_w
Impact: low
Show code
b_sec, b_w, b_h, b_k = nil, nil, nil, nil
L19 🔴 global_write
Global write: b_h
Impact: low
Show code
b_sec, b_w, b_h, b_k = nil, nil, nil, nil
L19 🔴 global_write
Global write: b_k
Impact: low
Show code
b_sec, b_w, b_h, b_k = nil, nil, nil, nil
L42 🔴 global_write
Global write: a_sec
Impact: low
Show code
a_sec = asec
L43 🔴 global_write
Global write: axis
Impact: low
Show code
axis = utils_xml.get_item_axis(a_sec,1)
L52 🔴 global_write
Global write: a_w
Impact: low
Show code
a_w = ab_w[a_sec]
L53 🔴 global_write
Global write: a_h
Impact: low
Show code
a_h = ab_h[a_sec]
L54 🔴 global_write
Global write: a_k
Impact: low
Show code
a_k = item_order[ab_k[a_sec]]
L57 🔴 global_write
Global write: b_sec
Impact: low
Show code
b_sec = bsec
L58 🔴 global_write
Global write: axis
Impact: low
Show code
axis = utils_xml.get_item_axis(b_sec,1)
L67 🔴 global_write
Global write: b_w
Impact: low
Show code
b_w = ab_w[b_sec]
L68 🔴 global_write
Global write: b_h
Impact: low
Show code
b_h = ab_h[b_sec]
L69 🔴 global_write
Global write: b_k
Impact: low
Show code
b_k = item_order[ab_k[b_sec]]
L192 🔴 global_write
Global write: axis
Impact: low
Show code
axis = utils_xml.get_item_axis(sec,1)
L30 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, kind, order = ini:r_line_ex("item_kind_order",i,"","")

207- Mags Redux (Disable G.A.M.M.A. Unjam Reload) - RavenAscendant

20 files (🟢28 🟡59 🔴176 🔵40)

a_magazine.script

L1 🔴 global_write
Global write: print_dbg
Impact: low
Show code
print_dbg = magazines.print_dbg
L2 🔴 global_write
Global write: is_magazine
Impact: low
Show code
is_magazine = magazine_binder.is_magazine
L4 🔴 global_write
Global write: GetCost
Impact: low
Show code
GetCost = utils_item.get_item_cost

aaa_rax_icon_override_mcm.script

L728 🟢 uncached_globals_summary
Cache 1 globals in Refresh
Impact: medium
Show code
L757: math.ceil L758: math.ceil
L22 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( "RAX: | %s | "..text ,time_global(), ...)
L367 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR utils_xml.set_icon | XML_box or XML_temp doesn't exist")
L375 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR utils_xml.set_icon | section [%s] doesn't exist in system ini", sec)
L18 🔴 global_write
Global write: icon_override
Impact: low
Show code
icon_override = ini_file_ex("icon_override\\icon_override.ltx")
L540 🔴 global_write
Global write: axis
Impact: low
Show code
axis = utils_xml.get_item_axis(a_sec,1)
L555 🔴 global_write
Global write: axis
Impact: low
Show code
axis = utils_xml.get_item_axis(b_sec,1)
L21 🟢 dead_code_if_false
Dead code: if false (lines 21-23)
Impact: low
Show code
if false then
L358 🟡 unused_local_variable
Local variable 'rw' is assigned but never used
Impact: low
Show code
local ico_size, rw, rh, _le = 0.7,1,1,50
L358 🟡 unused_local_variable
Local variable 'rh' is assigned but never used
Impact: low
Show code
local ico_size, rw, rh, _le = 0.7,1,1,50
L54 🟡 unused_local_variable
Local variable 'clr_list_hl' is assigned but never used
Impact: low
Show code
local clr_list_hl = {
L525 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, kind, order = ini_sys:r_line_ex("item_kind_order",i,"","")

actor_stash_patch.script

L13 🟢 table_insert_append
table.insert(conditions, v) -> conditions[#conditions+1] = v
Impact: high
Show code
table.insert(conditions, f)
L6 🟢 repeated_item_section()
item:section() called 3x in <global>
Impact: low
Show code
Cache item:section() result
L33 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local se_obj = alife_create("inv_backpack",actor:position(),actor:level_vertex_id(),actor:game_vertex_id())
L33 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local se_obj = alife_create("inv_backpack",actor:position(),actor:level_vertex_id(),actor:game_vertex_id())
L33 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local se_obj = alife_create("inv_backpack",actor:position(),actor:level_vertex_id(),actor:game_vertex_id())

ammo_check_mcm.script

L41 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![AC] " .. msg, ...)
L49 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
if dbg_log then dbg_log:log(msg, ...) end
L115 🔴 global_write
Global write: gc
Impact: low
Show code
gc = game.translate_string
L118 🔴 global_write
Global write: get_data
Impact: low
Show code
get_data = magazine_binder.get_data
L119 🔴 global_write
Global write: set_data
Impact: low
Show code
set_data = magazine_binder.set_data
L120 🔴 global_write
Global write: get_mag_loaded
Impact: low
Show code
get_mag_loaded = magazine_binder.get_mag_loaded or get_mag_loaded_shim -- get_mag_loaded does not exist in moddb version. MagsRedux needs update.
L121 🔴 global_write
Global write: is_supported_weapon
Impact: low
Show code
is_supported_weapon = magazine_binder.is_supported_weapon
L122 🔴 global_write
Global write: is_jammed_weapon
Impact: low
Show code
is_jammed_weapon = magazines.is_jammed_weapon
L123 🔴 global_write
Global write: get_sec_chambered
Impact: low
Show code
get_sec_chambered = magazines.get_sec_chambered
L126 🔴 global_write
Global write: get_data
Impact: low
Show code
get_data = null_function -- Should not be called, just in case.
L127 🔴 global_write
Global write: set_data
Impact: low
Show code
set_data = null_function -- Should not be called, just in case.
L128 🔴 global_write
Global write: is_supported_weapon
Impact: low
Show code
is_supported_weapon = null_function -- Always returns false, meaning none of the weapons are supported, fall back on vanilla ammo handling.
L129 🔴 global_write
Global write: get_mag_loaded
Impact: low
Show code
get_mag_loaded = null_function -- There is never a loaded magazine in vanilla.
L130 🔴 global_write
Global write: is_jammed_weapon
Impact: low
Show code
is_jammed_weapon = null_function -- Sadly, standalone mode does not report weapon jams for now.
L131 🔴 global_write
Global write: get_sec_chambered
Impact: low
Show code
get_sec_chambered = null_function -- No "one-in-the-chamber" feature in vanilla.
L144 🔴 global_write
Global write: ch_options
Impact: low
Show code
ch_options = {
L181 🔴 global_write
Global write: pos
Impact: low
Show code
pos = ActorMenu.get_maingame().m_ui_hud_states.m_ui_weapon_cur_ammo:GetWndPos()
L185 🔴 global_write
Global write: pos
Impact: low
Show code
pos = ActorMenu.get_maingame().m_ui_hud_states.m_ui_weapon_icon:GetWndPos()
L268 🔴 global_write
Global write: idx
Impact: low
Show code
idx = l_round((curAmmoPerc * 10) + .5) -- gives an integer value n for the decile of curAmmoPerc and 11 for full.
L201 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local weaponId = weapon:id()
L206 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local currentState = weapon:get_state()
L207 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
if not (currentState == 0 or weapon:weapon_in_grenade_mode()) then
L212 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local currentAmmo = weapon:get_ammo_in_magazine()
L217 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local sec = weapon:section()
L225 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
elseif weapon:weapon_in_grenade_mode() then

custom_functor_autoinject.script

L114 🟢 string_len
string.len(pos) -> #pos
Impact: low
Show code
sub_print_r(val,indent..string.rep(" ",string.len(pos)+8))
L115 🟢 string_len
string.len(pos) -> #pos
Impact: low
Show code
printf(indent..string.rep(" ",string.len(pos)+6).."}")
L105 🟢 uncached_globals_summary
Cache 1 globals in sub_print_r
Impact: medium
Show code
L106: tostring L107: tostring
L128 🟢 uncached_globals_summary
Cache 1 globals in print_table
Impact: medium
Show code
L137: type L139: type
L107 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."*"..tostring(t))
L113 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."["..pos.."] => "..tostring(t).." {")
L115 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent..string.rep(" ",string.len(pos)+6).."}")
L117 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."["..pos.."] => "..tostring(val))
L121 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent..tostring(t))
L140 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = function",k)
L143 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s",k,utils_data.vector_to_string(v))
L145 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = userdata", k)
L150 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = true",k)
L152 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = true")
L156 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = false", k)
L158 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = false")
L163 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s", k,v)
L165 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = nil", k,v)
L319 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s, %s", k, v.index)
L322 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s, %s, max custom_functor reached", k, v.index)
L424 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Custom functors, processing queue")
L427 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Custom functors, type %s", v.type)
L464 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("functor slot is not valid, min 1, max 10, your slot: %s", slot)
L479 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("functor slot is not valid min 1, max 10, your slot: %s", slot)
L515 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[" .. k .. "] => ")
L98 🟡 unused_local_variable
Local variable 'table_remove' is assigned but never used
Impact: low
Show code
local table_remove = table.remove

ish_mag_bars.script

L21 🟡 unused_local_variable
Local variable 'vanilla_bar_list_for_reference_not_used_here' is assigned but never used
Impact: low
Show code
local vanilla_bar_list_for_reference_not_used_here = {

mag_hud.script

L162 🟢 uncached_globals_summary
Cache 1 globals in Update
Impact: medium
Show code
L204: pairs L213: pairs
L367 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("sacle %s", scale)
L186 🔴 global_write
Global write: id
Impact: low
Show code
id = item:id()
L299 🔴 global_write
Global write: count
Impact: low
Show code
count = self.count
L401 🔴 global_write
Global write: p_width
Impact: low
Show code
p_width = parent_width or 1024
L402 🔴 global_write
Global write: p_center
Impact: low
Show code
p_center = p_width/2
L403 🔴 global_write
Global write: width
Impact: low
Show code
width = ele:GetWidth()
L404 🔴 global_write
Global write: pos
Impact: low
Show code
pos = ele:GetWndPos()
L405 🔴 global_write
Global write: anchorpos
Impact: low
Show code
anchorpos = {}
L409 🔴 global_write
Global write: ratio
Impact: low
Show code
ratio = (device().height / device().width) / (768 / 1024)
L410 🔴 global_write
Global write: xadjust
Impact: low
Show code
xadjust = anchorpos.left
L413 🔴 global_write
Global write: xadjust
Impact: low
Show code
xadjust = p_width - (p_width - (anchor and anchorpos[anchor] or anchorpos.left))*ratio
L415 🔴 global_write
Global write: xadjust
Impact: low
Show code
xadjust = p_center - (p_center - (anchor and anchorpos[anchor] or anchorpos.left))*ratio
L417 🔴 global_write
Global write: xadjust
Impact: low
Show code
xadjust = ratio * (anchor and anchorpos[anchor] or anchorpos.left)
L14 🟡 unused_local_variable
Local variable 'gc' is assigned but never used
Impact: low
Show code
local gc = game.translate_string
L23 🟡 unused_local_variable
Local variable 'show_bgrd' is assigned but never used
Impact: low
Show code
local show_bgrd

magazine_binder.script

L169 🟢 table_insert_append
table.insert(t, v) -> t[#t+1] = v
Impact: high
Show code
table.insert(t, v2)
L180 🟢 uncached_globals_summary
Cache 1 globals in type_correction
Impact: medium
Show code
L184: type L186: type
L42 🟡 string_concat_in_loop
String concat in loop: s = s .. x
Impact: critical
Show code
s = s .. v .. " "
L62 🔴 global_write
Global write: tbl
Impact: low
Show code
tbl = {}
L310 🔴 global_write
Global write: carried
Impact: low
Show code
carried = get_total_carried()
L657 🔴 global_write
Global write: ready_color
Impact: low
Show code
ready_color = GetARGB(100, 255, 159, 82)
L191 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
section = obj:section()
L523 🟡 potential_nil_access
Potential nil access: 'wpn_obj' from level.object_by_id() used without nil check
Impact: low
Show code
if wpn_obj and wpn_obj:weapon_in_grenade_mode() then return end

magazines.script

L209 🟢 repeated_item_section()
item:section() called 3x in on_item_drag_dropped
Impact: low
Show code
Cache item:section() result
L209 🟢 repeated_weapon_section()
weapon:section() called 3x in on_item_drag_dropped
Impact: low
Show code
Cache weapon:section() result
L222 🟢 repeated_weapon_id()
weapon:id() called 3x in on_item_drag_dropped
Impact: low
Show code
Cache weapon:id() result
L375 🟢 repeated_ammo_section()
ammo:section() called 3x in chamber_single_round
Impact: low
Show code
Cache ammo:section() result
L816 🟢 repeated_magazine_id()
magazine:id() called 3x in fast_unload_magazine
Impact: low
Show code
Cache magazine:id() result
L36 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
dbg_log:log( text , ...)
L38 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( "RAX: | %s | "..text ,time_global(), ...)
L50 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
err_log:log( text , ...)
L52 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe( "ERR: | %s | "..text ,time_global(), ...)
L6 🔴 global_write
Global write: gc
Impact: low
Show code
gc = game.translate_string
L7 🔴 global_write
Global write: get_mag_data
Impact: low
Show code
get_mag_data = magazine_binder.get_data
L8 🔴 global_write
Global write: set_mag_data
Impact: low
Show code
set_mag_data = magazine_binder.set_data
L9 🔴 global_write
Global write: is_supported_weapon
Impact: low
Show code
is_supported_weapon = magazine_binder.is_supported_weapon
L10 🔴 global_write
Global write: get_magazine_caliber
Impact: low
Show code
get_magazine_caliber = magazine_binder.get_magazine_caliber
L11 🔴 global_write
Global write: weapon_default_magazine
Impact: low
Show code
weapon_default_magazine = magazine_binder.weapon_default_magazine
L12 🔴 global_write
Global write: is_compatible
Impact: low
Show code
is_compatible = magazine_binder.is_compatible
L13 🔴 global_write
Global write: isMagazine
Impact: low
Show code
isMagazine = magazine_binder.is_magazine
L14 🔴 global_write
Global write: is_magazine
Impact: low
Show code
is_magazine = magazine_binder.is_magazine
L15 🔴 global_write
Global write: get_mag_loaded
Impact: low
Show code
get_mag_loaded = magazine_binder.get_mag_loaded
L16 🔴 global_write
Global write: is_carried_mag
Impact: low
Show code
is_carried_mag = magazine_binder.is_carried_mag
L17 🔴 global_write
Global write: toggle_carried_mag
Impact: low
Show code
toggle_carried_mag = magazine_binder.toggle_carried_mag
L18 🔴 global_write
Global write: get_carried_mags
Impact: low
Show code
get_carried_mags = magazine_binder.get_carried_mags
L19 🔴 global_write
Global write: room_in_pouch
Impact: low
Show code
room_in_pouch = magazine_binder.room_in_pouch
L20 🔴 global_write
Global write: get_retool_section
Impact: low
Show code
get_retool_section = magazine_binder.get_retool_section
L21 🔴 global_write
Global write: get_weapon_base_type
Impact: low
Show code
get_weapon_base_type = magazine_binder.get_weapon_base_type
L22 🔴 global_write
Global write: get_magazine_base_type
Impact: low
Show code
get_magazine_base_type = magazine_binder.get_magazine_base_type
L23 🔴 global_write
Global write: get_mags_for_basetype
Impact: low
Show code
get_mags_for_basetype = magazine_binder.get_mags_for_basetype
L24 🔴 global_write
Global write: dump_data
Impact: low
Show code
dump_data = magazine_binder.dump_data
L25 🔴 global_write
Global write: get_mags_by_ammo_type
Impact: low
Show code
get_mags_by_ammo_type = magazine_binder.get_mags_by_ammo_type
L26 🔴 global_write
Global write: get_config
Impact: low
Show code
get_config = magazines_mcm.get_config
L135 🔴 global_write
Global write: cache_mag_time
Impact: low
Show code
cache_mag_time = {}
L317 🔴 global_write
Global write: weapon
Impact: low
Show code
weapon = get_object_by_id(id)
L495 🔴 global_write
Global write: se_mag
Impact: low
Show code
se_mag = alife_create_item(mag_data.section, weapon:parent())
L620 🔴 global_write
Global write: FADArun
Impact: low
Show code
FADArun = enhanced_animations and enhanced_animations.used_item and true or false
L715 🔴 global_write
Global write: ext_ammo_obj
Impact: low
Show code
ext_ammo_obj = get_object_by_id(ext_ammo_box)
L720 🔴 global_write
Global write: new_ammo_box
Impact: low
Show code
new_ammo_box = find_next_box(ammo_section, ext_ammo_box)
L932 🔴 global_write
Global write: new_obj
Impact: low
Show code
new_obj = alife_create_item(retool_section, obj:parent())
L1058 🔴 global_write
Global write: args
Impact: low
Show code
args = str_explode(k, ",")
L83 🟡 potential_nil_access
Potential nil access: 'parent' from :parent() used without nil check
Impact: low
Show code
if parent:id() == 0 then return false end
L84 🟡 potential_nil_access
Potential nil access: 'parent' from :parent() used without nil check
Impact: low
Show code
local se_parent = alife_object(parent:id())
L576 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local id = weapon:id()
L578 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local state = weapon and weapon:get_state()
L654 🟡 potential_nil_access
Potential nil access: 'current_weapon' from :active_item() used without nil check
Impact: low
Show code
if (current_weapon and current_weapon:id() ~= weapon_id) and time_global() < timeout + 5000 then return false end
L659 🟡 potential_nil_access
Potential nil access: 'weapon' from level.object_by_id() used without nil check (auto-fixable)
Impact: low
Show code
print_dbg("ujwt weapon:%s", weapon and weapon:name())
L758 🟡 potential_nil_access
Potential nil access: 'mag_parent' from db.actor() used without nil check
Impact: low
Show code
create_ammo(round, mag_parent:position(), mag_parent:level_vertex_id(), mag_parent:game_vertex_id(), mag_parent:id(), 1)
L758 🟡 potential_nil_access
Potential nil access: 'mag_parent' from db.actor() used without nil check
Impact: low
Show code
create_ammo(round, mag_parent:position(), mag_parent:level_vertex_id(), mag_parent:game_vertex_id(), mag_parent:id(), 1)
L758 🟡 potential_nil_access
Potential nil access: 'mag_parent' from db.actor() used without nil check
Impact: low
Show code
create_ammo(round, mag_parent:position(), mag_parent:level_vertex_id(), mag_parent:game_vertex_id(), mag_parent:id(), 1)
L758 🟡 potential_nil_access
Potential nil access: 'mag_parent' from db.actor() used without nil check
Impact: low
Show code
create_ammo(round, mag_parent:position(), mag_parent:level_vertex_id(), mag_parent:game_vertex_id(), mag_parent:id(), 1)
L789 🟡 potential_nil_access
Potential nil access: 'parent' from :parent() used without nil check
Impact: low
Show code
parent:iterate_inventory_box(itr_box)
L791 🟡 potential_nil_access
Potential nil access: 'parent' from :parent() used without nil check
Impact: low
Show code
parent:iterate_inventory(itr_box)
L796 🟡 potential_nil_access
Potential nil access: 'ammo_box' from level.object_by_id() used without nil check
Impact: low
Show code
local loaded = ammo_box:ammo_get_count() > ammo_to_load and ammo_to_load or ammo_box:ammo_get_count()
L796 🟡 potential_nil_access
Potential nil access: 'ammo_box' from level.object_by_id() used without nil check
Impact: low
Show code
local loaded = ammo_box:ammo_get_count() > ammo_to_load and ammo_to_load or ammo_box:ammo_get_count()
L797 🟡 potential_nil_access
Potential nil access: 'ammo_box' from level.object_by_id() used without nil check
Impact: low
Show code
local release_box = loaded == ammo_box:ammo_get_count()
L803 🟡 potential_nil_access
Potential nil access: 'ammo_box' from level.object_by_id() used without nil check
Impact: low
Show code
ammo_to_load = ammo_to_load - ammo_box:ammo_get_count()
L806 🟡 potential_nil_access
Potential nil access: 'ammo_box' from level.object_by_id() used without nil check
Impact: low
Show code
ammo_box:ammo_set_count(ammo_box:ammo_get_count() - loaded)
L806 🟡 potential_nil_access
Potential nil access: 'ammo_box' from level.object_by_id() used without nil check
Impact: low
Show code
ammo_box:ammo_set_count(ammo_box:ammo_get_count() - loaded)

magazines_keybinds.script

L2 🔴 global_write
Global write: print_dbg
Impact: low
Show code
print_dbg = magazines.print_dbg
L5 🔴 global_write
Global write: InventoryClick
Impact: low
Show code
InventoryClick = ui_inventory.UIInventory.On_CC_Mouse1

magazines_loot.script

L225 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!!! FRAUD DETECTED !!! Item %s should not have mag data!", sec)
L4 🔴 global_write
Global write: gc
Impact: low
Show code
gc = game.translate_string
L5 🔴 global_write
Global write: get_data
Impact: low
Show code
get_data = magazine_binder.get_data
L6 🔴 global_write
Global write: set_data
Impact: low
Show code
set_data = magazine_binder.set_data
L7 🔴 global_write
Global write: get_mag_loaded
Impact: low
Show code
get_mag_loaded = magazine_binder.get_mag_loaded
L8 🔴 global_write
Global write: prep_weapon
Impact: low
Show code
prep_weapon = magazines.prep_weapon
L9 🔴 global_write
Global write: is_supported_weapon
Impact: low
Show code
is_supported_weapon = magazine_binder.is_supported_weapon
L10 🔴 global_write
Global write: get_magazine_caliber
Impact: low
Show code
get_magazine_caliber = magazine_binder.get_magazine_caliber
L11 🔴 global_write
Global write: is_magazine
Impact: low
Show code
is_magazine = magazine_binder.is_magazine
L12 🔴 global_write
Global write: weapon_default_magazine
Impact: low
Show code
weapon_default_magazine = magazine_binder.weapon_default_magazine
L13 🔴 global_write
Global write: weapon_improved_magazine
Impact: low
Show code
weapon_improved_magazine = magazine_binder.weapon_improved_magazine
L14 🔴 global_write
Global write: create_mag_data
Impact: low
Show code
create_mag_data = magazine_binder.create_mag_data
L15 🔴 global_write
Global write: print_dbg
Impact: low
Show code
print_dbg = magazines.print_dbg
L16 🔴 global_write
Global write: get_weapon_base_type
Impact: low
Show code
get_weapon_base_type = magazine_binder.get_weapon_base_type
L17 🔴 global_write
Global write: get_mags_for_basetype
Impact: low
Show code
get_mags_for_basetype = magazine_binder.get_mags_for_basetype
L18 🔴 global_write
Global write: valid_mag_data
Impact: low
Show code
valid_mag_data = magazine_binder.valid_mag_data
L19 🔴 global_write
Global write: get_config
Impact: low
Show code
get_config = magazines_mcm.get_config
L20 🔴 global_write
Global write: validate_mag
Impact: low
Show code
validate_mag = magazine_binder.validate_mag
L21 🔴 global_write
Global write: validate_wep
Impact: low
Show code
validate_wep = magazine_binder.validate_wep
L33 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update
L162 🔴 global_write
Global write: SetWepCondition
Impact: low
Show code
SetWepCondition = death_manager.set_weapon_drop_condition
L25 🟡 unused_local_variable
Local variable 'string_format' is assigned but never used
Impact: low
Show code
local string_format = string.format
L29 🟡 unused_local_variable
Local variable 'mag_timer_global' is assigned but never used
Impact: low
Show code
local mag_timer_global = nil
L30 🟡 unused_local_variable
Local variable 'tm' is assigned but never used
Impact: low
Show code
local tm = {}

magazines_mcm.script

L78 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "magazines",gr={

mags_patches.script

L206 🟢 repeated_obj_id()
obj:id() called 3x in ui_item.build_desc_header
Impact: low
Show code
Cache obj:id() result
L745 🟢 repeated_wpn_id()
wpn:id() called 4x in SwitchNextAmmo
Impact: low
Show code
Cache wpn:id() result
L780 🟢 repeated_wpn_id()
wpn:id() called 4x in OnAmmo
Impact: low
Show code
Cache wpn:id() result
L227 🟡 string_concat_in_loop
String concat in loop: _str = _str .. x
Impact: critical
Show code
_str = _str .. clr_p .. gc("st_dot") .. " ".. clr_1 .. gc("st_mag_"..k) .. " " .. utils_xml.get_color_con(color_ratio) .. v .. "/" .. total ..(total > outfit_slots[k] and string.format(gc("st_mag_bonus"),outfit_slots[k],total - outfit_slots[k] ) or "") .. "\\n"
L233 🟡 string_concat_in_loop
String concat in loop: _str = _str .. x
Impact: critical
Show code
_str = _str .. clr_p .. gc("st_dot") .. " ".. clr_1 .. gc("st_mag_"..k)..slots.. "\\n"
L299 🟡 string_concat_in_loop
String concat in loop: _str = _str .. x
Impact: critical
Show code
_str = _str .. "\\n " .. gc("st_dot").." ".. collected[#collected - i + 1]
L3 🔴 global_write
Global write: gc
Impact: low
Show code
gc = game.translate_string
L4 🔴 global_write
Global write: get_data
Impact: low
Show code
get_data = magazine_binder.get_data
L5 🔴 global_write
Global write: set_data
Impact: low
Show code
set_data = magazine_binder.set_data
L6 🔴 global_write
Global write: dump_data
Impact: low
Show code
dump_data = magazine_binder.dump_data
L7 🔴 global_write
Global write: is_supported_weapon
Impact: low
Show code
is_supported_weapon = magazine_binder.is_supported_weapon
L8 🔴 global_write
Global write: get_magazine_caliber
Impact: low
Show code
get_magazine_caliber = magazine_binder.get_magazine_caliber
L9 🔴 global_write
Global write: is_compatible
Impact: low
Show code
is_compatible = magazine_binder.is_compatible
L10 🔴 global_write
Global write: is_magazine
Impact: low
Show code
is_magazine = magazine_binder.is_magazine
L11 🔴 global_write
Global write: get_weapon_base_type
Impact: low
Show code
get_weapon_base_type = magazine_binder.get_weapon_base_type
L12 🔴 global_write
Global write: is_carried_mag
Impact: low
Show code
is_carried_mag = magazine_binder.is_carried_mag
L13 🔴 global_write
Global write: toggle_carried_mag
Impact: low
Show code
toggle_carried_mag = magazine_binder.toggle_carried_mag
L14 🔴 global_write
Global write: room_in_pouch
Impact: low
Show code
room_in_pouch = magazine_binder.room_in_pouch
L15 🔴 global_write
Global write: eject
Impact: low
Show code
eject = magazines.eject_magazine
L16 🔴 global_write
Global write: get_total_carried
Impact: low
Show code
get_total_carried = magazine_binder.get_total_carried
L17 🔴 global_write
Global write: get_loadout_size
Impact: low
Show code
get_loadout_size = magazine_binder.get_loadout_size
L18 🔴 global_write
Global write: weapon_default_magazine
Impact: low
Show code
weapon_default_magazine = magazine_binder.weapon_default_magazine
L19 🔴 global_write
Global write: get_mag_loaded
Impact: low
Show code
get_mag_loaded = magazine_binder.get_mag_loaded
L20 🔴 global_write
Global write: print_dbg
Impact: low
Show code
print_dbg = magazines.print_dbg
L21 🔴 global_write
Global write: has_loadout_slots
Impact: low
Show code
has_loadout_slots = magazine_binder.has_loadout_slots
L22 🔴 global_write
Global write: get_loadout_slots
Impact: low
Show code
get_loadout_slots = magazine_binder.get_loadout_slots
L23 🔴 global_write
Global write: create_mag_data
Impact: low
Show code
create_mag_data = magazine_binder.create_mag_data
L24 🔴 global_write
Global write: validate_mag
Impact: low
Show code
validate_mag = magazine_binder.validate_mag
L25 🔴 global_write
Global write: validate_wep
Impact: low
Show code
validate_wep = magazine_binder.validate_wep
L26 🔴 global_write
Global write: create_time_event
Impact: low
Show code
create_time_event = magazines.create_time_event
L27 🔴 global_write
Global write: get_sec_chambered
Impact: low
Show code
get_sec_chambered = magazines.get_sec_chambered
L28 🔴 global_write
Global write: get_config
Impact: low
Show code
get_config = magazines_mcm.get_config
L42 🔴 global_write
Global write: mousebase
Impact: low
Show code
mousebase = utils_ui.UICellContainer.On_Mouse1
L84 🔴 global_write
Global write: DisassemblyWeapon
Impact: low
Show code
DisassemblyWeapon = item_parts.disassembly_weapon
L100 🔴 global_write
Global write: WorkshopUpgrade
Impact: low
Show code
WorkshopUpgrade = ui_workshop.UIWorkshopUpgrade.Upgrade
L122 🔴 global_write
Global write: WorkshopRepair
Impact: low
Show code
WorkshopRepair = ui_workshop.UIWorkshopRepair.Repair
L143 🔴 global_write
Global write: CanRepair
Impact: low
Show code
CanRepair = inventory_upgrades.can_repair_item
L149 🔴 global_write
Global write: TechUpgrade
Impact: low
Show code
TechUpgrade = ui_inventory.UIInventory.RMode_UpgradeYes
L165 🔴 global_write
Global write: UnloadAll
Impact: low
Show code
UnloadAll = item_weapon.unload_all_weapons
L200 🔴 global_write
Global write: original_build_desc_header
Impact: low
Show code
original_build_desc_header = ui_item.build_desc_header
L274 🔴 global_write
Global write: original_build_desc_footer
Impact: low
Show code
original_build_desc_footer = ui_item.build_desc_footer
L297 🔴 global_write
Global write: collected
Impact: low
Show code
collected = collect_mag_data(mag_data, true)
L320 🔴 global_write
Global write: CloneWep
Impact: low
Show code
CloneWep = _G.alife_clone_weapon
L394 🔴 global_write
Global write: id_1
Impact: low
Show code
id_1 = alife_create_item(default_mag, db.actor)
L395 🔴 global_write
Global write: id_2
Impact: low
Show code
id_2 = alife_create_item(default_mag, db.actor)
L404 🔴 global_write
Global write: NewGameEquipment
Impact: low
Show code
NewGameEquipment = itms_manager.new_game_equippment
L410 🔴 global_write
Global write: AzazelDeath
Impact: low
Show code
AzazelDeath = gamemode_azazel.actor_on_before_death
L471 🔴 global_write
Global write: BarTele
Impact: low
Show code
BarTele = xr_effects.bar_arena_teleport
L862 🔴 global_write
Global write: DetachScope
Impact: low
Show code
DetachScope = item_weapon.detach_scope
L864 🔴 global_write
Global write: AttachScope
Impact: low
Show code
AttachScope = item_weapon.attach_scope
L528 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if wpn and IsWeapon(wpn) and (not IsItem("fake_ammo_wpn",wpn:section())) then
L720 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if wpn and (wpn:section() == self.section) then
L775 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if wpn and (wpn:section() == self.section) and self.avail[n] then
L313 🟡 unused_local_variable
Local variable 'string_find' is assigned but never used
Impact: low
Show code
local string_find = string.find
L181 🟡 unused_local_variable
Local variable 'math_ceil' is assigned but never used
Impact: low
Show code
local math_ceil = math.ceil
L185 🟡 unused_local_variable
Local variable 'clr_y' is assigned but never used
Impact: low
Show code
local clr_y = utils_xml.get_color("yellow")
L186 🟡 unused_local_variable
Local variable 'clr_o' is assigned but never used
Impact: low
Show code
local clr_o = utils_xml.get_color("d_orange")
L189 🟡 unused_local_variable
Local variable 'clr_b' is assigned but never used
Impact: low
Show code
local clr_b = utils_xml.get_color("d_cyan")
L190 🟡 unused_local_variable
Local variable 'clr_b1' is assigned but never used
Impact: low
Show code
local clr_b1 = utils_xml.get_color("pda_blue")
L191 🟡 unused_local_variable
Local variable 'clr_b2' is assigned but never used
Impact: low
Show code
local clr_b2 = utils_xml.get_color("d_blue")
L194 🟡 unused_local_variable
Local variable 'clr_w' is assigned but never used
Impact: low
Show code
local clr_w = utils_xml.get_color("pda_white")
L314 🟡 unused_local_variable
Local variable 'string_gsub' is assigned but never used
Impact: low
Show code
local string_gsub = string.gsub

rax_icon_layers.script

L28 🟢 table_insert_append
table.insert(icon_layers[name], v) -> icon_layers[name][#icon_layers[name]+1] = v
Impact: high
Show code
table.insert(icon_layers[name], functor)

rax_persistent_highlight.script

L24 🟢 table_insert_append
table.insert(persistent_highlights[name], v) -> persistent_highlights[name][#persistent_highlights[name]+1] = v
Impact: high
Show code
table.insert(persistent_highlights[name], functor)
L57 🟢 uncached_globals_summary
Cache 1 globals in change_alpha
Impact: medium
Show code
L61: bit.band L62: bit.band
L44 🔴 global_write
Global write: persistant_highlight
Impact: low
Show code
persistant_highlight = self:GetPersistantHighlight()
L47 🔴 global_write
Global write: color
Impact: low
Show code
color = main_clr and change_alpha(persistant_highlight, 255) or persistant_highlight -- if main_clr set the alpha to max for reasons.
L55 🔴 global_write
Global write: clr_cache
Impact: low
Show code
clr_cache = {}
L61 🔴 global_write
Global write: b
Impact: low
Show code
b = bit.band(clr, 255)
L62 🔴 global_write
Global write: g
Impact: low
Show code
g = bit.band(bit.rshift(clr, 8), 255)
L63 🔴 global_write
Global write: r
Impact: low
Show code
r = bit.band(bit.rshift(clr, 16), 255)

rax_stacking_control.script

L54 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR UICellContainer:ValidateSimilar | no data recieved!")
L86 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR UICellContainer:FindSimilar | no data recieved!")

trader_autoinject.script

L34 🟢 repeated_npc_id()
npc:id() called 3x in trade_manager.update
Impact: low
Show code
Cache npc:id() result
L184 🟢 repeated_item_section()
item:section() called 4x in itr_inv
Impact: low
Show code
Cache item:section() result
L16 🔴 global_write
Global write: find
Impact: low
Show code
find = string.find
L32 🔴 global_write
Global write: TraderUpdate
Impact: low
Show code
TraderUpdate = trade_manager.update

ui_encyclopedia_autoinject.script

L17 🟢 table_insert_append
table.insert(new_cat, v) -> new_cat[#new_cat+1] = v
Impact: high
Show code
table.insert(new_cat, section)
L28 🟢 table_insert_append
table.insert(new_art[category].articles, v) -> new_art[category].articles[#new_art[category].articles+1] = v
Impact: high
Show code
table.insert(new_art[category].articles, article)
L16 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("category: processing %s", section)
L22 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("article: processing %s", section)
L59 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("there are %s new categories", #new_cat)
L33 🔴 global_write
Global write: InitArticles
Impact: low
Show code
InitArticles = ui_pda_encyclopedia_tab.pda_encyclopedia_tab.InitArticles
L56 🔴 global_write
Global write: InitCategories
Impact: low
Show code
InitCategories = ui_pda_encyclopedia_tab.pda_encyclopedia_tab.InitCategories
L62 🔴 global_write
Global write: item
Impact: low
Show code
item = ui_pda_encyclopedia_tab.pda_encyclopedia_entry(v, k, clr)
L25 🟡 unused_local_variable
Local variable 'junk1' is assigned but never used
Impact: low
Show code
local junk1, article, category = ini_art:r_line(section, i, "", "")

ui_pda_autoinject.script

L16 🟢 table_insert_append
table.insert(new_cat, v) -> new_cat[#new_cat+1] = v
Impact: high
Show code
table.insert(new_cat, section)
L27 🟢 table_insert_append
table.insert(new_art[category].articles, v) -> new_art[category].articles[#new_art[category].articles+1] = v
Impact: high
Show code
table.insert(new_art[category].articles, article)
L15 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("category: processing %s", section)
L21 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("article: processing %s", section)
L58 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("there are %s new categories", #new_cat)
L32 🔴 global_write
Global write: InitArticles
Impact: low
Show code
InitArticles = ui_pda_encyclopedia_tab.pda_encyclopedia_tab.InitArticles
L55 🔴 global_write
Global write: InitCategories
Impact: low
Show code
InitCategories = ui_pda_encyclopedia_tab.pda_encyclopedia_tab.InitCategories
L61 🔴 global_write
Global write: item
Impact: low
Show code
item = ui_pda_encyclopedia_tab.pda_encyclopedia_entry(v, k, clr)
L24 🟡 unused_local_variable
Local variable 'junk1' is assigned but never used
Impact: low
Show code
local junk1, article, category = ini_art:r_line(section, i, "", "")

yyy_mag_sorting.script

L6 🔴 global_write
Global write: is_magazine
Impact: low
Show code
is_magazine = magazine_binder.is_magazine
L7 🔴 global_write
Global write: is_carried_mag
Impact: low
Show code
is_carried_mag = magazine_binder.is_carried_mag
L8 🔴 global_write
Global write: print_dbg
Impact: low
Show code
print_dbg = magazines.print_dbg
L11 🔴 global_write
Global write: ini
Impact: low
Show code
ini = ini_sys
L14 🔴 global_write
Global write: ui_catagories
Impact: low
Show code
ui_catagories = {}
L15 🔴 global_write
Global write: item_order
Impact: low
Show code
item_order = {}
L17 🔴 global_write
Global write: ab_w
Impact: low
Show code
ab_w, ab_h, ab_k = {}, {}, {}
L17 🔴 global_write
Global write: ab_h
Impact: low
Show code
ab_w, ab_h, ab_k = {}, {}, {}
L17 🔴 global_write
Global write: ab_k
Impact: low
Show code
ab_w, ab_h, ab_k = {}, {}, {}
L18 🔴 global_write
Global write: a_sec
Impact: low
Show code
a_sec, a_w, a_h, a_k = nil, nil, nil, nil
L18 🔴 global_write
Global write: a_w
Impact: low
Show code
a_sec, a_w, a_h, a_k = nil, nil, nil, nil
L18 🔴 global_write
Global write: a_h
Impact: low
Show code
a_sec, a_w, a_h, a_k = nil, nil, nil, nil
L18 🔴 global_write
Global write: a_k
Impact: low
Show code
a_sec, a_w, a_h, a_k = nil, nil, nil, nil
L19 🔴 global_write
Global write: b_sec
Impact: low
Show code
b_sec, b_w, b_h, b_k = nil, nil, nil, nil
L19 🔴 global_write
Global write: b_w
Impact: low
Show code
b_sec, b_w, b_h, b_k = nil, nil, nil, nil
L19 🔴 global_write
Global write: b_h
Impact: low
Show code
b_sec, b_w, b_h, b_k = nil, nil, nil, nil
L19 🔴 global_write
Global write: b_k
Impact: low
Show code
b_sec, b_w, b_h, b_k = nil, nil, nil, nil
L42 🔴 global_write
Global write: a_sec
Impact: low
Show code
a_sec = asec
L43 🔴 global_write
Global write: axis
Impact: low
Show code
axis = utils_xml.get_item_axis(a_sec,1)
L52 🔴 global_write
Global write: a_w
Impact: low
Show code
a_w = ab_w[a_sec]
L53 🔴 global_write
Global write: a_h
Impact: low
Show code
a_h = ab_h[a_sec]
L54 🔴 global_write
Global write: a_k
Impact: low
Show code
a_k = item_order[ab_k[a_sec]]
L57 🔴 global_write
Global write: b_sec
Impact: low
Show code
b_sec = bsec
L58 🔴 global_write
Global write: axis
Impact: low
Show code
axis = utils_xml.get_item_axis(b_sec,1)
L67 🔴 global_write
Global write: b_w
Impact: low
Show code
b_w = ab_w[b_sec]
L68 🔴 global_write
Global write: b_h
Impact: low
Show code
b_h = ab_h[b_sec]
L69 🔴 global_write
Global write: b_k
Impact: low
Show code
b_k = item_order[ab_k[b_sec]]
L192 🔴 global_write
Global write: axis
Impact: low
Show code
axis = utils_xml.get_item_axis(sec,1)
L30 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, kind, order = ini:r_line_ex("item_kind_order",i,"","")

208- Ironman Roguelite (for easier ironman lovers) - Jabbers

7 files (🟢34 🟡12 🔴0 🔵0)

roguelite_manager.script

L39 🟢 uncached_globals_summary
Cache 2 globals in print_table
Impact: medium
Show code
L44: string.rep L51: string.rep L47: type L53: type
L246 🟢 uncached_globals_summary
Cache 1 globals in restore_item
Impact: medium
Show code
L248: string.find L249: string.find
L51 🟡 string_concat_in_loop
String concat in loop: toprint = toprint .. x
Impact: critical
Show code
toprint = toprint .. string.rep(" ", indent)

roguelite_manager_mcm.script

L38 🟢 table_insert_append
table.insert(op.gr, v) -> op.gr[#op.gr+1] = v
Impact: high
Show code
table.insert(op.gr, { id = "line" , type = "line" })
L39 🟢 table_insert_append
table.insert(op.gr, v) -> op.gr[#op.gr+1] = v
Impact: high
Show code
table.insert(op.gr, {
L45 🟢 table_insert_append
table.insert(op.gr, v) -> op.gr[#op.gr+1] = v
Impact: high
Show code
table.insert(op.gr, {

roguelite_module_character_rep.script

L83 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr, { id = "line", type = "line" })
L84 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr, {
L90 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr, {
L96 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr, {
L105 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr, {
L116 🟢 uncached_globals_summary
Cache 1 globals in on_option_change
Impact: medium
Show code
L119: tostring L120: tostring

roguelite_module_placeables.script

L196 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(i)

roguelite_module_player_corpse.script

L239 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr, { id = "line" , type = "line" })
L240 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr, {
L246 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr, {
L252 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr, {
L261 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr, {
L267 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr, {
L278 🟢 uncached_globals_summary
Cache 1 globals in on_option_change
Impact: medium
Show code
L281: tostring L282: tostring
L340 🟢 uncached_globals_summary
Cache 1 globals in new_create_release_item
Impact: medium
Show code
L341: tostring L348: tostring
L341 🟢 repeated_npc_id()
npc:id() called 4x in new_create_release_item
Impact: low
Show code
Cache npc:id() result
L26 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local pos = actor:position()
L33 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
m_level_vertex_id = actor:level_vertex_id(),
L34 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
m_game_vertex_id = actor:game_vertex_id(),
L35 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
character_name = actor:character_name(),
L37 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
visual = actor:get_visual_name(),
L38 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
character_icon = actor:character_icon(),
L46 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(i)

roguelite_module_stashes.script

L62 🟢 table_insert_append
table.insert(m_data.spawned_stashes, v) -> m_data.spawned_stashes[#m_data.spawned_stashes+1] = v
Impact: high
Show code
table.insert(m_data.spawned_stashes, se_obj.id)
L392 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr, { id = "line" , type = "line" })
L393 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr, {
L399 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr, {
L405 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr, {
L411 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr, {
L417 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr, {
L428 🟢 uncached_globals_summary
Cache 1 globals in on_option_change
Impact: medium
Show code
L431: tostring L432: tostring
L129 🟢 repeated_box_id()
box:id() called 5x in try_spawn_stash
Impact: low
Show code
Cache box:id() result
L176 🟡 potential_nil_access
Potential nil access: 'p_se_obj' from :object() used without nil check (auto-fixable)
Impact: low
Show code
roguelite_manager.debug_write("Saving parent item "..p_se_obj:section_name())
L209 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(i)
L227 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(i)

roguelite_module_trader_rep.script

L129 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr, { id = "line", type = "line" })
L130 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr, {
L136 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr, {
L142 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr, {
L16 🟢 uncached_globals_summary
Cache 1 globals in update_character_rep
Impact: medium
Show code
L36: tostring L39: tostring

210- Disables Music in game but not in main menu (if you do not like the new OST) - Ishmaeel

1 file (🟢0 🟡0 🔴0 🔵7)

ish_eine_kleine_nah_music.script

L12 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("on_game_start")
L19 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("actor_on_first_update")
L24 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("actor_on_net_destroy")
L29 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Main menu: %s", state)
L40 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("restore")
L45 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("silence")
L52 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Exec: %s %s", cmd, arg)

211- NPC Loot Claim (NPCs will kill you if you loot what they killed) - Vintar0 & Nullblank

1 file (🟢1 🟡1 🔴0 🔵0)

npc_loot_claim.script

L10 🟢 uncached_globals_summary
Cache 1 globals in check_claim
Impact: medium
Show code
L28: math.random L43: math.random
L68 🟡 unused_local_variable
Local variable 'loot_check' is assigned but never used
Impact: low
Show code
local loot_check = true

212- Trader Destockifier (shrinks and randomize traders stocks) - Demonized

3 files (🟢8 🟡0 🔴4 🔵35)

trader_autoinject.script

L43 🟢 repeated_npc_id()
npc:id() called 3x in trade_manager.update
Impact: low
Show code
Cache npc:id() result
L187 🟢 repeated_item_section()
item:section() called 4x in itr_inv
Impact: low
Show code
Cache item:section() result
L16 🔴 global_write
Global write: find
Impact: low
Show code
find = string.find
L41 🔴 global_write
Global write: TraderUpdate
Impact: low
Show code
TraderUpdate = trade_manager.update

trader_destockifier_mcm.script

L1 🔴 global_write
Global write: op
Impact: low
Show code
op = {

zz_trader_destockifier.script

L54 🟢 string_len
string.len(pos) -> #pos
Impact: low
Show code
sub_print_r(val,indent..string.rep(" ",string.len(pos)+8))
L55 🟢 string_len
string.len(pos) -> #pos
Impact: low
Show code
printf(indent..string.rep(" ",string.len(pos)+6).."}")
L45 🟢 uncached_globals_summary
Cache 1 globals in sub_print_r
Impact: medium
Show code
L46: tostring L47: tostring
L135 🟢 repeated_item_section()
item:section() called 3x in create_items_table
Impact: low
Show code
Cache item:section() result
L171 🟢 repeated_item_section()
item:section() called 14x in <global>
Impact: low
Show code
Cache item:section() result
L708 🟢 repeated_npc_id()
npc:id() called 5x in trader_autoinject.update
Impact: low
Show code
Cache npc:id() result
L30 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Trader Destockifier: " .. str, ...)
L47 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."*"..tostring(t))
L53 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."["..pos.."] => "..tostring(t).." {")
L55 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent..string.rep(" ",string.len(pos)+6).."}")
L57 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."["..pos.."] => "..tostring(val))
L61 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent..tostring(t))
L70 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Table Print")
L104 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("%s table is empty, ignoring", key)
L116 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("picked %s", key)
L118 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("picked %s %s, id %s", key, k, v)
L144 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("collecting %s %s, id %s", self.key, sec, id)
L154 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Maximum for %s set to -1, not removing", self.max_key)
L161 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("%s is not in the picked table, removing. %s, id %s", self.key, sec, id)
L303 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("collecting %s %s, id %s", t.key, sec, id)
L311 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("%s table is empty, ignoring", t.key)
L331 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("picked %s", t.key)
L333 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("picked %s %s, id %s", t.key, k, v)
L342 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Maximum for %s set to -1, not removing", t.max_key)
L349 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("%s is not in the picked table, removing. %s, id %s", t.key, sec, id)
L370 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("%s table is empty, ignoring", self.key)
L404 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("picked %s", t.key)
L406 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("picked %s %s, id %s", t.key, k, v)
L416 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("picked %s", t.key)
L418 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("picked %s %s, id %s", t.key, k, v)
L439 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("%s table is empty, ignoring", self.key)
L467 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("picked %s", t.key)
L469 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("picked %s %s, id %s", t.key, k, v)
L479 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("picked %s", t.key)
L481 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("picked %s %s, id %s", t.key, k, v)
L491 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("picked %s", t.key)
L493 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("picked %s %s, id %s", t.key, k, v)
L555 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("%s table is empty, ignoring", self.key)
L609 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("%s is not in the picked table, removing. %s, id %s", self.key, sec, id)
L681 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("npc %s, %s is not trader", npc:name(), npc:id())
L735 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Registering")
L699 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update

214- New Item Highlight (not really necessary but some people like it) - RavenAscendant

2 files (🟢3 🟡0 🔴10 🔵0)

rax_inventory_highlights_mcm.script

L90 🟢 uncached_globals_summary
Cache 1 globals in actor_on_item_take
Impact: medium
Show code
L106: tostring L106: tostring
L31 🔴 global_write
Global write: highlight_color
Impact: low
Show code
highlight_color = GetARGB(50, 212, 175, 55)
L130 🔴 global_write
Global write: t
Impact: low
Show code
t = {
L142 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "new_item_highlight" ,sh=true ,gr= t } -- put the list of setting into the table describing the entire MCM menu
L154 🔴 global_write
Global write: highlight_color
Impact: low
Show code
highlight_color = GetARGB(a, r, g, b)

rax_persistent_highlight.script

L24 🟢 table_insert_append
table.insert(persistent_highlights[name], v) -> persistent_highlights[name][#persistent_highlights[name]+1] = v
Impact: high
Show code
table.insert(persistent_highlights[name], functor)
L57 🟢 uncached_globals_summary
Cache 1 globals in change_alpha
Impact: medium
Show code
L61: bit.band L62: bit.band
L44 🔴 global_write
Global write: persistant_highlight
Impact: low
Show code
persistant_highlight = self:GetPersistantHighlight()
L47 🔴 global_write
Global write: color
Impact: low
Show code
color = main_clr and change_alpha(persistant_highlight, 255) or persistant_highlight -- if main_clr set the alpha to max for reasons.
L55 🔴 global_write
Global write: clr_cache
Impact: low
Show code
clr_cache = {}
L61 🔴 global_write
Global write: b
Impact: low
Show code
b = bit.band(clr, 255)
L62 🔴 global_write
Global write: g
Impact: low
Show code
g = bit.band(bit.rshift(clr, 8), 255)
L63 🔴 global_write
Global write: r
Impact: low
Show code
r = bit.band(bit.rshift(clr, 16), 255)

216- Duty Expansion (dialogue camera issues, nimble and spore dialogues heavy bugs) - GhenTuong

9 files (🟢34 🟡17 🔴12 🔵37)

dialog.script

L257 🟢 table_insert_append
table.insert(text_list, v) -> text_list[#text_list+1] = v
Impact: high
Show code
table.insert( text_list, end_game_text )
L883 🟢 uncached_globals_summary
Cache 1 globals in text_trade_npc_pda
Impact: medium
Show code
L992: math.random L994: math.random
L1087 🟢 uncached_globals_summary
Cache 1 globals in surrender_victim_answers_bounty
Impact: medium
Show code
L1102: math.random L1104: math.random
L1132 🟢 uncached_globals_summary
Cache 1 globals in surrender_victim_answers_1
Impact: medium
Show code
L1135: math.random L1151: math.random
L2549 🟢 uncached_globals_summary
Cache 1 globals in trade_important_documents_reward
Impact: medium
Show code
L2575: math.random L2576: math.random
L678 🟢 repeated_npc_id()
npc:id() called 3x in npc_give_task
Impact: low
Show code
Cache npc:id() result
L1798 🟢 repeated_seller_id()
seller:id() called 4x in trade_init
Impact: low
Show code
Cache seller:id() result
L999 🟡 string_concat_in_loop
String concat in loop: npc_text = npc_text .. x
Impact: critical
Show code
npc_text = npc_text .. " " .. game.translate_string("st_drx_questlines_and_this_one") .. " "
L439 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL storyline task started: " .. last_task_id) )
L449 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL: drx_sl_task_giver_" .. giver_id .. " registered (" .. giver_task_count .. " outstanding)") )
L468 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL change factions task started: " .. last_task_id) )
L476 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL: drx_sl_task_giver_" .. giver_id .. " registered (" .. giver_task_count .. " outstanding)") )
L494 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL mechanic task started: " .. last_task_id) )
L500 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL: drx_sl_task_giver_" .. giver_id .. " registered (" .. giver_task_count .. " outstanding)") )
L516 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL dynamic task started: " .. last_task_id) )
L522 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL: drx_sl_task_giver_" .. giver_id .. " registered (" .. giver_task_count .. " outstanding)") )
L540 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL simulation task started: " .. last_task_id) )
L549 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL: drx_sl_task_giver_" .. giver_id .. " registered (" .. giver_task_count .. " outstanding)") )
L555 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL: drx_sl_hostage_giver_" .. giver_id .. " registered") )
L571 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL dynamic task started: " .. task_id) )
L576 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL: drx_sl_task_giver_" .. giver_id .. " registered (" .. giver_task_count .. " outstanding)") )
L590 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL simulation task started: " .. task_id) )
L595 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL: drx_sl_task_giver_" .. giver_id .. " registered (" .. giver_task_count .. " outstanding)") )
L1362 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Couldn't relocate money to NULL")
L1832 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Couldn't relocate money to NULL")
L80 🔴 global_write
Global write: last_task_id
Impact: low
Show code
last_task_id = nil
L176 🔴 global_write
Global write: last_task_id
Impact: low
Show code
last_task_id = task_section
L193 🔴 global_write
Global write: last_task_id
Impact: low
Show code
last_task_id = task_section
L210 🔴 global_write
Global write: last_task_id
Impact: low
Show code
last_task_id = task_section
L318 🔴 global_write
Global write: last_task_id
Impact: low
Show code
last_task_id = task_section
L328 🔴 global_write
Global write: last_task_id
Impact: low
Show code
last_task_id = task_section
L452 🔴 global_write
Global write: last_task_id
Impact: low
Show code
last_task_id = nil
L478 🔴 global_write
Global write: last_task_id
Impact: low
Show code
last_task_id = nil
L501 🔴 global_write
Global write: last_task_id
Impact: low
Show code
last_task_id = nil
L523 🔴 global_write
Global write: last_task_id
Impact: low
Show code
last_task_id = nil
L544 🔴 global_write
Global write: last_task_id
Impact: low
Show code
last_task_id = nil
L887 🟡 unused_local_variable
Local variable 'story_done' is assigned but never used
Impact: low
Show code
local story_done = has_alife_info( "warlab_deactivate_generators_done" )

dialogs_duty_girl.script

L29 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR dialog_manager | No such function exists '%s'",value)
L36 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR dialog_manager | No such function exists '%s'",cond)
L47 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR dialog_manager | No such function exists '%s'",value)
L54 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR dialog_manager | No such function exists '%s'",act)
L3 🟡 unused_local_variable
Local variable 'DI' is assigned but never used
Impact: low
Show code
local DI = disable_info

gameplay_duty_girl.script

L1 🟡 unused_local_variable
Local variable 'HI' is assigned but never used
Impact: low
Show code
local HI = has_alife_info
L3 🟡 unused_local_variable
Local variable 'DI' is assigned but never used
Impact: low
Show code
local DI = disable_info
L15 🟡 unused_local_variable
Local variable 'squad' is assigned but never used
Impact: low
Show code
local squad = SIMBOARD:create_squad(smart,"squad_duty_girl")

gameplay_duty_outpost.script

L11 🟢 uncached_globals_summary
Cache 1 globals in reinforce_squad
Impact: medium
Show code
L23: tonumber L23: tonumber
L73 🟢 uncached_globals_summary
Cache 1 globals in play_sound
Impact: medium
Show code
L76: tonumber L76: tonumber
L66 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Release [%s]",se:name())
L64 🟡 potential_nil_access
Potential nil access: 'se' from :object() used without nil check
Impact: low
Show code
if (se and section_list[se:section_name()] and simulation_objects.is_on_the_same_level(se,smart) and zone:inside(se.position)) then
L66 🟡 potential_nil_access
Potential nil access: 'se' from :object() used without nil check
Impact: low
Show code
printf("Release [%s]",se:name())
L4 🟡 unused_local_variable
Local variable 'DI' is assigned but never used
Impact: low
Show code
local DI = disable_info

gameplay_misc_encounter.script

L52 🟢 uncached_globals_summary
Cache 1 globals in ray_cast_to_actor_le
Impact: medium
Show code
L55: tonumber L62: tonumber
L21 🟢 repeated_enemy_id()
enemy:id() called 3x in kill_common_enemy
Impact: low
Show code
Cache enemy:id() result
L83 🟢 repeated_alife
alife called 11x in lure_prey_init
Impact: low
Show code
local sim = alife()
L2 🟡 unused_local_variable
Local variable 'HI' is assigned but never used
Impact: low
Show code
local HI = has_alife_info
L4 🟡 unused_local_variable
Local variable 'DI' is assigned but never used
Impact: low
Show code
local DI = disable_info

smart_terrain_ex.script

L87 🟢 uncached_globals_summary
Cache 1 globals in select_npc_job
Impact: medium
Show code
L162: pairs L172: pairs
L101 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
return printf("%s no npc_info!",self:name())
L107 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
return printf("%s no job table for %s [stype = %s]",self:name(),npc_info.se_obj:name(),npc_info.stype)
L278 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local smart = se_obj.m_smart_terrain_id and se_obj.m_smart_terrain_id ~= 65535 and sim:object(se_obj.m_smart_terrain_id)

task_duty_girl.script

L224 🟢 uncached_globals_summary
Cache 1 globals in monolith_elite_hit
Impact: medium
Show code
L229: string.find L234: string.find
L424 🟢 uncached_globals_summary
Cache 1 globals in capture_the_brirge_hit
Impact: medium
Show code
L428: string.find L432: string.find
L262 🟢 repeated_alife
alife called 3x in duty_girl_loot_stash_status
Impact: low
Show code
local sim = alife()
L492 🔴 global_write
Global write: cmd
Impact: low
Show code
cmd = debug_cmd_list.command_get_list()
L4 🟡 unused_local_variable
Local variable 'DI' is assigned but never used
Impact: low
Show code
local DI = disable_info

xr_dynamic_object.script

L4 🟢 uncached_globals_summary
Cache 2 globals in dynamic_object
Impact: medium
Show code
L30: tonumber L30: tonumber L31: string.find L37: string.find
L83 🟢 uncached_globals_summary
Cache 2 globals in get_object_config
Impact: medium
Show code
L89: tonumber L90: tonumber L92: math.rad L93: math.rad
L114 🟢 uncached_globals_summary
Cache 2 globals in light
Impact: medium
Show code
L127: tonumber L147: tonumber L138: tostring L170: tostring
L30 🟢 repeated_alife
alife called 4x in dynamic_object
Impact: low
Show code
local sim = alife()
L21 🟡 unused_local_variable
Local variable 'r' is assigned but never used
Impact: low
Show code
local r,i,v = ini:r_line("exclusive",k)
L144 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result,i,v = ini:r_line(sec,k)

xr_logic_ex.script

L78 🟢 uncached_globals_summary
Cache 1 globals in get_waypoint
Impact: medium
Show code
L85: tonumber L85: tonumber
L159 🟢 uncached_globals_summary
Cache 3 globals in xr_effects.animpoint
Impact: medium
Show code
L204: math.random L238: math.random L209: pairs L216: pairs L284: tostring L301: tostring
L404 🟢 uncached_globals_summary
Cache 3 globals in load_animpoint
Impact: medium
Show code
L412: tostring L461: tostring L414: tonumber L418: tonumber L416: string.gmatch L425: string.gmatch
L662 🟢 uncached_globals_summary
Cache 2 globals in mutant_load_path
Impact: medium
Show code
L676: string.gmatch L682: string.gmatch L679: tonumber L688: tonumber
L724 🟢 uncached_globals_summary
Cache 1 globals in vector_angle_diff
Impact: medium
Show code
L728: math.abs L728: math.abs
L891 🟢 uncached_globals_summary
Cache 2 globals in npc_logic_update
Impact: medium
Show code
L904: tostring L912: tostring L905: tonumber L913: tonumber
L995 🟢 uncached_globals_summary
Cache 1 globals in npc_set_position
Impact: medium
Show code
L1030: tonumber L1030: tonumber
L1076 🟢 uncached_globals_summary
Cache 3 globals in npc_on_before_hit
Impact: medium
Show code
L1083: string.find L1091: string.find L1084: tonumber L1097: tonumber L1094: tostring L1094: tostring
L5 🟢 repeated_npc_id()
npc:id() called 5x in <global>
Impact: low
Show code
Cache npc:id() result
L160 🟢 repeated_npc_id()
npc:id() called 7x in xr_effects.animpoint
Impact: low
Show code
Cache npc:id() result
L610 🟢 repeated_npc_clsid()
npc:clsid() called 3x in xr_effects.mutant_path
Impact: low
Show code
Cache npc:clsid() result
L1287 🟢 repeated_device
device called 3x in execute
Impact: low
Show code
local dev = device()
L178 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: animpoint %s | %s",st.active_section,dt.level_vertex_id)
L217 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: load_campfire_actions [%s] %s is_in_camp %s %s",npc:name(),dt.active_section,is_in_camp,v and v.name)
L229 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: [%s] %s no camp",npc:name(),dt.active_section)
L264 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: animpoint load campfire action %s %s",dt.active_section,v)
L308 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: xr_logic_ex can not find %s %s",dt.active_section,dt.delay_animation)
L707 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: %s [%s] no dt.position",st.ini_filename,st.active_section)
L710 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: %s [%s] no dt.level_vertex_id",st.ini_filename,st.active_section)
L713 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: %s [%s] no dt.look_position",st.ini_filename,st.active_section)
L772 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: xr_logic_ex | load_storage_squad file %s doesn't exist.",ini_name)
L807 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: xr_logic_ex | load_storage_logic file %s doesn't exist.",ini_name)
L882 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: squad_target_update teleport [%s] %s %s",squad:name(),new_target,squad.scripted_target)
L932 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: xr_logic_ex | old logic [%s] %s %s",npc:name(),st.section_logic,st.active_section)
L947 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: xr_logic_ex | new logic [%s] %s %s %s",npc:name(),ini_name,new_logic,new_section)
L854 🟢 dead_code_if_false
Dead code: if false (lines 854-873)
Impact: low
Show code
if (false) then
L1020 🟢 dead_code_if_false
Dead code: if false (lines 1020-1035)
Impact: low
Show code
if (false) then
L1136 🟡 unused_local_variable
Local variable 'r' is assigned but never used
Impact: low
Show code
local r,i,v = smart.ini:r_line("on_changing_level",k)
L817 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result,i,v = ini:r_line("section@logic",k)

217- DNPCAV NPCs wear armor you give them (Crash to desktop sometimes with shift transfer) - RavenAscendant

1 file (🟢3 🟡0 🔴18 🔵1)

dynamic_npc_armor_visuals.script

L26 🟢 repeated_npc_id()
npc:id() called 5x in npc_on_item_take
Impact: low
Show code
Cache npc:id() result
L66 🟢 repeated_npc_id()
npc:id() called 5x in npc_armor_visual_update
Impact: low
Show code
Cache npc:id() result
L13 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( "RAX: | %s | "..text ,time_global(), ...)
L9 🔴 global_write
Global write: default_visuals
Impact: low
Show code
default_visuals = {}
L17 🔴 global_write
Global write: ini_npcv
Impact: low
Show code
ini_npcv = ini_file_ex("dynamic_npc_armor_visuals.ltx")
L18 🔴 global_write
Global write: ini_death
Impact: low
Show code
ini_death = ini_file_ex("items\\settings\\death_outfits.ltx")
L75 🔴 global_write
Global write: item
Impact: low
Show code
item = nil
L76 🔴 global_write
Global write: item_prot
Impact: low
Show code
item_prot = 0
L80 🔴 global_write
Global write: itm_vis
Impact: low
Show code
itm_vis = ini_sys:r_string_ex(itm:section(),"npc_visual")
L81 🔴 global_write
Global write: itm_prot
Impact: low
Show code
itm_prot = get_visual_prot(itm_vis, itm)
L85 🔴 global_write
Global write: item
Impact: low
Show code
item = itm
L86 🔴 global_write
Global write: item_prot
Impact: low
Show code
item_prot = itm_prot
L89 🔴 global_write
Global write: item
Impact: low
Show code
item = itm
L90 🔴 global_write
Global write: item_prot
Impact: low
Show code
item_prot = itm_prot
L121 🔴 global_write
Global write: vis_path_list
Impact: low
Show code
vis_path_list = str_explode(vis, "\\")
L122 🔴 global_write
Global write: vis_name_list
Impact: low
Show code
vis_name_list = vis_path_list and str_explode(vis_path_list[#vis_path_list], "%.")
L133 🔴 global_write
Global write: ballistic
Impact: low
Show code
ballistic = utils_item.get_outfit_protection(item, outfit, "FireWound") + utils_item.get_outfit_protection(nil, helm, "FireWound")
L134 🔴 global_write
Global write: rupture
Impact: low
Show code
rupture = utils_item.get_outfit_protection(item, outfit, "Wound") + utils_item.get_outfit_protection(nil, helm, "Wound")
L135 🔴 global_write
Global write: explosion
Impact: low
Show code
explosion = utils_item.get_outfit_protection(item, outfit, "Explosion") + utils_item.get_outfit_protection(nil, helm, "Explosion")
L138 🔴 global_write
Global write: protection
Impact: low
Show code
protection = ini_npcv:r_float_ex("stat_weights","ballistic") * ballistic + ini_npcv:r_float_ex("stat_weights","rupture") * rupture + ini_npcv:r_float_ex("stat_weights","explosion") * explosion
L190 🔴 global_write
Global write: default_visuals
Impact: low
Show code
default_visuals = mdata.RAX_default_visuals or {}
L12 🟢 dead_code_if_false
Dead code: if false (lines 12-14)
Impact: low
Show code
if false then

218- Quick Companion Teleport (teleports rescue mission targets) - RazorShultz

1 file (🟢0 🟡1 🔴1 🔵0)

qcteleport_mcm.script

L38 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "qcteleport", sh= true , gr={
L20 🟡 potential_nil_access
Potential nil access: 'simm' from alife() used without nil check
Impact: low
Show code
simm:teleport_object(k.id,db.actor:game_vertex_id(),db.actor:level_vertex_id(),db.actor:position())

219- Combine all items (potential crash with some items) - Demonized

2 files (🟢4 🟡9 🔴0 🔵25)

combine_all_items.script

L49 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("item parent is undefined %s, %s", actor:name(), actor:section())
L54 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Combiner, all items are filled")
L108 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("item parent is undefined %s, %s", actor:name(), actor:section())
L111 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("old uses %s, new uses %s, diff %s", old_total_uses, total_uses, total_uses - old_total_uses)
L45 🟡 potential_nil_access
Potential nil access: 'actor' from :parent() used without nil check
Impact: low
Show code
actor:iterate_ruck(iterate, actor)
L47 🟡 potential_nil_access
Potential nil access: 'actor' from :parent() used without nil check
Impact: low
Show code
actor:iterate_inventory_box(iterate, actor)
L49 🟡 potential_nil_access
Potential nil access: 'actor' from :parent() used without nil check
Impact: low
Show code
printf("item parent is undefined %s, %s", actor:name(), actor:section())
L49 🟡 potential_nil_access
Potential nil access: 'actor' from :parent() used without nil check
Impact: low
Show code
printf("item parent is undefined %s, %s", actor:name(), actor:section())
L104 🟡 potential_nil_access
Potential nil access: 'actor' from :parent() used without nil check
Impact: low
Show code
actor:iterate_ruck(iterate, actor)
L106 🟡 potential_nil_access
Potential nil access: 'actor' from :parent() used without nil check
Impact: low
Show code
actor:iterate_inventory_box(iterate, actor)
L108 🟡 potential_nil_access
Potential nil access: 'actor' from :parent() used without nil check
Impact: low
Show code
printf("item parent is undefined %s, %s", actor:name(), actor:section())
L108 🟡 potential_nil_access
Potential nil access: 'actor' from :parent() used without nil check
Impact: low
Show code
printf("item parent is undefined %s, %s", actor:name(), actor:section())

custom_functor_autoinject.script

L114 🟢 string_len
string.len(pos) -> #pos
Impact: low
Show code
sub_print_r(val,indent..string.rep(" ",string.len(pos)+8))
L115 🟢 string_len
string.len(pos) -> #pos
Impact: low
Show code
printf(indent..string.rep(" ",string.len(pos)+6).."}")
L105 🟢 uncached_globals_summary
Cache 1 globals in sub_print_r
Impact: medium
Show code
L106: tostring L107: tostring
L128 🟢 uncached_globals_summary
Cache 1 globals in print_table
Impact: medium
Show code
L137: type L139: type
L107 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."*"..tostring(t))
L113 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."["..pos.."] => "..tostring(t).." {")
L115 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent..string.rep(" ",string.len(pos)+6).."}")
L117 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."["..pos.."] => "..tostring(val))
L121 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent..tostring(t))
L140 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = function",k)
L143 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s",k,utils_data.vector_to_string(v))
L145 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = userdata", k)
L150 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = true",k)
L152 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = true")
L156 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = false", k)
L158 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = false")
L163 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s", k,v)
L165 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = nil", k,v)
L319 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s, %s", k, v.index)
L322 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s, %s, max custom_functor reached", k, v.index)
L424 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Custom functors, processing queue")
L427 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Custom functors, type %s", v.type)
L464 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("functor slot is not valid, min 1, max 10, your slot: %s", slot)
L479 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("functor slot is not valid min 1, max 10, your slot: %s", slot)
L515 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[" .. k .. "] => ")
L98 🟡 unused_local_variable
Local variable 'table_remove' is assigned but never used
Impact: low
Show code
local table_remove = table.remove

22- Agressor Reshade - Awene

2 files (🟢0 🟡0 🔴3 🔵0)

grok_gotta_go_fast.script

L10 🔴 global_write
Global write: run_coeff
Impact: low
Show code
run_coeff = grok_gotta_go_fast_mcm.get_config("gotta_go_fast_run")
L11 🔴 global_write
Global write: sprint_coeff
Impact: low
Show code
sprint_coeff = grok_gotta_go_fast_mcm.get_config("gotta_go_fast_sprint")

grok_gotta_go_fast_mcm.script

L12 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "gggf",sh=true ,gr={

220- Companions Inventory Unlock (enable only to clear your companions inventory from time to time) - RavenAscendant

2 files (🟢5 🟡0 🔴12 🔵0)

rax_persistent_highlight.script

L24 🟢 table_insert_append
table.insert(persistent_highlights[name], v) -> persistent_highlights[name][#persistent_highlights[name]+1] = v
Impact: high
Show code
table.insert(persistent_highlights[name], functor)
L57 🟢 uncached_globals_summary
Cache 1 globals in change_alpha
Impact: medium
Show code
L61: bit.band L62: bit.band
L44 🔴 global_write
Global write: persistant_highlight
Impact: low
Show code
persistant_highlight = self:GetPersistantHighlight()
L47 🔴 global_write
Global write: color
Impact: low
Show code
color = main_clr and change_alpha(persistant_highlight, 255) or persistant_highlight -- if main_clr set the alpha to max for reasons.
L55 🔴 global_write
Global write: clr_cache
Impact: low
Show code
clr_cache = {}
L61 🔴 global_write
Global write: b
Impact: low
Show code
b = bit.band(clr, 255)
L62 🔴 global_write
Global write: g
Impact: low
Show code
g = bit.band(bit.rshift(clr, 8), 255)
L63 🔴 global_write
Global write: r
Impact: low
Show code
r = bit.band(bit.rshift(clr, 16), 255)

zz_companion_inventory_fix_mcm.script

L63 🟢 repeated_npc_id()
npc:id() called 2x in npc_on_update
Impact: low
Show code
Cache npc:id() result
L66 🟢 repeated_npc_id()
npc:id() called 2x in itr
Impact: low
Show code
Cache npc:id() result
L66 🟢 repeated_itm_id()
itm:id() called 2x in itr
Impact: low
Show code
Cache itm:id() result
L9 🔴 global_write
Global write: show_klep
Impact: low
Show code
show_klep = true
L10 🔴 global_write
Global write: show_all
Impact: low
Show code
show_all = false
L39 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "companion_inv" ,sh=true ,gr={
L51 🔴 global_write
Global write: axrbase
Impact: low
Show code
axrbase = axr_companions.is_assigned_item
L97 🔴 global_write
Global write: npc
Impact: low
Show code
npc = cell.container.owner.npc_id
L105 🔴 global_write
Global write: npc
Impact: low
Show code
npc = cell.container.owner.npc_id

222- Warfare A Life overhaul - Vintar0

17 files (🟢77 🟡111 🔴121 🔵282)

dialogs.script

L257 🟢 table_insert_append
table.insert(text_list, v) -> text_list[#text_list+1] = v
Impact: high
Show code
table.insert( text_list, end_game_text )
L883 🟢 uncached_globals_summary
Cache 1 globals in text_trade_npc_pda
Impact: medium
Show code
L992: math.random L994: math.random
L1087 🟢 uncached_globals_summary
Cache 1 globals in surrender_victim_answers_bounty
Impact: medium
Show code
L1102: math.random L1104: math.random
L1132 🟢 uncached_globals_summary
Cache 1 globals in surrender_victim_answers_1
Impact: medium
Show code
L1135: math.random L1151: math.random
L2555 🟢 uncached_globals_summary
Cache 1 globals in trade_important_documents_reward
Impact: medium
Show code
L2581: math.random L2582: math.random
L678 🟢 repeated_npc_id()
npc:id() called 3x in npc_give_task
Impact: low
Show code
Cache npc:id() result
L1798 🟢 repeated_seller_id()
seller:id() called 4x in trade_init
Impact: low
Show code
Cache seller:id() result
L999 🟡 string_concat_in_loop
String concat in loop: npc_text = npc_text .. x
Impact: critical
Show code
npc_text = npc_text .. " " .. game.translate_string("st_drx_questlines_and_this_one") .. " "
L439 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL storyline task started: " .. last_task_id) )
L449 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL: drx_sl_task_giver_" .. giver_id .. " registered (" .. giver_task_count .. " outstanding)") )
L468 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL change factions task started: " .. last_task_id) )
L476 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL: drx_sl_task_giver_" .. giver_id .. " registered (" .. giver_task_count .. " outstanding)") )
L494 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL mechanic task started: " .. last_task_id) )
L500 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL: drx_sl_task_giver_" .. giver_id .. " registered (" .. giver_task_count .. " outstanding)") )
L516 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL dynamic task started: " .. last_task_id) )
L522 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL: drx_sl_task_giver_" .. giver_id .. " registered (" .. giver_task_count .. " outstanding)") )
L540 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL simulation task started: " .. last_task_id) )
L549 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL: drx_sl_task_giver_" .. giver_id .. " registered (" .. giver_task_count .. " outstanding)") )
L555 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL: drx_sl_hostage_giver_" .. giver_id .. " registered") )
L571 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL dynamic task started: " .. task_id) )
L576 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL: drx_sl_task_giver_" .. giver_id .. " registered (" .. giver_task_count .. " outstanding)") )
L590 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL simulation task started: " .. task_id) )
L595 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL: drx_sl_task_giver_" .. giver_id .. " registered (" .. giver_task_count .. " outstanding)") )
L1362 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Couldn't relocate money to NULL")
L1832 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Couldn't relocate money to NULL")
L80 🔴 global_write
Global write: last_task_id
Impact: low
Show code
last_task_id = nil
L176 🔴 global_write
Global write: last_task_id
Impact: low
Show code
last_task_id = task_section
L193 🔴 global_write
Global write: last_task_id
Impact: low
Show code
last_task_id = task_section
L210 🔴 global_write
Global write: last_task_id
Impact: low
Show code
last_task_id = task_section
L318 🔴 global_write
Global write: last_task_id
Impact: low
Show code
last_task_id = task_section
L328 🔴 global_write
Global write: last_task_id
Impact: low
Show code
last_task_id = task_section
L452 🔴 global_write
Global write: last_task_id
Impact: low
Show code
last_task_id = nil
L478 🔴 global_write
Global write: last_task_id
Impact: low
Show code
last_task_id = nil
L501 🔴 global_write
Global write: last_task_id
Impact: low
Show code
last_task_id = nil
L523 🔴 global_write
Global write: last_task_id
Impact: low
Show code
last_task_id = nil
L544 🔴 global_write
Global write: last_task_id
Impact: low
Show code
last_task_id = nil
L887 🟡 unused_local_variable
Local variable 'story_done' is assigned but never used
Impact: low
Show code
local story_done = has_alife_info( "warlab_deactivate_generators_done" )

faction_expansions.script

L159 🟢 uncached_globals_summary
Cache 1 globals in get_section
Impact: medium
Show code
L160: math.random L174: math.random
L19 🔴 global_write
Global write: faction
Impact: low
Show code
faction = {}
L20 🔴 global_write
Global write: level
Impact: low
Show code
level = {}
L21 🔴 global_write
Global write: mutant
Impact: low
Show code
mutant = {}
L22 🔴 global_write
Global write: mutant_tier_by_clsid
Impact: low
Show code
mutant_tier_by_clsid = {
L266 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_fact:r_line_ex("mutant_tier",i,"","")

game_relations.script

L220 🟢 uncached_globals_summary
Cache 1 globals in change_faction_relations
Impact: medium
Show code
L225: math.abs L225: math.abs
L297 🟢 uncached_globals_summary
Cache 1 globals in calculate_relation_change
Impact: medium
Show code
L351: math.random L355: math.random
L493 🟢 uncached_globals_summary
Cache 1 globals in online_npc_on_death
Impact: medium
Show code
L512: string.gsub L513: string.gsub
L635 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Npc not set in goodwill function!!!")
L652 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Npc not set in sympathy function!!!")
L657 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Applying new game relation [%s] between squad [%s] and npc [%s] !", new_goodwill, squad_id, "actor")
L661 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("there is no story squad with id [%s]", squad_id)
L670 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("There is no squad [%s] in sim_board", squad_id)
L694 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("There is no squad [%s] in sim_board", squad_id)
L709 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("There is no squad [%s] in sim_board", squad_id)
L766 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("No such squad %s in board", tostring(squad_id))
L770 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(" squad_relation %s", tostring(squad.relationship))
L790 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("No such squad %s in board", tostring(squad_name))
L32 🔴 global_write
Global write: factions_table
Impact: low
Show code
factions_table = {"stalker","bandit","csky","dolg","freedom","killer","army","ecolog","monolith","renegade","greh","isg"}
L33 🔴 global_write
Global write: factions_table_all
Impact: low
Show code
factions_table_all = {"actor","bandit","dolg","ecolog","freedom","killer","army","monolith","monster","stalker","zombied","csky","renegade","greh","isg","trader","actor_stalker","actor_bandit","actor_dolg","actor_freedom","actor_csky","actor_ecolog","actor_killer","actor_army","actor_monolith","actor_renegade","actor_greh","actor_isg","actor_zombied","arena_enemy"}
L38 🔴 global_write
Global write: friend_limit
Impact: low
Show code
friend_limit = ini_r:r_float_ex ("controls" ,"friend_limit") or 4100
L39 🔴 global_write
Global write: enemy_limit
Impact: low
Show code
enemy_limit = ini_r:r_float_ex ("controls" ,"enemy_limit") or -5000
L44 🔴 global_write
Global write: default_sympathy
Impact: low
Show code
default_sympathy = 0.01
L45 🔴 global_write
Global write: game_relations_by_num
Impact: low
Show code
game_relations_by_num = { [0] = "friend",
L49 🔴 global_write
Global write: temp_goodwill_table
Impact: low
Show code
temp_goodwill_table = {}
L682 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_npc = sim:object(npc:id())
L687 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = k.object or k.id and sim:object(k.id)
L690 🟡 potential_nil_access
Potential nil access: 'se_npc' from :object() used without nil check
Impact: low
Show code
se_npc:force_set_goodwill(goodwill, k.id)
L69 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_r:r_line("unaffected_pairs", i , "", "")

sim_offline_combat.script

L105 🟢 uncached_globals_summary
Cache 1 globals in smart_terrain_on_update
Impact: medium
Show code
L109: pairs L122: pairs
L243 🟢 uncached_globals_summary
Cache 1 globals in coordinator
Impact: medium
Show code
L297: pairs L307: pairs
L146 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("% OCS | Battle in smart [%s]", smart:name())
L147 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("------------------------------------------------------------------------")
L158 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("% OCS | Battle in smart [%s]", smart:name())
L159 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("------------------------------------------------------------------------")
L174 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!!! TRYING TO REGISTER NON-SQUAD AS SQUAD")
L215 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("------------------------------------------------------------------------")
L226 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("------------------------------------------------------------------------")
L358 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("- OCS | Combat Distance: %s - Execlude special characters: %s - Mutants included: %s", opt_dist, opt_exclude, can_fight_mutant)
L423 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("% OCS | [%s] is special, [%s] is removed", squad_1:name(), squad_2:name())
L437 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("% OCS | [%s] is special, [%s] is removed", squad_2:name(), squad_1:name())
L500 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/ OCS | %s | Attacker [%s](Power: %s) vs Victim [%s](Power: %s) | Damage: %s",
L511 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! OCS | Squad gone [%s] | Moment: %s sec", squad_2:name(), math_ceil(time_global()/1000))
L530 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ OCS | Squad [%s] lost NPC [%s] | Remaining power: %s | Moment: %s sec", squad_2:name(), se_victim:name(), ocs_power[id_2], math_ceil(time_global()/1000))
L537 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! OCS | Squad gone [%s] | Moment: %s sec", squad_2:name(), math_ceil(time_global()/1000))
L56 🔴 global_write
Global write: task_squads
Impact: low
Show code
task_squads = {}
L58 🔴 global_write
Global write: story_id_communities
Impact: low
Show code
story_id_communities = {}
L59 🔴 global_write
Global write: ignore_list
Impact: low
Show code
ignore_list = {}
L60 🔴 global_write
Global write: stationary_squads
Impact: low
Show code
stationary_squads = {}
L63 🔴 global_write
Global write: ocs_power
Impact: low
Show code
ocs_power = {}
L64 🔴 global_write
Global write: opponents
Impact: low
Show code
opponents = {}
L65 🔴 global_write
Global write: squads_by_level
Impact: low
Show code
squads_by_level = {}
L143 🔴 global_write
Global write: in_combat
Impact: low
Show code
in_combat = validate_enemy(sim, lid_1, squad_1, id_1, id_t, community_1)
L155 🔴 global_write
Global write: in_combat
Impact: low
Show code
in_combat = validate_enemy(sim, lid_1, squad_1, id_1, id_2, community_1)
L758 🔴 global_write
Global write: task_squads
Impact: low
Show code
task_squads = m_data.offline_task_squads or {}
L123 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local squad_1 = sim:object(id_1)
L124 🟡 potential_nil_access
Potential nil access: 'squad_1' from :object() used without nil check
Impact: low
Show code
local section = squad_1 and squad_1:section_name()
L298 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local squad = sim:object(id)
L309 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_npc = id and sim:object(id)
L310 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local squad = se_npc and se_npc.group_id and se_npc.group_id ~= 65535 and sim:object(se_npc.group_id)
L320 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local squad = sim:object(id)
L321 🟡 potential_nil_access
Potential nil access: 'squad' from :object() used without nil check
Impact: low
Show code
local section = squad and squad:section_name()
L384 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local squad_2 = id_2 and sim:object(id_2)
L646 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = k.id and sim:object(k.id)
L43 🟡 unused_local_variable
Local variable 'MONSTER_MULTI' is assigned but never used
Impact: low
Show code
local MONSTER_MULTI = 1 -- multiplier for mutants rank
L51 🟡 unused_local_variable
Local variable 'smart_battles_only' is assigned but never used
Impact: low
Show code
local smart_battles_only
L53 🟡 unused_local_variable
Local variable 'string_find' is assigned but never used
Impact: low
Show code
local is_enemy, string_find, math_random, math_ceil, math_max, math_pow = game_relations.is_factions_enemies, string.find, math.random, math.ceil, math.max, math.pow
L68 🟡 unused_local_variable
Local variable 'c_cnt' is assigned but never used
Impact: low
Show code
local c_cnt, c_tbl = 0, {} -- enemies collector
L68 🟡 unused_local_variable
Local variable 'c_tbl' is assigned but never used
Impact: low
Show code
local c_cnt, c_tbl = 0, {} -- enemies collector
L340 🟡 unused_local_variable
Local variable 'pop_factor' is assigned but never used
Impact: low
Show code
local pop_factor = (stalker_pop_factor + monster_pop_factor)/2
L745 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_ocs:r_line_ex("stationary_squads",i,"","")

sim_squad_scripted.script

L629 🟢 uncached_globals_summary
Cache 3 globals in create_npc
Impact: medium
Show code
L643: tonumber L645: tonumber L721: string.find L721: string.find L733: math.random L733: math.random
L936 🟢 uncached_globals_summary
Cache 1 globals in STATE_Write
Impact: medium
Show code
L946: tostring L947: tostring
L960 🟢 uncached_globals_summary
Cache 1 globals in STATE_Read
Impact: medium
Show code
L976: tonumber L982: tonumber
L604 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: npc section %s does not exist!",spawn_section)
L610 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("INCORRECT npc_spawn_section USED [%s]. You cannot use npc with custom_data in squads", spawn_section)
L686 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('spawn smart: %s', spawn_smart)
L722 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Spawning trader/mechanic/medic/barman, squad size changed to 1")
L745 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("You are trying to spawn an empty squad [%s]!!!", settings_id)
L871 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("squad community is 'nil' for player_id [%s]", self.player_id)
L12 🔴 global_write
Global write: dbg_map_hud
Impact: low
Show code
dbg_map_hud = false
L228 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_actor = sim:actor()
L239 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local cur_lvl = sim:level_name(game_graph():vertex(self.m_game_vertex_id):level_id())
L427 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(id)
L499 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local obj = sim:object(member_id)
L619 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local actor = sim:actor()
L620 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
if (simulation_objects.is_on_the_same_level(obj, actor) and spawn_position:distance_to_sqr(actor.position) <= sim:switch_distance()^2) then
L860 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(k.id)
L861 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if se_obj and se_obj:has_detector() then
L1226 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_actor = sim:actor()
L21 🟡 unused_local_variable
Local variable 'a' is assigned but never used
Impact: low
Show code
local a,key,val = locations_ini:r_line_ex(section,0,"","")
L21 🟡 unused_local_variable
Local variable 'val' is assigned but never used
Impact: low
Show code
local a,key,val = locations_ini:r_line_ex(section,0,"","")
L173 🟡 unused_local_variable
Local variable 'itm' is assigned but never used
Impact: low
Show code
local itm = alife_create_item(vv, alife_object(k.id))
L812 🟡 unused_local_variable
Local variable 'planner' is assigned but never used
Impact: low
Show code
local planner = npc:motivation_action_manager()
L1398 🟡 unused_local_variable
Local variable 'smarts_by_no_assault_zones' is assigned but never used
Impact: low
Show code
local smarts_by_no_assault_zones = {

sim_squad_warfare.script

L789 🟢 uncached_globals_summary
Cache 1 globals in find_random_patrol_target
Impact: medium
Show code
L798: pairs L811: pairs
L405 🟢 repeated_pda_section()
pda:section() called 4x in sim_squad_scripted.sim_squad_scripted.show
Impact: low
Show code
Cache pda:section() result
L71 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, "squad_on_update: "..squad:name())
L80 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, squad:name())
L127 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(2, squad:name())
L135 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!!! TRYING TO REGISTER NON-SQUAD AS SQUAD")
L141 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("--- registering " .. squad:section_name() .. " with warfare")
L167 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(3, squad:name())
L199 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, "squad_warfare_update: "..squad:name())
L250 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, squad:name())
L317 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, squad:name())
L332 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, squad:name())
L336 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, "squad_on_npc_death: "..squad:name())
L360 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, squad:name())
L366 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, self:name().." registered: "..tostring(self.registered_with_warfare))
L370 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, self:name())
L382 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(2, self:name())
L525 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(3, self:name())
L531 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, self:name())
L534 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, self:name())
L541 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(2, self:name())
L597 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, squad:name())
L648 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, squad:name())
L654 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, squad:name())
L779 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, squad:name())
L790 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, squad:name())
L828 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, squad:name())
L837 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, squad:name())
L902 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, squad:name())
L907 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(2, squad:name())
L921 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, squad:name())
L924 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("squad %s is from capture territory task, ignore it's target", squad:name())
L962 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, squad:name())
L967 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, squad:name())
L990 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, squad:name())
L21 🔴 global_write
Global write: printd
Impact: low
Show code
printd = warfare.printd
L22 🔴 global_write
Global write: dbg_map_hud
Impact: low
Show code
dbg_map_hud = false
L24 🔴 global_write
Global write: squad_icons
Impact: low
Show code
squad_icons = {
L405 🟡 potential_nil_access
Potential nil access: 'pda' from :item_in_slot() used without nil check
Impact: low
Show code
elseif db.actor and pda and (pda:section() == "device_pda_2") and (faction == warfare.actor_faction) then
L407 🟡 potential_nil_access
Potential nil access: 'pda' from :item_in_slot() used without nil check
Impact: low
Show code
elseif db.actor and pda and (pda:section() == "device_pda_3") and not game_relations.is_factions_enemies(warfare.actor_faction, faction) then
L484 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_actor = sim:actor()
L955 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = k.object or k.id and sim:object(k.id)
L984 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = k.object or k.id and sim:object(k.id)
L388 🟡 unused_local_variable
Local variable 'enemy' is assigned but never used
Impact: low
Show code
local enemy = game_relations.is_factions_enemies(warfare.actor_faction, faction)
L660 🟡 unused_local_variable
Local variable 'squadName' is assigned but never used
Impact: low
Show code
local squadName = squad:name()
L821 🟡 unused_local_variable
Local variable 'd' is assigned but never used
Impact: low
Show code
local d = 1 + 1/(math.min(1, math.pow(warfare.distance_to_xz_sqr(p1, p2), 2)))
L831 🟡 unused_local_variable
Local variable 'BASE_WEIGHT' is assigned but never used
Impact: low
Show code
local BASE_WEIGHT = 3
L832 🟡 unused_local_variable
Local variable 'RESOURCE_WEIGHT' is assigned but never used
Impact: low
Show code
local RESOURCE_WEIGHT = 1
L880 🟡 unused_local_variable
Local variable 'f2' is assigned but never used
Impact: low
Show code
local f2 = other.owning_faction or "none"

smart_terrain_warfare.script

L395 🟢 uncached_globals_summary
Cache 2 globals in process_manual_capture
Impact: medium
Show code
L432: pairs L444: pairs L522: math.random L577: math.random
L797 🟢 uncached_globals_summary
Cache 1 globals in surge_behavior
Impact: medium
Show code
L817: pairs L825: pairs
L917 🟢 uncached_globals_summary
Cache 2 globals in process_targets
Impact: medium
Show code
L922: math.random L931: math.random L974: pairs L1004: pairs
L1369 🟢 uncached_globals_summary
Cache 2 globals in create_invasion_plan
Impact: medium
Show code
L1404: pairs L1425: pairs L1476: math.max L1477: math.max
L1585 🟢 uncached_globals_summary
Cache 2 globals in process_invasion_defense
Impact: medium
Show code
L1589: math.random L1598: math.random L1639: pairs L1731: pairs
L2033 🟢 uncached_globals_summary
Cache 2 globals in find_patrol_target
Impact: medium
Show code
L2054: pairs L2081: pairs L2136: math.random L2137: math.random
L2145 🟢 uncached_globals_summary
Cache 2 globals in process_patrols
Impact: medium
Show code
L2149: math.random L2155: math.random L2162: pairs L2187: pairs
L2255 🟢 uncached_globals_summary
Cache 2 globals in process_loners
Impact: medium
Show code
L2259: math.random L2265: math.random L2272: pairs L2292: pairs
L2653 🟢 uncached_globals_summary
Cache 2 globals in process_ecolog
Impact: medium
Show code
L2657: math.random L2663: math.random L2670: pairs L2688: pairs
L2987 🟢 uncached_globals_summary
Cache 2 globals in process_mutants
Impact: medium
Show code
L2992: math.random L3011: math.random L3004: pairs L3020: pairs
L3127 🟢 uncached_globals_summary
Cache 1 globals in show
Impact: medium
Show code
L3172: pairs L3196: pairs
L4201 🟢 uncached_globals_summary
Cache 1 globals in find_random_patrol_target
Impact: medium
Show code
L4267: math.random L4315: math.random
L4340 🟢 uncached_globals_summary
Cache 1 globals in find_targets
Impact: medium
Show code
L4544: math.abs L4544: math.abs
L436 🟢 repeated_alife
alife called 4x in process_manual_capture
Impact: low
Show code
local sim = alife()
L3550 🟡 string_concat_in_loop
String concat in loop: props = props .. x
Impact: critical
Show code
props = props .. " \\n" .. clr_b .. " \\n" .. str_wrfr[17] .. " \\n" .. clr_gr
L3709 🟡 string_concat_in_loop
String concat in loop: props = props .. x
Impact: critical
Show code
props = props .. " \\n" .. clr_b .. " \\n" .. str_wrfr[17] .. " \\n" .. clr_gr
L4405 🟡 string_concat_in_loop
String concat in loop: pName = pName .. x
Impact: critical
Show code
pName = pName.." ("..other:name()..")"
L278 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0)
L287 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1)
L291 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, "smart_terrain_on_update "..smart:name())
L350 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, smart:name())
L392 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(2, smart:name())
L705 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, smart:name())
L792 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, smart:name())
L911 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s is mad that %s has stolen target %s from them! %s to relations", faction_1, faction_2, contested_smart:name(), penalty_value)
L962 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, smart:name())
L965 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, smart:name())
L1095 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("sending %s %s squads from %s to attack %s", invasion_size, smart.owning_faction, smart:name(), target:name())
L1207 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(2, smart:name())
L1211 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, "get_invasion_target "..(not smart and "nil" or smart:name()))
L1245 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1)
L1313 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("sending %s squad on base %s to empty terrain %s (requested by %s)", other.owning_faction, other:name(), target:name(), smart:name())
L1354 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("sending %s squad on base %s to empty terrain %s", smart.owning_faction, smart:name(), target:name())
L1570 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("giving one %s squad at %s to invasion force prepping at %s", smart.owning_faction, smart:name(), other:name())
L1782 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("sending %s reinforcement squad from %s to location under attack %s", defending_faction, other:name(), smart:name())
L1796 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("not enough %s reinforcements were available in the vicinity to sufficiently assist %s", defending_faction, smart:name())
L1798 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("no %s reinforcements were available in the area to assist %s", defending_faction, smart:name())
L1832 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("no %s reinforcements were available in the area to assist %s", defending_faction, smart:name())
L1895 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, smart:name())
L1899 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, smart:name())
L1919 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(2, smart:name())
L1934 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, smart:name())
L1989 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, smart:name())
L2034 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, "find_patrol_target - smart: "..(not smart and "nil" or smart:name()).."squad: "..(not squad and "nil" or squad:name()))
L2134 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1)
L2322 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("setting target of loners on base ".. smart:name() .. " to same-level resource: " ..target:name())
L2345 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("setting target of loners on base ".. smart:name() .. " to same-level lair: " ..target:name())
L2394 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("setting target of loners on base ".. smart:name() .. " to empty linked-level resource: " ..target:name())
L2401 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("setting target of loners on base ".. smart:name() .. " to occupied linked-level resource: " ..target:name())
L2443 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("setting target of loners on resource ".. smart:name() .. " to same-level resource: " ..target:name())
L2490 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("setting target of loners on resource ".. smart:name() .. " to empty linked-level resource: " ..target:name())
L2497 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("setting target of loners on resource ".. smart:name() .. " to occupied linked-level resource: " ..target:name())
L2523 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("setting target of loners on lair ".. smart:name() .. " to same-level lair: " ..target:name())
L2560 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("setting target of loners on ".. smart:name() .. " to same-level loner base: " ..target:name())
L2567 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("setting target of loners on ".. smart:name() .. " to same-level " .. target.owning_faction .. " base: " ..target:name())
L2608 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("setting target of loners on ".. smart:name() .. " to linked-level loner base: " ..target:name())
L2615 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("setting target of loners on ".. smart:name() .. " to linked-level " .. target.owning_faction .. " base: " ..target:name())
L2640 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("setting target of loners on ".. smart:name() .. " to same-level territory: " ..target:name())
L2703 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("setting target of ecologists at base ".. smart:name() .. " to same-level resource: " ..target:name())
L2732 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("setting target of ecologists at base ".. smart:name() .. " to linked-level resource: " ..target:name())
L2759 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("setting target of ecologists on resource ".. smart:name() .. " to same-level resource: " ..target:name())
L2787 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("setting target of ecologists on resource ".. smart:name() .. " to linked-level resource: " ..target:name())
L2856 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("setting target of ecologists on ".. smart:name() .. " to ecologist base: " ..target:name())
L2863 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("setting target of ecologists on ".. smart:name() .. " to same-level " .. target.owning_faction .. " base: " ..target:name())
L2870 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("setting target of ecologists on ".. smart:name() .. " to linked-level " .. target.owning_faction .. " base: " ..target:name())
L2893 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("setting target of ecologists on ".. smart:name() .. " to same-level territory: " ..target:name())
L2927 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, smart:name())
L2931 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, smart:name())
L2966 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("spawning %s on terrain %s which already had %s.", section, smart:name(), section)
L2978 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("spawning %s on empty terrain %s. There are now %s / %s mutant squads on that level", section, smart:name(), (mutants_on_level+1), max_active)
L2983 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(2, smart:name())
L2998 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, smart:name())
L3062 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("setting target of mutants on ".. smart:name() .. " to linked-level target: " ..target:name())
L3090 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("setting target of mutants on ".. smart:name() .. " to same-level target: " ..target:name())
L3101 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, smart:name())
L3140 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, self:name())
L3456 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, self:name())
L3461 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, self:name())
L3481 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, self:name())
L3485 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, smart:name())
L3506 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, smart:name())
L3511 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, smart:name())
L3564 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, smart:name())
L3569 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, smart:name())
L3606 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, smart:name())
L3612 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, smart:name())
L3751 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, smart:name())
L3760 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, smart:name())
L3783 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, smart:name())
L3796 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, smart:name())
L3822 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, smart:name())
L3831 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, smart:name())
L3865 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, smart:name())
L3876 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, smart:name())
L3910 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, smart:name())
L3916 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, smart:name())
L3937 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, smart:name())
L3970 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, smart:name())
L3999 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("transferring control of " .. smart:name() .. " from " .. smart.owning_faction .. " to " .. faction)
L4098 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("resetting defense timer of base %s due to ownership change from %s to %s", smart:name(), previous_owner[smart.id], smart.owning_faction)
L4104 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("resetting defense timer of base %s due to ownership change from %s to %s", smart:name(), previous_owner[smart.id], smart.owning_faction)
L4116 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, smart:name())
L4126 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, smart:name())
L4196 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, smart:name())
L4202 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, "find_random_patrol_target: "..(smart and smart:name() or "spawn"))
L4318 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("setting target of %s random patrol to: %s", faction, target:name())
L4320 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("spawning %s random patrol on %s", faction, target:name())
L4330 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("spawning %s random patrol on %s", faction, target:name())
L4335 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1)
L4341 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, smart:name())
L4547 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, smart:name())
L4740 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("moving %s squad on %s to %s, owned by %s", faction, smart:name(), other:name(), other.owning_faction)
L4746 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("moving %s squad on %s to %s, owned by %s", faction, smart:name(), other:name(), other.owning_faction)
L4775 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, smart:name())
L4808 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(2, sm_name)
L4813 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(3, sm_name)
L4868 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("SPAWNED TRADER AT "..sm_name)
L4876 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("SPAWNED MECHANIC AT "..sm_name)
L4884 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("SPAWNED MEDIC AT "..sm_name)
L4892 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("SPAWNED BARMAN AT "..sm_name)
L4899 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(4, sm_name)
L40 🔴 global_write
Global write: printd
Impact: low
Show code
printd = warfare.printd
L42 🔴 global_write
Global write: hide_smarts
Impact: low
Show code
hide_smarts = false -- altered by pda_warfare.script
L47 🔴 global_write
Global write: point_cap_timers
Impact: low
Show code
point_cap_timers = {}
L48 🔴 global_write
Global write: smart_owners
Impact: low
Show code
smart_owners = {}
L49 🔴 global_write
Global write: manual_point
Impact: low
Show code
manual_point = nil
L50 🔴 global_write
Global write: dbg_hud
Impact: low
Show code
dbg_hud = false
L57 🔴 global_write
Global write: defense_timers
Impact: low
Show code
defense_timers = {}
L58 🔴 global_write
Global write: defense_next_update
Impact: low
Show code
defense_next_update = {}
L59 🔴 global_write
Global write: patrol_timers
Impact: low
Show code
patrol_timers = {}
L60 🔴 global_write
Global write: patrol_next_update
Impact: low
Show code
patrol_next_update = {}
L61 🔴 global_write
Global write: spawn_mutant_timers
Impact: low
Show code
spawn_mutant_timers = {}
L62 🔴 global_write
Global write: spawn_mutant_next_update
Impact: low
Show code
spawn_mutant_next_update = {}
L63 🔴 global_write
Global write: process_mutant_timers
Impact: low
Show code
process_mutant_timers = {}
L64 🔴 global_write
Global write: process_mutant_next_update
Impact: low
Show code
process_mutant_next_update = {}
L65 🔴 global_write
Global write: loner_timer
Impact: low
Show code
loner_timer = {}
L66 🔴 global_write
Global write: loners_next_update
Impact: low
Show code
loners_next_update = {}
L67 🔴 global_write
Global write: ecolog_timer
Impact: low
Show code
ecolog_timer = {}
L68 🔴 global_write
Global write: ecolog_next_update
Impact: low
Show code
ecolog_next_update = {}
L70 🔴 global_write
Global write: smart_terrain_distances
Impact: low
Show code
smart_terrain_distances = {} -- store distances when they get used. Save it in warfare.script to avoid lag spikes from continuously measuring distances between smart terrains
L71 🔴 global_write
Global write: under_attack
Impact: low
Show code
under_attack = {} -- when a smart is under attack, halt squad assignment from that smart until the threat has passed or the point has changed hands
L73 🔴 global_write
Global write: patrol_squads
Impact: low
Show code
patrol_squads = {}
L74 🔴 global_write
Global write: random_patrols
Impact: low
Show code
random_patrols = {}
L75 🔴 global_write
Global write: invasions
Impact: low
Show code
invasions = {}
L94 🔴 global_write
Global write: control_hold
Impact: low
Show code
control_hold = {}
L96 🔴 global_write
Global write: pda_icons
Impact: low
Show code
pda_icons = {
L405 🔴 global_write
Global write: manual_point
Impact: low
Show code
manual_point = nil
L494 🔴 global_write
Global write: manual_point
Impact: low
Show code
manual_point = { smart.id, game.get_game_time(), closest_base, targeting_squad, 1 }
L504 🔴 global_write
Global write: manual_point
Impact: low
Show code
manual_point = nil -- actor has attempted a manual capture beyond the capture distance - kill the attempt
L622 🔴 global_write
Global write: manual_point
Impact: low
Show code
manual_point = nil
L639 🔴 global_write
Global write: manual_point
Impact: low
Show code
manual_point = { smart.id, game.get_game_time(), }
L652 🔴 global_write
Global write: manual_point
Impact: low
Show code
manual_point = nil
L662 🔴 global_write
Global write: manual_point
Impact: low
Show code
manual_point = nil
L678 🔴 global_write
Global write: manual_point
Impact: low
Show code
manual_point = nil
L3987 🔴 global_write
Global write: owner
Impact: low
Show code
owner = "none"
L431 🟡 potential_nil_access
Potential nil access: 'obj_pda' from :active_item() used without nil check
Impact: low
Show code
if (obj_pda and sfind(obj_pda:section(),"device_pda") and obj_pda:condition() >= obj_pda:power_critical()) then
L431 🟡 potential_nil_access
Potential nil access: 'obj_pda' from :active_item() used without nil check
Impact: low
Show code
if (obj_pda and sfind(obj_pda:section(),"device_pda") and obj_pda:condition() >= obj_pda:power_critical()) then
L431 🟡 potential_nil_access
Potential nil access: 'obj_pda' from :active_item() used without nil check
Impact: low
Show code
if (obj_pda and sfind(obj_pda:section(),"device_pda") and obj_pda:condition() >= obj_pda:power_critical()) then
L246 🟡 unused_local_variable
Local variable 'clr_c' is assigned but never used
Impact: low
Show code
local clr_c = utils_xml.get_color("d_cyan")
L1862 🟡 unused_local_variable
Local variable 'regional_resources' is assigned but never used
Impact: low
Show code
local regional_resources = warfare_levels.level_information[levelID] and warfare_levels.level_information[levelID].faction_stats and warfare_levels.level_information[levelID].faction_stats[smart.owning_faction] and warfare_levels.level_information[levelID].faction_stats[smart.owning_faction].linked_resource_count or 0
L1863 🟡 unused_local_variable
Local variable 'local_resources' is assigned but never used
Impact: low
Show code
local local_resources = warfare_levels.level_information[levelID] and warfare_levels.level_information[levelID].faction_stats and warfare_levels.level_information[levelID].faction_stats[smart.owning_faction] and warfare_levels.level_information[levelID].faction_stats[smart.owning_faction].resource_count or 0
L2085 🟡 unused_local_variable
Local variable 'found_target' is assigned but never used
Impact: low
Show code
local found_target = false
L2962 🟡 unused_local_variable
Local variable 'new_squad' is assigned but never used
Impact: low
Show code
local new_squad = utils_obj.create_squad(section, smart:name()) -- create identical section
L3088 🟡 unused_local_variable
Local variable 'num_targeting' is assigned but never used
Impact: low
Show code
local num_targeting = squad_count_targeting(target, "monster")
L3142 🟡 unused_local_variable
Local variable 'c' is assigned but never used
Impact: low
Show code
local c = 0
L3147 🟡 unused_local_variable
Local variable 'friends' is assigned but never used
Impact: low
Show code
local friends = is_factions_friends(warfare.actor_faction, faction)
L3150 🟡 unused_local_variable
Local variable 'actor_level' is assigned but never used
Impact: low
Show code
local actor_level
L3615 🟡 unused_local_variable
Local variable 'owning_faction_ru' is assigned but never used
Impact: low
Show code
local owning_faction_ru = warfare_names.faction_names[smart.owning_faction]
L4036 🟡 unused_local_variable
Local variable 'smrt_name' is assigned but never used
Impact: low
Show code
local smrt_name = game.translate_string("st_" .. smart:name() .. "_name")
L4148 🟡 unused_local_variable
Local variable 'base_weight' is assigned but never used
Impact: low
Show code
local base_weight = 0.75
L4149 🟡 unused_local_variable
Local variable 'resource_weight' is assigned but never used
Impact: low
Show code
local resource_weight = 1
L4150 🟡 unused_local_variable
Local variable 'territory_weight' is assigned but never used
Impact: low
Show code
local territory_weight = 1.5
L4151 🟡 unused_local_variable
Local variable 'lair_weight' is assigned but never used
Impact: low
Show code
local lair_weight = 1.5
L4204 🟡 unused_local_variable
Local variable 'smart_level' is assigned but never used
Impact: low
Show code
local smart_level = smart and game_graph():vertex(smart.m_game_vertex_id):level_id()
L4826 🟡 unused_local_variable
Local variable 'location' is assigned but never used
Impact: low
Show code
local location = nil
L4827 🟡 unused_local_variable
Local variable 'spawnTrader' is assigned but never used
Impact: low
Show code
local spawnTrader = false
L4828 🟡 unused_local_variable
Local variable 'spawnMechanic' is assigned but never used
Impact: low
Show code
local spawnMechanic = false
L4829 🟡 unused_local_variable
Local variable 'spawnMedic' is assigned but never used
Impact: low
Show code
local spawnMedic = false
L4830 🟡 unused_local_variable
Local variable 'spawnBarman' is assigned but never used
Impact: low
Show code
local spawnBarman = false

tasks_assault.script

L219 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | assault_task_target_functor - var is nil", task_id)
L225 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | assault_task_target_functor - smart is nil", task_id)
L275 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | task failed because smart no longer available", task_id)
L288 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/ %s | Faction [%s] is re-added to cache_assault_func table", task_id, params[i])
L303 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/ %s | Faction [%s] is re-added to cache_assault_func table", task_id, fac)
L308 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | no enemy factions found",task_id)
L365 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | not enough parameters", task_id)
L389 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | status functor parameters are mising!", task_id)
L428 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | no enemy factions found", task_id)
L383 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local actor_comm = sim:actor():community()
L448 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local smart_level = sim:level_name(gg:vertex(v.m_game_vertex_id):level_id())
L383 🟡 unused_local_variable
Local variable 'actor_comm' is assigned but never used
Impact: low
Show code
local actor_comm = sim:actor():community()

tasks_smart_control.script

L182 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | assault_task_target_functor - var is nil", task_id)
L189 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | assault_task_target_functor - smart is nil", task_id)
L196 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | assault_task_target_functor - squad is nil", task_id)
L239 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/ %s | Faction [%s] is re-added to cache_func table", task_id, params[i])
L254 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/ %s | Faction [%s] is re-added to cache_func table", task_id, fac)
L259 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! %s | no enemy factions found",task_id)
L289 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | task failed because smart no longer available", task_id)
L320 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | not enough parameters", task_id)
L334 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | status functor parameters are mising!", task_id)
L376 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! %s | no enemy factions found", task_id)
L66 🟡 unused_local_variable
Local variable 'smrt_name' is assigned but never used
Impact: low
Show code
local smrt_name = smart:name()

ui_mm_faction_select.script

L203 🟢 table_insert_append
table.insert(start_pos, v) -> start_pos[#start_pos+1] = v
Impact: high
Show code
table.insert(start_pos,ini_map:r_float_ex(start_location, "lvid"))
L204 🟢 table_insert_append
table.insert(start_pos, v) -> start_pos[#start_pos+1] = v
Impact: high
Show code
table.insert(start_pos,ini_map:r_float_ex(start_location, "gvid"))
L205 🟢 table_insert_append
table.insert(start_pos, v) -> start_pos[#start_pos+1] = v
Impact: high
Show code
table.insert(start_pos,vector():set(ini_map:r_float_ex(start_location,"x"),ini_map:r_float_ex(start_location,"y"),ini_map:r_float_ex(start_location,"z")))
L1168 🟢 table_insert_append
table.insert(self.table_icon, v) -> self.table_icon[#self.table_icon+1] = v
Impact: high
Show code
table.insert(self.table_icon, def_icon)
L1175 🟢 table_insert_append
table.insert(self.table_icon, v) -> self.table_icon[#self.table_icon+1] = v
Impact: high
Show code
table.insert(self.table_icon, id)
L1189 🟢 table_insert_append
table.insert(self.table_map, v) -> self.table_map[#self.table_map+1] = v
Impact: high
Show code
table.insert(self.table_map, "random_location")
L1199 🟢 table_insert_append
table.insert(self.table_map, v) -> self.table_map[#self.table_map+1] = v
Impact: high
Show code
table.insert(self.table_map, id)
L1202 🟢 table_insert_append
table.insert(self.table_map, v) -> self.table_map[#self.table_map+1] = v
Impact: high
Show code
table.insert(self.table_map, id)
L45 🟢 uncached_globals_summary
Cache 2 globals in on_game_load
Impact: medium
Show code
L59: tostring L59: tostring L59: math.random L59: math.random
L444 🟢 uncached_globals_summary
Cache 2 globals in __init
Impact: medium
Show code
L484: tonumber L495: tonumber L485: tostring L496: tostring
L1218 🟢 uncached_globals_summary
Cache 2 globals in LoadLoadout
Impact: medium
Show code
L1224: tostring L1225: tostring L1236: tonumber L1236: tonumber
L1568 🟡 string_concat_in_loop
String concat in loop: str_stats = str_stats .. x
Impact: critical
Show code
str_stats = str_stats .. "%c[0,150,150,150]• %c[0,50,175,50]" .. game.translate_string("st_faction_" .. k) .. "\\n"
L1728 🟡 string_concat_in_loop
String concat in loop: loadout_str = loadout_str .. x
Impact: critical
Show code
loadout_str = loadout_str .. "," .. ci.section
L364 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("giving psy helmet to Monolith/Sin/Zombied actor")
L1290 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("sec: %s | points: %s | points left: %s", ci.section, points, self.points_left)
L312 🟡 unused_local_variable
Local variable 'sim' is assigned but never used
Impact: low
Show code
local sim = alife()
L400 🟡 unused_local_variable
Local variable 'as' is assigned but never used
Impact: low
Show code
local as
L1233 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, sec, value = ini_itm:r_line(self.selected_faction .. "_loadout" , i , "", "")
L1658 🟡 unused_local_variable
Local variable 'bind' is assigned but never used
Impact: low
Show code
local bind = dik_to_bind(dik)

ui_options.script

L1065 🟢 uncached_globals_summary
Cache 1 globals in curr_crosshair_clr
Impact: medium
Show code
L1070: tonumber L1072: tonumber
L1318 🟢 uncached_globals_summary
Cache 1 globals in Reset_opt
Impact: medium
Show code
L1324: unpack L1373: unpack
L2353 🟢 uncached_globals_summary
Cache 1 globals in On_Accept
Impact: medium
Show code
L2370: unpack L2372: unpack
L67 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L974 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("- Changed player name from (%s) to (%s)", curr_name, new_name)
L1161 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!Found nil option value [%s]", id)
L76 🔴 global_write
Global write: options
Impact: low
Show code
options = {}
L91 🔴 global_write
Global write: options
Impact: low
Show code
options = {
L51 🟡 unused_local_variable
Local variable 'm_ceil' is assigned but never used
Impact: low
Show code
local m_floor, m_ceil, s_find, s_gsub = math.floor, math.ceil, string.find, string.gsub
L57 🟡 unused_local_variable
Local variable 'clr_g2' is assigned but never used
Impact: low
Show code
local clr_g2 = GetARGB(255, 200, 200, 200)
L58 🟡 unused_local_variable
Local variable 'clr_w' is assigned but never used
Impact: low
Show code
local clr_w = GetARGB(255, 255, 255, 255)
L2482 🟡 unused_local_variable
Local variable 'bind' is assigned but never used
Impact: low
Show code
local bind = dik_to_bind(dik)

ui_pda_warfare_tab.script

L160 🟢 table_insert_append
table.insert(faction_by_power, v) -> faction_by_power[#faction_by_power+1] = v
Impact: high
Show code
table.insert(faction_by_power, {fac, num})
L78 🟢 uncached_globals_summary
Cache 1 globals in Reset
Impact: medium
Show code
L100: pairs L107: pairs
L272 🟢 uncached_globals_summary
Cache 1 globals in Update
Impact: medium
Show code
L285: pairs L286: pairs
L95 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local curr_lvl = gg:vertex(sim:actor().m_game_vertex_id):level_id()
L185 🟡 unused_local_variable
Local variable 'cap_smarts' is assigned but never used
Impact: low
Show code
local cap_smarts = v[2]
L300 🟡 unused_local_variable
Local variable 'str_fac_smarts' is assigned but never used
Impact: low
Show code
local str_fac_smarts = self.curr_map and self.faction_smarts_lvl[f] or self.faction_smarts[f] or 0
L301 🟡 unused_local_variable
Local variable 'str_all_smarts' is assigned but never used
Impact: low
Show code
local str_all_smarts = self.curr_map and self.tot_smarts_lvl or self.tot_smarts
L313 🟡 unused_local_variable
Local variable 'str_total_resources_count' is assigned but never used
Impact: low
Show code
local str_total_resources_count = warfare.resource_count

warfare.script

L357 🟢 table_insert_append
table.insert(warfare_levels.level_information[smart.level_id].smarts, v) -> warfare_levels.level_information[smart.level_id].smarts[#warfare_levels.level_information[smart.level_id].smarts+1] = v
Impact: high
Show code
table.insert(warfare_levels.level_information[smart.level_id].smarts, smart.id)
L721 🟢 table_insert_append
table.insert(start_pos, v) -> start_pos[#start_pos+1] = v
Impact: high
Show code
table.insert(start_pos, base.m_level_vertex_id)
L722 🟢 table_insert_append
table.insert(start_pos, v) -> start_pos[#start_pos+1] = v
Impact: high
Show code
table.insert(start_pos, base.m_game_vertex_id)
L723 🟢 table_insert_append
table.insert(start_pos, v) -> start_pos[#start_pos+1] = v
Impact: high
Show code
table.insert(start_pos, base.position)
L114 🟢 uncached_globals_summary
Cache 1 globals in save_state
Impact: medium
Show code
L150: pairs L164: pairs
L185 🟢 uncached_globals_summary
Cache 1 globals in load_state
Impact: medium
Show code
L224: pairs L225: pairs
L309 🟢 uncached_globals_summary
Cache 1 globals in actor_on_update
Impact: medium
Show code
L331: pairs L332: pairs
L493 🟢 uncached_globals_summary
Cache 2 globals in fill_start_position
Impact: medium
Show code
L551: math.random L590: math.random L607: string.find L628: string.find
L697 🟢 uncached_globals_summary
Cache 2 globals in initialize_random_starting_locations
Impact: medium
Show code
L701: pairs L746: pairs L717: math.random L739: math.random
L985 🟢 uncached_globals_summary
Cache 1 globals in is_warfare_trader
Impact: medium
Show code
L986: string.find L987: string.find
L996 🟢 uncached_globals_summary
Cache 1 globals in get_squad_section_faction
Impact: medium
Show code
L997: string.find L999: string.find
L1028 🟢 uncached_globals_summary
Cache 1 globals in is_squad_section_enemy_of_faction
Impact: medium
Show code
L1032: string.find L1034: string.find
L325 🟢 repeated_alife
alife called 2x in actor_on_update
Impact: low
Show code
local sim = alife()
L73 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0)
L92 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1)
L115 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, "save_state")
L179 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Warfare state saved")
L180 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, "save_state")
L186 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, "load_state")
L189 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1)
L197 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(2)
L222 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(3)
L236 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(4)
L248 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(5)
L256 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(6)
L264 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(7)
L267 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Finished loading Warfare state. Clearing old data")
L269 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, "load_state")
L276 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, squad:name())
L298 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1)
L310 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, "actor_on_update")
L400 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, "actor_on_update")
L404 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(2, "actor_on_update")
L461 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(3, "actor_on_update")
L494 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0)
L497 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("not warfare")
L508 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Warfare | Random starting locations")
L567 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("spawning initial mutants %s on terrain %s", section, smart:name())
L631 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("spawned %s on %s - pop cap is %s and squad count is %s", squad_section, smart:name(), round_idp(math.max(1,smart.max_population * stalker_pop_factor)), smart_current_pop + 1)
L636 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s is a unique squad - spawned on %s",squad_section, smart:name())
L652 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1)
L698 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0)
L719 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1)
L731 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(2)
L737 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(3, actor_faction)
L745 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(5)
L785 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(6)
L862 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1)
L908 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(faction)
L914 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, "on_game_start")
L927 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(2, "on_game_start")
L958 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(str)
L1091 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Warfare is not loaded, unregistered warfare callbacks")
L51 🔴 global_write
Global write: warfare_debug
Impact: low
Show code
warfare_debug = true
L53 🔴 global_write
Global write: actor_faction
Impact: low
Show code
actor_faction = nil
L54 🔴 global_write
Global write: actor_influence_points
Impact: low
Show code
actor_influence_points = 0
L55 🔴 global_write
Global write: influence_levels
Impact: low
Show code
influence_levels = {} -- influence_levels[smart_terrain_id] = influence_level if > 0 or nil
L57 🔴 global_write
Global write: base_count
Impact: low
Show code
base_count = 0
L58 🔴 global_write
Global write: resource_count
Impact: low
Show code
resource_count = 0
L59 🔴 global_write
Global write: level_count
Impact: low
Show code
level_count = 32
L60 🔴 global_write
Global write: initialized
Impact: low
Show code
initialized = false
L63 🔴 global_write
Global write: all_out_war_applied
Impact: low
Show code
all_out_war_applied = false
L66 🔴 global_write
Global write: need_all_out_war_applied
Impact: low
Show code
need_all_out_war_applied = true
L67 🔴 global_write
Global write: dynamic_relations_installed
Impact: low
Show code
dynamic_relations_installed = false
L70 🔴 global_write
Global write: ignore
Impact: low
Show code
ignore = {}
L96 🔴 global_write
Global write: registered_squads
Impact: low
Show code
registered_squads = {
L183 🔴 global_write
Global write: loaded_squads
Impact: low
Show code
loaded_squads = false
L191 🔴 global_write
Global write: actor_influence_points
Impact: low
Show code
actor_influence_points = m_data.warfare and m_data.warfare.actor_influence_points or 0
L192 🔴 global_write
Global write: influence_levels
Impact: low
Show code
influence_levels = m_data.warfare and m_data.warfare.influence_levels or {}
L193 🔴 global_write
Global write: all_out_war_applied
Impact: low
Show code
all_out_war_applied = m_data.warfare and m_data.warfare.all_out_war_applied or false
L220 🔴 global_write
Global write: new_surge
Impact: low
Show code
new_surge = m_data.warfare and m_data.warfare.new_surge or true
L244 🔴 global_write
Global write: loaded_squads
Impact: low
Show code
loaded_squads = true
L325 🔴 global_write
Global write: actor_faction
Impact: low
Show code
actor_faction = get_actor_true_community() or alife():actor():community():sub(7)
L364 🔴 global_write
Global write: base_count
Impact: low
Show code
base_count = base_count + 1
L371 🔴 global_write
Global write: resource_count
Impact: low
Show code
resource_count = resource_count + smart.props.resource
L408 🔴 global_write
Global write: actor_faction
Impact: low
Show code
actor_faction = get_actor_true_community() or alife():actor():community():sub(7)
L415 🔴 global_write
Global write: dynamic_relations_installed
Impact: low
Show code
dynamic_relations_installed = true
L421 🔴 global_write
Global write: all_out_war_applied
Impact: low
Show code
all_out_war_applied = true
L468 🔴 global_write
Global write: initialized
Impact: low
Show code
initialized = true
L477 🔴 global_write
Global write: warfare_positions_filled
Impact: low
Show code
warfare_positions_filled = false
L531 🔴 global_write
Global write: ignore
Impact: low
Show code
ignore = sim_offline_combat.get_ignore_list()
L629 🔴 global_write
Global write: squad
Impact: low
Show code
squad = SIMBOARD:create_squad(smart,squad_section) -- common squads can't go over user-set cap
L634 🔴 global_write
Global write: squad
Impact: low
Show code
squad = SIMBOARD:create_squad(smart,squad_section) -- always make story squads
L720 🔴 global_write
Global write: start_pos
Impact: low
Show code
start_pos = {}
L729 🔴 global_write
Global write: actor_faction
Impact: low
Show code
actor_faction = alife():actor():community():sub(7)
L930 🔴 global_write
Global write: ignore
Impact: low
Show code
ignore = sim_offline_combat.get_ignore_list()
L938 🔴 global_write
Global write: info
Impact: low
Show code
info = debug.getinfo(2, "nS")
L535 🟡 unused_local_variable
Local variable 'max_active' is assigned but never used
Impact: low
Show code
local max_active = warfare_options.options.monster_max_squads_per_level

warfare_factions.script

L85 🟢 uncached_globals_summary
Cache 2 globals in update_faction
Impact: medium
Show code
L99: math.random L100: math.random L153: pairs L193: pairs
L120 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, faction or "nil faction")
L310 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Resurgence of %s is underway, targeting %s with %s squads", faction, target:name(), target_pop)
L338 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(9, "true end")
L17 🔴 global_write
Global write: printd
Impact: low
Show code
printd = warfare.printd
L19 🔴 global_write
Global write: factions_p
Impact: low
Show code
factions_p = {}
L20 🔴 global_write
Global write: factions
Impact: low
Show code
factions = {
L37 🔴 global_write
Global write: all_factions
Impact: low
Show code
all_factions = {
L54 🔴 global_write
Global write: faction_information
Impact: low
Show code
faction_information = {}
L55 🔴 global_write
Global write: faction_timers
Impact: low
Show code
faction_timers = {}

warfare_monkeypatches.script

L4 🔴 global_write
Global write: old_anomaly_task_cond
Impact: low
Show code
old_anomaly_task_cond = xr_conditions.has_task_target_anomaly
L15 🔴 global_write
Global write: old_anomaly_task_effect
Impact: low
Show code
old_anomaly_task_effect = xr_effects.setup_task_target_anomaly
L44 🔴 global_write
Global write: old_ecolog_companion_task_2_complete_task
Impact: low
Show code
old_ecolog_companion_task_2_complete_task = dialogs_jupiter.ecolog_companion_task_2_complete_task

warfare_options.script

L244 🟢 table_insert_append
table.insert(start_table, v) -> start_table[#start_table+1] = v
Impact: high
Show code
table.insert(start_table, id)
L199 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("end setup")
L232 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
warfare.printd(0, "get_random_start_location")
L250 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
warfare.printd(1, "get_random_start_location")
L20 🔴 global_write
Global write: options
Impact: low
Show code
options = {}
L234 🔴 global_write
Global write: start_table
Impact: low
Show code
start_table = {}
L248 🔴 global_write
Global write: start_location
Impact: low
Show code
start_location = start_table[math.random(#start_table)]
L243 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = loc_ini:r_line(f.."_start_locations", i, "", "")
L243 🟡 unused_local_variable
Local variable 'value' is assigned but never used
Impact: low
Show code
local result, id, value = loc_ini:r_line(f.."_start_locations", i, "", "")

xr_logic.script

L767 🟢 table_insert_append
table.insert(lst[n][index], v) -> lst[n][index][#lst[n][index]+1] = v
Impact: high
Show code
table.insert(lst[n][index],{infop,1,(string.find(infop,"npcx_"))})
L769 🟢 table_insert_append
table.insert(lst[n][index], v) -> lst[n][index][#lst[n][index]+1] = v
Impact: high
Show code
table.insert(lst[n][index],{infop,2,(string.find(infop,"npcx_"))})
L782 🟢 table_insert_append
table.insert(t, v) -> t[#t+1] = v
Impact: high
Show code
table.insert(t,tonumber(p) or p)
L784 🟢 table_insert_append
table.insert(lst[n][index], v) -> lst[n][index][#lst[n][index]+1] = v
Impact: high
Show code
table.insert(lst[n][index],{infop,sign == sign_equ and 3 or 4,t})
L789 🟢 table_insert_append
table.insert(lst[n][index], v) -> lst[n][index][#lst[n][index]+1] = v
Impact: high
Show code
table.insert(lst[n][index],{infop,sign == sign_equ and 3 or 4})
L792 🟢 table_insert_append
table.insert(lst[n][index], v) -> lst[n][index][#lst[n][index]+1] = v
Impact: high
Show code
table.insert(lst[n][index],{infop,5,tonumber(infop)})
L725 🟢 string_len
string.len(infop_name) -> #infop_name
Impact: low
Show code
if at < string.len(infop_name) - 1 then
L706 🟢 uncached_globals_summary
Cache 1 globals in parse_infop
Impact: medium
Show code
L714: string.sub L715: string.sub
L761 🟢 uncached_globals_summary
Cache 1 globals in extract_conditions
Impact: medium
Show code
L767: string.find L769: string.find
L800 🟢 uncached_globals_summary
Cache 1 globals in parse_condlist
Impact: medium
Show code
L823: string.sub L823: string.sub
L1055 🟢 uncached_globals_summary
Cache 1 globals in pstor_save_all
Impact: medium
Show code
L1071: pairs L1077: pairs
L155 🟢 repeated_npc_id()
npc:id() called 4x in determine_section_to_activate
Impact: low
Show code
Cache npc:id() result
L1310 🟢 repeated_npc_id()
npc:id() called 6x in set_new_scheme_and_logic
Impact: low
Show code
Cache npc:id() result
L110 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: object '%s' actual_ini=%s actual_ini_filename=%s %s=%s", npc:name(),actual_ini ~= nil,actual_ini_filename,section_logic,actual_ini and actual_ini:section_exist(section_logic))
L171 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("object '%s': section '%s': section 'active' has no conditionless else clause",npc:name(), section_logic)
L199 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("activate_by_section: INI is nil! npc=%s section=%s",npc and npc:name(),section)
L205 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: xr_logic: activate_by_section: loading field is nil, true or false expected")
L231 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: xr_logic: activate_by_section: section is NIL and NPC not in gulag.")
L245 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("object '%s': activate_by_section: section '%s' does not exist", npc:name(), section)
L250 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("object '%s': unable to determine scheme name from section name '%s'", npc:name(), section)
L254 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: %s trying to use a scheme not intended for stype scheme=%s stype=%s",npc:name(),scheme,db.storage[npc_id].stype)
L269 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: xr_logic: scheme '%s' is not registered in modules.script", scheme)
L273 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: xr_logic: can't call %s.set_scheme() - a nil value", filename)
L313 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: no scheme found in schemes table or scheme has no add_to_binder function! scheme = %s",scheme)
L338 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: subscribe_action_for_events storage is nil!")
L454 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("pick_section_from_condlist xr_conditions fail! obj=%s functor=%s",npc and npc:name(),infop[1])
L461 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("pick_section_from_condlist xr_conditions fail! obj=%s functor=%s",npc and npc:name(),infop[1])
L517 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("pick_section_from_condlist xr_effects fail! obj=%s functor=%s",npc and npc:name(),infop[1])
L636 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("WARNING: object '%s': try_switch_to_another_section: unknown condition '%s' encountered",npc:name(), c.name)
L649 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("npc '%s': st.section is nil, active section is '%s'",npc:name(), utils_data.to_str(db.storage[npc:id()].active_section))
L723 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( "wrong condlist" )
L804 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR!! xr_logic.parse_condlist npc=%s section=%s field=%s src=%s",npc and npc:name(),section,field,src)
L930 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("object '%s': section '%s': field '%s': there is no object with story_id '%s'",npc:name(), section, field, t.v1)
L1041 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("mob_capture: reset_actions parameter's value is not specified")
L1091 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("xr_logic: pstor_save_all: not registered type '%s' encountered", tv)
L1143 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("xr_logic: pstor_load_all: not registered type '%s' encountered %s", tn,obj:name())
L1171 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("save_obj WARNING: db.storage is nil! %s",obj:name())
L1256 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("1:get_customdata_or_ini_file %s file %s doesn't exist!",npc:name(),link_filename)
L1274 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("2:get_customdata_or_ini_file %s file %s doesn't exist!",npc:name(),filename)
L1307 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("set_new_scheme_and_logic npc is nil!")
L1319 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: set_new_scheme_and_logic: cannot find ini %s",ini_filename)
L50 🔴 global_write
Global write: result
Impact: low
Show code
result, id, value = st.ini:r_line(spawn_items_section,i,"","")
L771 🔴 global_write
Global write: a
Impact: low
Show code
a = string.find(infop,"(",1,true)
L773 🔴 global_write
Global write: b
Impact: low
Show code
b = string.find(infop,")",1,true)
L420 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
if not (actor:has_info(infop[1])) then
L425 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
if not (sim:has_info(0,infop[1])) then
L441 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
if (actor:has_info(infop[1])) then
L446 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
if (sim:has_info(0,infop[1])) then
L488 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
if not (actor:has_info(infop[1])) then
L489 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:give_info_portion(infop[1])
L492 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
if not (sim:has_info(0,infop[1])) then
L493 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
sim:give_info(0,infop[1])
L506 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
if (actor:has_info(infop[1])) then
L507 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:disable_info_portion(infop[1])
L510 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
if (sim:has_info(0,infop[1])) then
L511 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
sim:disable_info(0,infop[1])
L935 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(id)
L1251 🟡 potential_nil_access
Potential nil access: 'ini' from :spawn_ini() used without nil check
Impact: low
Show code
local link_filename = ini:r_string_ex("logic","cfg")

223- Fluid Relations - Favkis_Nexerade

2 files (🟢4 🟡6 🔴7 🔵10)

fluid_relationships.script

L57 🟢 uncached_globals_summary
Cache 1 globals in actor_on_update
Impact: medium
Show code
L60: pairs L62: pairs

game_relations.script

L251 🟢 uncached_globals_summary
Cache 1 globals in change_faction_relations
Impact: medium
Show code
L256: math.abs L256: math.abs
L328 🟢 uncached_globals_summary
Cache 1 globals in calculate_relation_change
Impact: medium
Show code
L382: math.random L386: math.random
L528 🟢 uncached_globals_summary
Cache 1 globals in online_npc_on_death
Impact: medium
Show code
L547: string.gsub L548: string.gsub
L679 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Npc not set in goodwill function!!!")
L696 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Npc not set in sympathy function!!!")
L701 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Applying new game relation [%s] between squad [%s] and npc [%s] !", new_goodwill, squad_id, "actor")
L705 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("there is no story squad with id [%s]", squad_id)
L714 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("There is no squad [%s] in sim_board", squad_id)
L738 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("There is no squad [%s] in sim_board", squad_id)
L753 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("There is no squad [%s] in sim_board", squad_id)
L810 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("No such squad %s in board", tostring(squad_id))
L814 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(" squad_relation %s", tostring(squad.relationship))
L834 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("No such squad %s in board", tostring(squad_name))
L33 🔴 global_write
Global write: factions_table
Impact: low
Show code
factions_table = {"stalker","bandit","csky","dolg","freedom","killer","army","ecolog","monolith","renegade","greh","isg"}
L34 🔴 global_write
Global write: factions_table_all
Impact: low
Show code
factions_table_all = {"actor","bandit","dolg","ecolog","freedom","killer","army","monolith","monster","stalker","zombied","csky","renegade","greh","isg","trader","actor_stalker","actor_bandit","actor_dolg","actor_freedom","actor_csky","actor_ecolog","actor_killer","actor_army","actor_monolith","actor_renegade","actor_greh","actor_isg","actor_zombied","arena_enemy"}
L40 🔴 global_write
Global write: friend_limit
Impact: low
Show code
friend_limit = ini_r:r_float_ex ("controls" ,"friend_limit") or 4100
L41 🔴 global_write
Global write: enemy_limit
Impact: low
Show code
enemy_limit = ini_r:r_float_ex ("controls" ,"enemy_limit") or -5000
L46 🔴 global_write
Global write: default_sympathy
Impact: low
Show code
default_sympathy = 0.01
L47 🔴 global_write
Global write: game_relations_by_num
Impact: low
Show code
game_relations_by_num = { [0] = "friend",
L51 🔴 global_write
Global write: temp_goodwill_table
Impact: low
Show code
temp_goodwill_table = {}
L726 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_npc = sim:object(npc:id())
L731 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = k.object or k.id and sim:object(k.id)
L734 🟡 potential_nil_access
Potential nil access: 'se_npc' from :object() used without nil check
Impact: low
Show code
se_npc:force_set_goodwill(goodwill, k.id)
L43 🟡 unused_local_variable
Local variable 'friend_count_limit' is assigned but never used
Impact: low
Show code
local friend_count_limit = ini_r:r_float_ex ("controls" ,"friend_count_limit") or 3
L44 🟡 unused_local_variable
Local variable 'enemy_count_limit' is assigned but never used
Impact: low
Show code
local enemy_count_limit = ini_r:r_float_ex ("controls" ,"enemy_count_limit") or 3
L84 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_r:r_line("one_way_pairs", i , "", "")

225- Placeable Campfires - xcvb

3 files (🟢2 🟡5 🔴6 🔵7)

campfire_placeable.script

L49 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("tbl is empty || .level_name is now: %s", prev_level.level_name)
L51 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("tbl is not empty")
L53 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(".level_name is not equal curr_level")
L59 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("- Object deleted (id): %s", se_obj.id)
L76 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("obj: %s is not campfire or doesnt fit CZoneCampfire class", obj:section())
L232 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s degraded for: %s %", sec, degr_for * 100)
L244 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Time spent on chopping wood: %s Minutes", minutes)
L267 🔴 global_write
Global write: NameCustom
Impact: low
Show code
NameCustom = ui_inventory.UIInventory.Name_Custom
L284 🔴 global_write
Global write: ActionCustom
Impact: low
Show code
ActionCustom = ui_inventory.UIInventory.Action_Custom
L428 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update
L254 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L261 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L271 🟡 potential_nil_access
Potential nil access: 'active_item' from :active_item() used without nil check
Impact: low
Show code
local active_id = active_item and active_item:id()
L287 🟡 potential_nil_access
Potential nil access: 'active_item' from :active_item() used without nil check
Impact: low
Show code
local active_id = active_item and active_item:id()
L287 🟡 unused_local_variable
Local variable 'active_id' is assigned but never used
Impact: low
Show code
local active_id = active_item and active_item:id()

campfire_placeable_mcm.script

L14 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "campfire_placeable",sh=true ,gr={

trader_autoinject.script

L34 🟢 repeated_npc_id()
npc:id() called 3x in trade_manager.update
Impact: low
Show code
Cache npc:id() result
L182 🟢 repeated_item_section()
item:section() called 4x in itr_inv
Impact: low
Show code
Cache item:section() result
L16 🔴 global_write
Global write: find
Impact: low
Show code
find = string.find
L32 🔴 global_write
Global write: TraderUpdate
Impact: low
Show code
TraderUpdate = trade_manager.update

227- Increased Companions Distance - Dhatri

2 files (🟢4 🟡18 🔴10 🔵0)

axr_beh.script

L539 🟢 uncached_globals_summary
Cache 2 globals in get_current_waypoint
Impact: medium
Show code
L561: string.gmatch L565: string.gmatch L563: tonumber L563: tonumber
L188 🟢 repeated_self_object_id()
self.object:id() called 6x in set_desired_target
Impact: low
Show code
Cache self.object:id() result
L458 🟢 repeated_self_object_id()
self.object:id() called 4x in beh_path
Impact: low
Show code
Cache self.object:id() result
L540 🟢 repeated_self_object_id()
self.object:id() called 3x in get_current_waypoint
Impact: low
Show code
Cache self.object:id() result
L9 🔴 global_write
Global write: beh_evid
Impact: low
Show code
beh_evid = 188111
L10 🔴 global_write
Global write: beh_actid
Impact: low
Show code
beh_actid = 188111
L171 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
t.level_vertex_id = obj:level_vertex_id()
L172 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
t.game_vertex_id = obj:game_vertex_id()
L173 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
t.position = obj:position()
L174 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
t.direction = obj:direction()

xr_companion.script

L13 🔴 global_write
Global write: beh_walk_simple
Impact: low
Show code
beh_walk_simple = 0
L14 🔴 global_write
Global write: beh_walk_near
Impact: low
Show code
beh_walk_near = 1
L15 🔴 global_write
Global write: beh_walk_ignore
Impact: low
Show code
beh_walk_ignore = 2
L16 🔴 global_write
Global write: beh_wait_simple
Impact: low
Show code
beh_wait_simple = 3
L17 🔴 global_write
Global write: beh_wait_near
Impact: low
Show code
beh_wait_near = 4
L18 🔴 global_write
Global write: beh_wait_ignore
Impact: low
Show code
beh_wait_ignore = 5
L161 🔴 global_write
Global write: desired_direction
Impact: low
Show code
desired_direction = vector_rotate_y(actor:direction(), math.random(50,60) )
L169 🔴 global_write
Global write: desired_direction
Impact: low
Show code
desired_direction = vector_rotate_y(actor:direction(), -math.random(50,60) )
L59 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local dist_from_self_to_actor = self.object:position():distance_to(actor:position())
L62 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
dist_from_assist_pt_to_actor = level.vertex_position(self.assist_point):distance_to(actor:position())
L161 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
desired_direction = vector_rotate_y(actor:direction(), math.random(50,60) )
L162 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
node_1_vertex_id = level.vertex_in_direction(actor:level_vertex_id(),
L165 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
if npc:accessible(node_1_vertex_id) ~= true or node_1_vertex_id == actor:level_vertex_id() then
L169 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
desired_direction = vector_rotate_y(actor:direction(), -math.random(50,60) )
L170 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
node_2_vertex_id = level.vertex_in_direction ( actor:level_vertex_id(),
L173 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
if npc:accessible(node_2_vertex_id) ~= true or node_2_vertex_id == actor:level_vertex_id() then
L2 🟡 unused_local_variable
Local variable 'min_distance' is assigned but never used
Impact: low
Show code
local min_distance = 3
L10 🟡 unused_local_variable
Local variable 'sound_wait' is assigned but never used
Impact: low
Show code
local sound_wait = "weather,state"
L20 🟡 unused_local_variable
Local variable 'mt_stand' is assigned but never used
Impact: low
Show code
local mt_stand = 0
L21 🟡 unused_local_variable
Local variable 'mt_walk' is assigned but never used
Impact: low
Show code
local mt_walk = 1
L22 🟡 unused_local_variable
Local variable 'mt_run' is assigned but never used
Impact: low
Show code
local mt_run = 2
L23 🟡 unused_local_variable
Local variable 'mt_sprint' is assigned but never used
Impact: low
Show code
local mt_sprint = 3

230- Repair Bonuses in Details Window - Demonized

1 file (🟢0 🟡1 🔴0 🔵4)

zz_ui_itm_details_repair_bonuses.script

L25 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
local dumped = string.dump(fn)
L43 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("calling override ui_itm_details.UIItemSheet.Reset")
L46 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Super function ui_itm_details.UIItemSheet.Reset called")
L124 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('Repair part %s has supported repair kits', useable_material)
L96 🟡 unused_local_variable
Local variable 'con' is assigned but never used
Impact: low
Show code
local con = ci.flags.info / 100

231- More Aggressive NPC Looting (harder game, do not use with NPC Loot Claim) - Demonized

2 files (🟢5 🟡9 🔴6 🔵4)

xr_corpse_detection.script

L100 🟢 repeated_obj_id()
obj:id() called 3x in monster_on_death_callback
Impact: low
Show code
Cache obj:id() result
L117 🟢 repeated_obj_id()
obj:id() called 3x in on_pstor_load_all
Impact: low
Show code
Cache obj:id() result
L496 🟢 repeated_npc_id()
npc:id() called 3x in execute
Impact: low
Show code
Cache npc:id() result
L296 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("C Stack Overflow Prevention: warning xr_corpse_detection scheme making repeated calls without return; save now and reload!")
L630 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: xr_corpse_detection: no action id p[%s]",i)
L637 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: xr_corpse_detection: reset_generic_scheme storage is nil! npc=%s scheme=%s section=%s",npc and npc:name(),scheme,section)
L11 🔴 global_write
Global write: lootable_table
Impact: low
Show code
lootable_table = nil
L139 🔴 global_write
Global write: lootable_table
Impact: low
Show code
lootable_table = get_loot_table(ini)
L502 🔴 global_write
Global write: look_pos
Impact: low
Show code
look_pos = corpse and utils_obj.safe_bone_pos(corpse,"bip01_spine") or self.a.vertex_position
L626 🟡 potential_nil_access
Potential nil access: 'manager' from :motivation_action_manager() used without nil check
Impact: low
Show code
action = manager:action(p[i])
L659 🟡 potential_nil_access
Potential nil access: 'mgr' from :motivation_action_manager() used without nil check
Impact: low
Show code
if not mgr or not mgr:initialized() then
L663 🟡 potential_nil_access
Potential nil access: 'mgr' from :motivation_action_manager() used without nil check
Impact: low
Show code
local current_action_id = mgr:current_action_id()
L247 🟡 unused_local_variable
Local variable 'sec' is assigned but never used
Impact: low
Show code
local sec

zz_npc_loot_claim_softcore.script

L28 🟢 repeated_stalker_obj_id()
stalker_obj:id() called 3x in find_looting_stalker
Impact: low
Show code
Cache stalker_obj:id() result
L100 🟢 repeated_obj_id()
obj:id() called 5x in monster_on_actor_use_callback
Impact: low
Show code
Cache obj:id() result
L8 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(error_or_result)
L15 🔴 global_write
Global write: claimed_monsters
Impact: low
Show code
claimed_monsters = {}
L83 🔴 global_write
Global write: ui_inventory_start
Impact: low
Show code
ui_inventory_start = ui_inventory.start
L138 🔴 global_write
Global write: fdda_monster_use
Impact: low
Show code
fdda_monster_use = enhanced_animations.monster_on_actor_use
L24 🟡 potential_nil_access
Potential nil access: 'stalker_obj' from level.object_by_id() used without nil check
Impact: low
Show code
if not stalker_obj or obj:position():distance_to_sqr(stalker_obj:position()) > claim_radius_sqr then
L28 🟡 potential_nil_access
Potential nil access: 'stalker_obj' from level.object_by_id() used without nil check
Impact: low
Show code
if stalker_obj and stalker_obj ~= 0 and stalker_obj:id() ~= AC_ID and IsStalker(stalker_obj) and stalker_obj:alive() then
L28 🟡 potential_nil_access
Potential nil access: 'stalker_obj' from level.object_by_id() used without nil check
Impact: low
Show code
if stalker_obj and stalker_obj ~= 0 and stalker_obj:id() ~= AC_ID and IsStalker(stalker_obj) and stalker_obj:alive() then
L42 🟡 potential_nil_access
Potential nil access: 'stalker_obj' from level.object_by_id() used without nil check
Impact: low
Show code
if stalker_obj and stalker_obj ~= 0 and stalker_obj:id() ~= AC_ID and IsStalker(stalker_obj) and stalker_obj:alive() then
L42 🟡 potential_nil_access
Potential nil access: 'stalker_obj' from level.object_by_id() used without nil check
Impact: low
Show code
if stalker_obj and stalker_obj ~= 0 and stalker_obj:id() ~= AC_ID and IsStalker(stalker_obj) and stalker_obj:alive() then

233- AUGmented Weapon Pack - Firebreath

2 files (🟢4 🟡0 🔴3 🔵0)

augmented_trader_inject.script

L36 🟢 uncached_globals_summary
Cache 1 globals in spawn_augmented
Impact: medium
Show code
L42: string.find L42: string.find
L42 🟢 repeated_npc_section()
npc:section() called 5x in spawn_augmented
Impact: low
Show code
Cache npc:section() result
L63 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update

trader_autoinject.script

L34 🟢 repeated_npc_id()
npc:id() called 3x in trade_manager.update
Impact: low
Show code
Cache npc:id() result
L181 🟢 repeated_item_section()
item:section() called 4x in itr_inv
Impact: low
Show code
Cache item:section() result
L16 🔴 global_write
Global write: find
Impact: low
Show code
find = string.find
L32 🔴 global_write
Global write: TraderUpdate
Impact: low
Show code
TraderUpdate = trade_manager.update

234- Dynamic Anomalies Overhaul - Demonized

10 files (🟢19 🟡16 🔴75 🔵136)

demonized_concurrent_queues.script

L50 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s is not table, abort", queue_table)
L55 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("queue %s is already active, abort", queue_name)
L46 🔴 global_write
Global write: active_queues
Impact: low
Show code
active_queues = {}

demonized_time_events.script

L23 🟢 uncached_globals_summary
Cache 1 globals in print_table
Impact: medium
Show code
L32: type L34: type
L35 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = function",k)
L38 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s",k,utils_data.vector_to_string(v))
L40 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = userdata", k)
L45 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = true",k)
L47 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = true")
L51 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = false", k)
L53 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = false")
L58 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s", k,v)
L60 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = nil", k,v)
L121 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("refreshing time events")
L202 🟡 unused_local_variable
Local variable 'tg_past' is assigned but never used
Impact: low
Show code
local tg_past = 0

drx_da_main.script

L1814 🟢 table_insert_append
table.insert(objects, v) -> objects[#objects+1] = v
Impact: high
Show code
table.insert(objects, obj)
L1823 🟢 table_insert_append
table.insert(sec_to_obj[sec], v) -> sec_to_obj[sec][#sec_to_obj[sec]+1] = v
Impact: high
Show code
table.insert(sec_to_obj[sec], {
L88 🟢 string_len
string.len(pos) -> #pos
Impact: low
Show code
sub_print_r(val,indent..string.rep(" ",string.len(pos)+8))
L89 🟢 string_len
string.len(pos) -> #pos
Impact: low
Show code
printf(indent..string.rep(" ",string.len(pos)+6).."}")
L79 🟢 uncached_globals_summary
Cache 1 globals in sub_print_r
Impact: medium
Show code
L80: tostring L81: tostring
L862 🟢 repeated_alife
alife called 3x in clean_dynamic_anomalies_global
Impact: low
Show code
local sim = alife()
L1660 🟢 repeated_level_name
level.name called 5x in drx_da_actor_on_update_callback
Impact: low
Show code
local level_name = level.name()
L2026 🟢 repeated_obj_section()
obj:section() called 4x in <global>
Impact: low
Show code
Cache obj:section() result
L2663 🟢 repeated_self_object_id()
self.object:id() called 6x in <global>
Impact: low
Show code
Cache self.object:id() result
L2863 🟢 repeated_level_name
level.name called 5x in actor_on_interaction
Impact: low
Show code
local level_name = level.name()
L3388 🟢 repeated_alife
alife called 3x in force_clean_dynamic_anomalies_global
Impact: low
Show code
local sim = alife()
L81 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."*"..tostring(t))
L87 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."["..pos.."] => "..tostring(t).." {")
L89 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent..string.rep(" ",string.len(pos)+6).."}")
L91 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."["..pos.."] => "..tostring(val))
L95 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent..tostring(t))
L108 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(error_or_result)
L162 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("snd is nil")
L195 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("current_time %s, adding effect %s", time_elapsed, time_elapsed + (timer or 0))
L209 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
effect_function = effect_function and dump(effect_function),
L214 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
on_end_function = on_end_function and dump(on_end_function),
L265 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("removing effect, key %s", key)
L267 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("removing effect, firing on end, key %s", key)
L284 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("removing effect, effect timer %s, current_time %s", props.timer, time_elapsed)
L308 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("registering callback %s, key %s", callback, key)
L315 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("unregistering callback %s, %s", key, callbacks[key].callback)
L584 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("removed restriction %s for level %s", se_obj:name(), se_obj_level)
L650 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("adding anomaly %s to smart %s", se_obj:section_name(), smart_name)
L681 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("disabling anomaly %s, %s, level %s", g_obj:section(), g_obj:id(), level_name)
L699 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("enabling anomaly %s, %s, level %s", g_obj:section(), g_obj:id(), level_name)
L716 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error, object is not an anomaly, %s, %s, on level %s", obj:section_name(), obj.id, level_name)
L720 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("removing anomaly object %s, %s, on level %s", obj:section_name(), obj.id, level_name)
L789 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error, can't remove old anomaly %s, level %s, in restriction", anom_id, level_name)
L798 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("old anomalies already cleaned on level %s", level_name)
L806 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error, updated_anomaly_levels table not found for %s", level_name)
L828 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error, can't remove anomaly %s, level %s, in restriction", t[i], level_name)
L833 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Anomalies cleaned on level %s", level_name)
L882 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Deleting anomaly %s, %s globally, level %s", se_obj:section_name(), v1, k)
L886 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error, object is not an anomaly, %s, %s, on level %s", se_obj:section_name(), v1, k)
L903 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("can't delete anomaly %s globally, level %s, in restriction", v1, k)
L924 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error, can't remove old anomaly %s, level %s, in restriction", anom_id, k)
L933 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("old anomalies already cleaned on level %s", k)
L937 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Cleaned dynamic anomalies globally")
L951 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error: Unable to create dynamic anomaly field for %s, the specified smart location does not exist", smart_name)
L967 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Dynamic anomaly field %s spawned at %s, level %s", anomaly_type, smart_name, level_name)
L971 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error: failed to generate position")
L979 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("ltx file not found: %s", level_file_name)
L986 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Dynamic anomalies not spawned, spawn chance is 0")
L993 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Dynamic anomalies not spawned, max anomaly count is 0")
L1000 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Dynamic anomalies not spawned, max active count is 0")
L1023 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error, unable to get data for %s", level_name)
L1072 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("disable all new anomalies, found section %s", v)
L1083 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("anomaly %s is not enabled", v)
L1126 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("picked anomaly type %s", anomaly_type)
L1161 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("No dynamic anomaly types specified for level %s", level_name)
L1164 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("no anomalies spawn on smart %s, level %s in restriction", smart_name, level_name)
L1209 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error, anomaly %s failed to spawn correctly, releasing", anom_type)
L1223 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error: Unable to spawn dynamic anomaly")
L1230 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error: Unable to set dynamic anomaly properties")
L1337 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error: Unable to generate positional data, specified smart location does not exist")
L1397 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Anomaly type %s, Position data valid, distance %s, saving %s, %s, %s", anomaly_type, distance, pos_x, pos_y, pos_z)
L1401 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Anomaly type %s, Position data invalid, too close, distance %s, %s, %s, %s", anomaly_type, distance, pos_x, pos_y, pos_z)
L1405 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Anomaly type %s, Can't check position data %s, %s, %s", anomaly_type, pos_x, pos_y, pos_z)
L1411 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Anomaly type %s, Position data provided, saving %s, %s, %s", anomaly_type, pos_x, pos_y, pos_z)
L1423 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error: Unable to generate valid lvid pos, aborting")
L1441 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("releasing artefact %s, sec %s, level_name %s", k, v, level_name)
L1452 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error: Unable to create artefact %s, is nil", picked_artefact)
L1459 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error: Unable to create artefact for %s, the specified smart location does not exist", smart_name)
L1478 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Artefact %s, id %s spawned at %s, level %s", picked_artefact, artefact.id, smart_name, level_name)
L1482 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error: failed to generate position")
L1492 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error, unable to get data for %s", level_name)
L1519 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s has smarts with anomalies, try to spawn artefacts", level_name)
L1523 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("checking smart %s for spawning artefacts", smart_name)
L1525 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("try to spawn artefacts on smart %s", smart_name)
L1531 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("artefacts dice roll %s, chance %s, spawn %s", dice_roll, chance, dice_roll <= chance)
L1549 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("picking artefact by level %s, anomaly zone %s has defined arty list", level_name, anomaly_type)
L1552 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("picking artefact by level %s", level_name)
L1557 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("artefact is not allowed to spawn, repicking")
L1563 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("picking random artefacts")
L1568 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("failed to pick artefact by level, pick random from allowed, level_name %s, anomaly_type %s, has artefacts_map_tiers %s, has anomaly_type_to_artefacts %s", level_name, anomaly_type, artefacts_map_tiers ~= nil, anomaly_type_to_artefacts[anomaly_type] ~= nil)
L1586 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("picked artefact to spawn %s, anomaly_type %s, smart %s level %s", picked_artefact, anomaly_type, smart_name, level_name)
L1591 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("error, unabled to spawn artefact %s, anomaly_type %s, smart %s level %s", picked_artefact, anomaly_type, smart_name, level_name)
L1599 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s has no smarts with anomalies, dont spawn artefacts", level_name)
L1608 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error: Cannot update anomalies, db.actor not available")
L1615 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error: Cannot update anomalies, surge manager not available")
L1628 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error, failed to spawn anomalies")
L1633 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("updated anomalies on level %s", level_name)
L1642 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("anomalies not updated on level %s, no emission happened, last_surge_time %s, level update time %s", level_name, last_surge_time, updated_anomaly_levels[level_name].time)
L1662 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("saved level %s, current level %s", alife_storage_manager.get_state().drx_da_previous_level, level.name())
L1672 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("on the same level, only register behaviour")
L1698 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("anomalies updated, unregistering")
L1714 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("anomalies behaviour, anomalies not found for level %s", level_name)
L1726 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("anomalies behaviour, turning on behaviour for level %s", level_name)
L1977 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("trying to spawn poltergeist")
L2871 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("surge happened globally at %s", last_surge_time)
L2872 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("update on level %s after emission", level.name())
L2879 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("surge happened globally at %s", get_time_elapsed())
L2880 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("update artefacts on level %s after emission", level.name())
L2892 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("taken created artefact %s, id %s, level_name %s", updated_anomaly_levels[level_name].artefacts[id], id, level_name)
L2906 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("change_time")
L2995 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("flash got hit %s", monster:section())
L3114 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("saving previous_level")
L3185 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("article not found for %s", section)
L3191 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("article already opened for %s", section)
L3197 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("youre too stupid for article boy")
L3252 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("time resetted for %s", k)
L3254 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("last_surge_time is 0")
L3272 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error, unable to get data for %s", level_name)
L3293 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error, unable to get data for %s", level_name)
L3323 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("picked anomaly type %s", anomaly_type)
L3339 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("No dynamic anomaly types specified for level %s", level_name)
L3342 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("no anomalies spawn on smart %s, level %s in restriction", smart_name, level_name)
L3369 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("anomalies updated after surge on level %s", level_name)
L3408 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Deleting anomaly %s, %s globally, level %s", se_obj:section_name(), v1, k)
L3412 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error, object is not an anomaly, %s, %s, on level %s", se_obj:section_name(), v1, k)
L3429 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("can't delete anomaly %s globally, level %s, in restriction", v1, k)
L3450 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error, can't remove old anomaly %s, level %s, in restriction", anom_id, k)
L3459 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("old anomalies already cleaned on level %s", k)
L3492 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Cleaned dynamic anomalies globally")
L193 🔴 global_write
Global write: timed_effects
Impact: low
Show code
timed_effects = {}
L294 🔴 global_write
Global write: callbacks
Impact: low
Show code
callbacks = {}
L357 🔴 global_write
Global write: reduced_chance_levels
Impact: low
Show code
reduced_chance_levels = {
L371 🔴 global_write
Global write: anomaly_radii
Impact: low
Show code
anomaly_radii = {
L412 🔴 global_write
Global write: updated_anomaly_levels
Impact: low
Show code
updated_anomaly_levels = {}
L413 🔴 global_write
Global write: last_surge_time
Impact: low
Show code
last_surge_time = 0
L1286 🔴 global_write
Global write: small_levels
Impact: low
Show code
small_levels = {
L1292 🔴 global_write
Global write: anomalies_distance_check_ignore
Impact: low
Show code
anomalies_distance_check_ignore = {
L1312 🔴 global_write
Global write: anomalies_radiation_fields
Impact: low
Show code
anomalies_radiation_fields = {
L1707 🔴 global_write
Global write: anomalies_do_not_register_behaviour
Impact: low
Show code
anomalies_do_not_register_behaviour = {
L1767 🔴 global_write
Global write: anomalies_pos_tree
Impact: low
Show code
anomalies_pos_tree = nil
L1768 🔴 global_write
Global write: detectable_anomalies_pos_tree
Impact: low
Show code
detectable_anomalies_pos_tree = nil
L1769 🔴 global_write
Global write: detectable_anomalies_ids
Impact: low
Show code
detectable_anomalies_ids = {}
L1770 🔴 global_write
Global write: anomalies_obj_to_pos
Impact: low
Show code
anomalies_obj_to_pos = {}
L1771 🔴 global_write
Global write: anomalies_sec_to_obj
Impact: low
Show code
anomalies_sec_to_obj = {}
L1773 🔴 global_write
Global write: common_sec
Impact: low
Show code
common_sec = {
L1851 🔴 global_write
Global write: detectable_anomalies_pos_tree
Impact: low
Show code
detectable_anomalies_pos_tree = kd_tree.buildTreeSeObjectIds(t)
L1873 🔴 global_write
Global write: anomalies_vars
Impact: low
Show code
anomalies_vars = {
L1910 🔴 global_write
Global write: condition
Impact: low
Show code
condition = function() return true end
L1912 🔴 global_write
Global write: condition
Impact: low
Show code
condition = function() return false end
L1929 🔴 global_write
Global write: condition
Impact: low
Show code
condition = function() return true end
L1931 🔴 global_write
Global write: condition
Impact: low
Show code
condition = function() return false end
L1954 🔴 global_write
Global write: anomalies_near_actor_radii
Impact: low
Show code
anomalies_near_actor_radii = {
L1963 🔴 global_write
Global write: anomalies_near_actor_functions
Impact: low
Show code
anomalies_near_actor_functions = {
L2267 🔴 global_write
Global write: pda_glitch_value
Impact: low
Show code
pda_glitch_value = clamp(mine_factor ^ 0.5, 0, 1)
L2269 🔴 global_write
Global write: pda_glitch_value
Impact: low
Show code
pda_glitch_value = nil
L2334 🔴 global_write
Global write: pda_glitch_value
Impact: low
Show code
pda_glitch_value = clamp(mine_factor ^ 0.5, 0, 1)
L2336 🔴 global_write
Global write: pda_glitch_value
Impact: low
Show code
pda_glitch_value = nil
L2356 🔴 global_write
Global write: anomalies_spawn_functions
Impact: low
Show code
anomalies_spawn_functions = {
L2441 🔴 global_write
Global write: anomalies_destroy_functions
Impact: low
Show code
anomalies_destroy_functions = {
L2451 🔴 global_write
Global write: anomaly_detector_ignore
Impact: low
Show code
anomaly_detector_ignore = {
L2569 🔴 global_write
Global write: detector_functions
Impact: low
Show code
detector_functions = {
L2653 🔴 global_write
Global write: bind_anomaly_field_spawn
Impact: low
Show code
bind_anomaly_field_spawn = bind_anomaly_field.anomaly_field_binder.net_spawn
L2740 🔴 global_write
Global write: bind_anomaly_field_destroy
Impact: low
Show code
bind_anomaly_field_destroy = bind_anomaly_field.anomaly_field_binder.net_destroy
L2770 🔴 global_write
Global write: bind_anomaly_field_update
Impact: low
Show code
bind_anomaly_field_update = bind_anomaly_field.anomaly_field_binder.update
L2820 🔴 global_write
Global write: pda_glitch_value
Impact: low
Show code
pda_glitch_value = nil
L2821 🔴 global_write
Global write: process_glitch
Impact: low
Show code
process_glitch = item_device.device_binder.process_glitch
L2829 🔴 global_write
Global write: process_flicker
Impact: low
Show code
process_flicker = item_device.device_binder.process_flicker
L2834 🔴 global_write
Global write: process_torch
Impact: low
Show code
process_torch = item_device.device_binder.process_torch
L2869 🔴 global_write
Global write: last_surge_time
Impact: low
Show code
last_surge_time = get_time_elapsed()
L2902 🔴 global_write
Global write: anomalies_hit_functions
Impact: low
Show code
anomalies_hit_functions = {
L2991 🔴 global_write
Global write: anomalies_monster_hit_functions
Impact: low
Show code
anomalies_monster_hit_functions = {
L3017 🔴 global_write
Global write: npc_on_near_anomalies_functions
Impact: low
Show code
npc_on_near_anomalies_functions = {
L3080 🔴 global_write
Global write: timed_effects
Impact: low
Show code
timed_effects = t
L3082 🔴 global_write
Global write: last_surge_time
Impact: low
Show code
last_surge_time = m_data.drx_da_last_surge_time or 0
L3083 🔴 global_write
Global write: updated_anomaly_levels
Impact: low
Show code
updated_anomaly_levels = m_data.drx_da_updated_anomaly_levels or {}
L3084 🔴 global_write
Global write: opened_articles
Impact: low
Show code
if m_data.drx_da_opened_articles then opened_articles = m_data.drx_da_opened_articles end
L3161 🔴 global_write
Global write: additional_articles_to_category
Impact: low
Show code
additional_articles_to_category = {
L3177 🔴 global_write
Global write: opened_articles
Impact: low
Show code
opened_articles = {
L3231 🔴 global_write
Global write: InitArticles
Impact: low
Show code
InitArticles = ui_pda_encyclopedia_tab.pda_encyclopedia_tab.InitArticles
L3249 🔴 global_write
Global write: last_surge_time
Impact: low
Show code
last_surge_time = 0
L615 🟡 potential_nil_access
Potential nil access: 'obj' from :object() used without nil check
Impact: low
Show code
if not IsAnomaly(_, obj:clsid()) then
L680 🟡 potential_nil_access
Potential nil access: 'g_obj' from level.object_by_id() used without nil check
Impact: low
Show code
if g_obj and g_obj ~= 0 and g_obj:id() ~= 0 then
L698 🟡 potential_nil_access
Potential nil access: 'g_obj' from level.object_by_id() used without nil check
Impact: low
Show code
if g_obj and g_obj ~= 0 and g_obj:id() ~= 0 then
L758 🟡 potential_nil_access
Potential nil access: 'g_obj' from level.object_by_id() used without nil check
Impact: low
Show code
if g_obj and g_obj ~= 0 and g_obj:id() ~= 0 then
L2530 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local actor_pos = actor:position()
L2645 🟡 potential_nil_access
Potential nil access: 'detector' from :item_in_slot() used without nil check
Impact: low
Show code
local sec = detector and detector:section()
L2698 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local distance_to_sqr = self.object:position():distance_to_sqr(actor:position())
L2781 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local distance_to_sqr = self.object:position():distance_to_sqr(actor:position())
L2925 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:set_health_ex(health)
L2926 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_health(-random_float(0.01, 0.04))
L3398 🟢 dead_code_if_false
Dead code: if false (lines 3398-3461)
Impact: low
Show code
if false then
L515 🟡 unused_local_variable
Local variable 'nearest_smart_id' is assigned but never used
Impact: low
Show code
local nearest_smart_id, nearest_smart_name = get_nearest_smart_id(se_obj)
L1691 🟡 unused_local_variable
Local variable 'updated' is assigned but never used
Impact: low
Show code
local updated = drx_da_update_dynamic_anomalies()
L2397 🟡 unused_local_variable
Local variable 'max_offset_y_low' is assigned but never used
Impact: low
Show code
local max_offset_y_low = spawn_position.y - max_offset_y
L2398 🟡 unused_local_variable
Local variable 'max_offset_y_high' is assigned but never used
Impact: low
Show code
local max_offset_y_high = spawn_position.y + max_offset_y
L2924 🟡 unused_local_variable
Local variable 'new_health' is assigned but never used
Impact: low
Show code
local new_health = actor.health

drx_da_main_artefacts.script

L11 🔴 global_write
Global write: allowed_artefacts
Impact: low
Show code
allowed_artefacts = (function() -- Allowed artefacts to spawn
L120 🔴 global_write
Global write: artefacts_map_chances
Impact: low
Show code
artefacts_map_chances = {
L138 🔴 global_write
Global write: artefacts_map_tiers
Impact: low
Show code
artefacts_map_tiers = {
L1877 🔴 global_write
Global write: anomaly_type_to_artefacts
Impact: low
Show code
anomaly_type_to_artefacts = {

drx_da_main_artefacts_movement.script

L188 🟢 repeated_obj_id()
obj:id() called 2x in actor_on_item_take
Impact: low
Show code
Cache obj:id() result
L53 🔴 global_write
Global write: artefact_ids_to_way
Impact: low
Show code
artefact_ids_to_way = table_nexter({})
L55 🔴 global_write
Global write: spawn_artefact_on_smart
Impact: low
Show code
spawn_artefact_on_smart = drx_da_main.spawn_artefact_on_smart
L67 🔴 global_write
Global write: clean_artefacts_on_level
Impact: low
Show code
clean_artefacts_on_level = drx_da_main.clean_artefacts_on_level
L183 🔴 global_write
Global write: artefact_ids_to_way
Impact: low
Show code
artefact_ids_to_way = m_data.dao_artefact_movement

drx_da_main_mcm.script

L140 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("DRX DA preset %s not found", p)
L2 🔴 global_write
Global write: new_anomalies_sections
Impact: low
Show code
new_anomalies_sections = {
L16 🔴 global_write
Global write: variations_anomalies_sections
Impact: low
Show code
variations_anomalies_sections = {
L27 🔴 global_write
Global write: presets
Impact: low
Show code
presets = {
L66 🔴 global_write
Global write: op_id
Impact: low
Show code
op_id = "drx_da"
L67 🔴 global_write
Global write: op_preset_id
Impact: low
Show code
op_preset_id = "presets"
L69 🔴 global_write
Global write: op
Impact: low
Show code
op = {
L190 🔴 global_write
Global write: MCM_Callback_List
Impact: low
Show code
MCM_Callback_List = ui_mcm.UIMCM.Callback_List

drx_da_main_traders.script

L1 🔴 global_write
Global write: get_param
Impact: low
Show code
get_param = utils_item.SYS_GetParam
L11 🔴 global_write
Global write: trade_table
Impact: low
Show code
trade_table = {
L40 🔴 global_write
Global write: spawn_chance
Impact: low
Show code
spawn_chance = 1
L73 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update

new_game_loadout_injector_mcm.script

L188 🟢 table_insert_append
table.insert(loadout_items[item_table.section], v) -> loadout_items[item_table.section][#loadout_items[item_table.section]+1] = v
Impact: high
Show code
table.insert(loadout_items[item_table.section], item_table)
L145 🟢 uncached_globals_summary
Cache 1 globals in add_item
Impact: medium
Show code
L146: type L159: type
L211 🟢 uncached_globals_summary
Cache 1 globals in ui_mm_faction_select.UINewGame.LoadLoadout
Impact: medium
Show code
L218: pairs L227: pairs
L78 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Loadout Injector: " .. str, ...)
L82 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!Loadout Injector: ERROR, " .. str, ...)
L109 🔴 global_write
Global write: loadout_items
Impact: low
Show code
loadout_items = {}
L112 🔴 global_write
Global write: loadout_removed_items
Impact: low
Show code
loadout_removed_items = {}

thirst_sleep_changer.script

L4 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(str, ...)
L52 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("thirst not enabled, nothing changed")
L71 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("thirst changed by %s%", perc)
L76 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("sleep not enabled, nothing changed")
L95 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("sleep changed by %s%", perc)
L100 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("thirst not enabled, nothing changed")
L119 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("thirst changed by %s%", perc * 0.1)
L124 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("sleep not enabled, nothing changed")
L143 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("sleep changed by %s%", perc * 0.1)
L148 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("thirst not enabled, nothing changed")
L167 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("thirst changed by %s%", perc * 0.01)
L172 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("sleep not enabled, nothing changed")
L191 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("sleep changed by %s%", perc * 0.01)

trader_autoinject.script

L34 🟢 repeated_npc_id()
npc:id() called 3x in trade_manager.update
Impact: low
Show code
Cache npc:id() result
L184 🟢 repeated_item_section()
item:section() called 4x in itr_inv
Impact: low
Show code
Cache item:section() result
L16 🔴 global_write
Global write: find
Impact: low
Show code
find = string.find
L32 🔴 global_write
Global write: TraderUpdate
Impact: low
Show code
TraderUpdate = trade_manager.update

235- Weapon Cover Tilt - Demonized

7 files (🟢6 🟡9 🔴8 🔵11)

demonized_time_events.script

L23 🟢 uncached_globals_summary
Cache 1 globals in print_table
Impact: medium
Show code
L32: type L34: type
L35 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = function",k)
L38 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s",k,utils_data.vector_to_string(v))
L40 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = userdata", k)
L45 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = true",k)
L47 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = true")
L51 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = false", k)
L53 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = false")
L58 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s", k,v)
L60 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = nil", k,v)
L121 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("refreshing time events")
L202 🟡 unused_local_variable
Local variable 'tg_past' is assigned but never used
Impact: low
Show code
local tg_past = 0

weapon_cover_tilt.script

L452 🟢 uncached_globals_summary
Cache 1 globals in add_to_weapon_table
Impact: medium
Show code
L459: tonumber L460: tonumber
L857 🟢 repeated_wpn_section()
wpn:section() called 7x in actor_on_update
Impact: low
Show code
Cache wpn:section() result
L1009 🟢 repeated_device
device called 13x in actor_on_update
Impact: low
Show code
local dev = device()
L436 🔴 global_write
Global write: not_pistol_sec
Impact: low
Show code
not_pistol_sec = {
L443 🔴 global_write
Global write: wpn_kind_adjustment_table
Impact: low
Show code
wpn_kind_adjustment_table = {
L1262 🔴 global_write
Global write: actor_is_safemode
Impact: low
Show code
actor_is_safemode = xr_conditions.actor_is_safemode
L844 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
if actor:active_slot() == 8 or actor:active_slot() == 14 then
L844 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
if actor:active_slot() == 8 or actor:active_slot() == 14 then
L848 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local wpn = actor:active_item()
L907 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
if actor:active_detector() then
L1229 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check (auto-fixable)
Impact: low
Show code
sec = wpn and wpn:section()
L426 🟢 dead_code_if_false
Dead code: if false (lines 426-430)
Impact: low
Show code
if false
L404 🟡 unused_local_variable
Local variable 'shoot_factor' is assigned but never used
Impact: low
Show code
local shoot_factor = result.material_shoot_factor
L509 🟡 unused_local_variable
Local variable 'grace_threshold' is assigned but never used
Impact: low
Show code
local grace_threshold = 75
L673 🟡 unused_local_variable
Local variable 'old' is assigned but never used
Impact: low
Show code
local old = smoothed_values.t

weapon_cover_tilt_gun_trigger_radii.script

L5 🔴 global_write
Global write: weapon_trigger_radii
Impact: low
Show code
weapon_trigger_radii = {

weapon_cover_tilt_gun_trigger_radii_fire_bone.script

L3 🔴 global_write
Global write: weapon_trigger_radii
Impact: low
Show code
weapon_trigger_radii = {

weapon_cover_tilt_mcm.script

L1 🔴 global_write
Global write: op
Impact: low
Show code
op = {

weapon_cover_tilt_positions.script

L11 🔴 global_write
Global write: weapon_positions
Impact: low
Show code
weapon_positions = {
L21 🔴 global_write
Global write: weapon_offsets
Impact: low
Show code
weapon_offsets = {

weapon_cover_tilt_rattle.script

L39 🟢 table_insert_append
table.insert(sounds[dir], v) -> sounds[dir][#sounds[dir]+1] = v
Impact: high
Show code
table.insert(sounds[dir], file_name)
L17 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("snd is nil")

236- 1st Person Visible Body Ported from SWM - Wang_Laoshi & SWM Team

4 files (🟢6 🟡22 🔴85 🔵2)

_u.script

L308 🟢 table_insert_append
table.insert(tRet, v) -> tRet[#tRet+1] = v
Impact: high
Show code
table.insert(tRet, sValue)
L197 🟢 uncached_globals_summary
Cache 2 globals in tocdata
Impact: medium
Show code
L199: pairs L204: pairs L202: tostring L206: tostring
L327 🟢 uncached_globals_summary
Cache 1 globals in calc_Y
Impact: medium
Show code
L334: math.abs L341: math.abs
L360 🟢 uncached_globals_summary
Cache 1 globals in extract_euler_xzy
Impact: medium
Show code
L364: math.atan2 L365: math.atan2
L200 🟡 string_concat_in_loop
String concat in loop: result = result .. x
Impact: critical
Show code
result = result.."\n["..sec.."]\n"
L206 🟡 string_concat_in_loop
String concat in loop: result = result .. x
Impact: critical
Show code
result = result..tostring(line).."\n"
L215 🟡 string_concat_in_loop
String concat in loop: result = result .. x
Impact: critical
Show code
result = result..tostring(p1)
L226 🟡 string_concat_in_loop
String concat in loop: result = result .. x
Impact: critical
Show code
result = result..tostring(p1)..", "..tostring(p2)
L170 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("SWMtrue")
L252 🟡 unused_local_variable
Local variable 'res' is assigned but never used
Impact: low
Show code
local res,id,val = ini:r_line(sec,i,"","")
L383 🟡 unused_local_variable
Local variable 'b' is assigned but never used
Impact: low
Show code
local p,b,h = extract_euler_xzy(m)

se_legs.script

L5 🔴 global_write
Global write: LegsTbl
Impact: low
Show code
LegsTbl = {}

swm_legs.script

L1424 🟢 repeated_device
device called 8x in fastcall
Impact: low
Show code
local dev = device()
L1670 🟢 repeated_alife
alife called 3x in respawn
Impact: low
Show code
local sim = alife()
L968 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("legs object %s with id %s released",sec,id)
L37 🔴 global_write
Global write: idle_sound
Impact: low
Show code
idle_sound = ""
L38 🔴 global_write
Global write: enable_idle_anims
Impact: low
Show code
enable_idle_anims = true
L39 🔴 global_write
Global write: idle_anim_min_cooldown
Impact: low
Show code
idle_anim_min_cooldown = 3000
L40 🔴 global_write
Global write: idle_anim_max_cooldown
Impact: low
Show code
idle_anim_max_cooldown = 120000
L41 🔴 global_write
Global write: idle_anim_name
Impact: low
Show code
idle_anim_name = ""
L42 🔴 global_write
Global write: tmr_a
Impact: low
Show code
tmr_a = 0
L43 🔴 global_write
Global write: idle_cooldown
Impact: low
Show code
idle_cooldown = 3000
L44 🔴 global_write
Global write: idle_play_time
Impact: low
Show code
idle_play_time = 2000
L45 🔴 global_write
Global write: idle_anim_random
Impact: low
Show code
idle_anim_random = 0
L46 🔴 global_write
Global write: idle_tm
Impact: low
Show code
idle_tm = 1499
L47 🔴 global_write
Global write: last_idle_tm
Impact: low
Show code
last_idle_tm = 2003
L48 🔴 global_write
Global write: can_play
Impact: low
Show code
can_play = false
L49 🔴 global_write
Global write: idle_pause_rnd
Impact: low
Show code
idle_pause_rnd = 0
L164 🔴 global_write
Global write: visual_armor_upg_supported
Impact: low
Show code
visual_armor_upg_supported = {
L782 🔴 global_write
Global write: materials
Impact: low
Show code
materials = {"wood", "earth", "metal", "water", "tin", "grass", "gravel", "asphalt"}
L783 🔴 global_write
Global write: dirty_materials
Impact: low
Show code
dirty_materials = {["earth"] = 5, ["water"] = 10, ["grass"] = 5, ["gravel"] = 10}
L784 🔴 global_write
Global write: current_mat
Impact: low
Show code
current_mat = "default"
L793 🔴 global_write
Global write: current_mat
Impact: low
Show code
current_mat = val
L796 🔴 global_write
Global write: current_mat
Impact: low
Show code
current_mat = "default"
L980 🔴 global_write
Global write: dir_rgt_mod
Impact: low
Show code
dir_rgt_mod = dir_rgt_mod + 0.01
L984 🔴 global_write
Global write: dir_rgt_mod
Impact: low
Show code
dir_rgt_mod = dir_rgt_mod - 0.01
L1013 🔴 global_write
Global write: model_name
Impact: low
Show code
model_name = ""
L1014 🔴 global_write
Global write: model_name_armorupg
Impact: low
Show code
model_name_armorupg = ""
L1026 🔴 global_write
Global write: model_name
Impact: low
Show code
model_name = SYS_GetParam(0, sec .. "_legs", "visual") .. '.ogf'
L1028 🔴 global_write
Global write: model_name
Impact: low
Show code
model_name = "sm\\actor_legs\\no_outfit.ogf" -- default if no section
L1033 🔴 global_write
Global write: model_name_armorupg
Impact: low
Show code
model_name_armorupg = SYS_GetParam(0, sec .. "_legs_hd_armorupg", "visual") .. '.ogf'
L1036 🔴 global_write
Global write: model_name
Impact: low
Show code
model_name = SYS_GetParam(0, sec .. "_legs_hd", "visual") .. '.ogf'
L1040 🔴 global_write
Global write: model_name
Impact: low
Show code
model_name = SYS_GetParam(0, sec .. "_legs_hd", "visual") .. '.ogf'
L1042 🔴 global_write
Global write: model_name
Impact: low
Show code
model_name = "sm\\actor_legs\\no_outfit_hd.ogf" -- default hd if no section
L1144 🔴 global_write
Global write: toggle_turn_step_sound_exo
Impact: low
Show code
toggle_turn_step_sound_exo = swm_legs_mcm.get_config("toggle_turn_step_sound_exo") turn_step_sound_volume = swm_legs_mcm.get_config("turn_step_sound_volume")
L1146 🔴 global_write
Global write: enable_idle_anims
Impact: low
Show code
enable_idle_anims = swm_legs_mcm.get_config("enable_idle_anims")
L1147 🔴 global_write
Global write: idle_anim_min_cooldown
Impact: low
Show code
idle_anim_min_cooldown = swm_legs_mcm.get_config("idle_anim_min_cooldown") * 1000
L1148 🔴 global_write
Global write: idle_anim_max_cooldown
Impact: low
Show code
idle_anim_max_cooldown = swm_legs_mcm.get_config("idle_anim_max_cooldown") * 1000
L1149 🔴 global_write
Global write: use_combat_state
Impact: low
Show code
use_combat_state = swm_legs_mcm.get_config("use_combat_state") or true
L1150 🔴 global_write
Global write: use_special_noncombat_shift
Impact: low
Show code
use_special_noncombat_shift = swm_legs_mcm.get_config("use_special_noncombat_shift")
L1151 🔴 global_write
Global write: use_slow_down_state
Impact: low
Show code
use_slow_down_state = swm_legs_mcm.get_config("use_slow_down_state")
L1154 🔴 global_write
Global write: visual_upg_enabled
Impact: low
Show code
visual_upg_enabled = swm_legs_mcm.get_config("visual_upg_enabled")
L1155 🔴 global_write
Global write: enable_debug_warnings
Impact: low
Show code
enable_debug_warnings = swm_legs_mcm.get_config("enable_debug_warnings")
L1161 🔴 global_write
Global write: idle_pause_rnd
Impact: low
Show code
idle_pause_rnd = math.random(idle_anim_min_cooldown, idle_anim_max_cooldown)
L1227 🔴 global_write
Global write: blood_cnt
Impact: low
Show code
blood_cnt = blood_cnt + 1
L1247 🔴 global_write
Global write: anim_name
Impact: low
Show code
anim_name = AnimTable_NonCombat[body_flag] or "leg_stand_idle"
L1249 🔴 global_write
Global write: anim_name
Impact: low
Show code
anim_name = AnimTable_SlowedDown[body_flag] or "lancew_legs_idle"
L1251 🔴 global_write
Global write: anim_name
Impact: low
Show code
anim_name = AnimTable_Basic[body_flag] or "lancew_legs_idle"
L1257 🔴 global_write
Global write: can_play
Impact: low
Show code
can_play = false
L1259 🔴 global_write
Global write: idles_time
Impact: low
Show code
idles_time = {
L1266 🔴 global_write
Global write: idle_sound
Impact: low
Show code
idle_sound = sound_object("gear_rustle\\tac_gear_" .. math.random(1,8))
L1272 🔴 global_write
Global write: anim_name
Impact: low
Show code
anim_name = "legs_stand_" .. idle_anim_random
L1273 🔴 global_write
Global write: idle_tm
Impact: low
Show code
idle_tm = idles_time[anim_name] or 2000
L1285 🔴 global_write
Global write: can_play
Impact: low
Show code
can_play = true
L1286 🔴 global_write
Global write: idle_anim_random
Impact: low
Show code
idle_anim_random = math.random(1,3)
L1289 🔴 global_write
Global write: tmr_a
Impact: low
Show code
tmr_a = tg + idle_tm
L1299 🔴 global_write
Global write: can_play
Impact: low
Show code
can_play = false
L1300 🔴 global_write
Global write: tmr_a
Impact: low
Show code
tmr_a = tg + idle_pause_rnd
L1305 🔴 global_write
Global write: can_play
Impact: low
Show code
can_play = false
L1374 🔴 global_write
Global write: dirt_cnt
Impact: low
Show code
dirt_cnt = dirt_cnt + 1
L1377 🔴 global_write
Global write: dirt_cnt
Impact: low
Show code
dirt_cnt = 0
L1414 🔴 global_write
Global write: legs_visual
Impact: low
Show code
legs_visual = SYS_GetParam(0, LEGS_SECTION, "visual")
L1424 🔴 global_write
Global write: pos
Impact: low
Show code
pos = device().cam_pos
L1426 🔴 global_write
Global write: angle_down
Impact: low
Show code
angle_down = cdir.y
L1427 🔴 global_write
Global write: distance_H2B
Impact: low
Show code
distance_H2B = device().cam_pos:distance_to(db.actor:position())
L1431 🔴 global_write
Global write: body_flag
Impact: low
Show code
body_flag = level.actor_moving_state()
L1436 🔴 global_write
Global write: body_flag
Impact: low
Show code
body_flag = body_flag - numb
L1441 🔴 global_write
Global write: anim_name
Impact: low
Show code
anim_name = get_anim_type(body_flag) or "lancew_legs_idle"
L1442 🔴 global_write
Global write: idle_allowed
Impact: low
Show code
idle_allowed = enable_idle_anims and (body_flag == 0 or body_flag == 32) and is_calm_state() and angle_down <= -0.65
L1477 🔴 global_write
Global write: dir_fwd
Impact: low
Show code
dir_fwd = vector():setHP(device().cam_top:getH(), 0)
L1479 🔴 global_write
Global write: dir_fwd
Impact: low
Show code
dir_fwd = db.actor:direction()
L1482 🔴 global_write
Global write: dir_fwd
Impact: low
Show code
dir_fwd = vector():setHP(device().cam_dir:getH(), 0)
L1487 🔴 global_write
Global write: dir_rgt
Impact: low
Show code
dir_rgt = vector():setHP(device().cam_right:getH(), 0)
L1489 🔴 global_write
Global write: dir_fwd_mod
Impact: low
Show code
dir_fwd_mod = DISTANCE_MOD_FWD_NONCOMBAT
L1491 🔴 global_write
Global write: dir_fwd_mod
Impact: low
Show code
dir_fwd_mod = DISTANCE_MOD_FWD
L1493 🔴 global_write
Global write: dir_rgt_mod
Impact: low
Show code
dir_rgt_mod = DISTANCE_MOD_RGT
L1502 🔴 global_write
Global write: dir_fwd_mod
Impact: low
Show code
dir_fwd_mod = shift_tbl.fwd
L1505 🔴 global_write
Global write: dir_rgt_mod
Impact: low
Show code
dir_rgt_mod = shift_tbl.rgt
L1511 🔴 global_write
Global write: dir_fwd_mod
Impact: low
Show code
dir_fwd_mod = shift_visual_tbl.fwd
L1514 🔴 global_write
Global write: dir_rgt_mod
Impact: low
Show code
dir_rgt_mod = shift_visual_tbl.rgt
L1520 🔴 global_write
Global write: dir_fwd_mod
Impact: low
Show code
dir_fwd_mod = shift_prone_tbl.fwd
L1523 🔴 global_write
Global write: dir_rgt_mod
Impact: low
Show code
dir_rgt_mod = shift_prone_tbl.rgt
L1529 🔴 global_write
Global write: dir_rgt_mod
Impact: low
Show code
dir_rgt_mod = dir_rgt_mod - 0.2
L1531 🔴 global_write
Global write: dir_rgt_mod
Impact: low
Show code
dir_rgt_mod = dir_rgt_mod + 0.15
L1536 🔴 global_write
Global write: pos
Impact: low
Show code
pos = pos:add(dir_fwd:mul(dir_fwd_mod))
L1537 🔴 global_write
Global write: pos
Impact: low
Show code
pos = pos:add(dir_rgt:mul(dir_rgt_mod))
L1572 🔴 global_write
Global write: anim_name
Impact: low
Show code
anim_name = self.turnAnim
L1618 🔴 global_write
Global write: anim_name
Impact: low
Show code
anim_name = self.turnAnim
L835 🟡 potential_nil_access
Potential nil access: 'item' from :item_in_slot() used without nil check
Impact: low
Show code
exo_flag = item and SYS_GetParam(0, item:section(), "repair_type") == "outfit_exo"
L1343 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
if outfit and outfit:has_upgrade("up_firsta_novice_1") then
L1386 🟡 potential_nil_access
Potential nil access: 'body_obj' from level.object_by_id() used without nil check
Impact: low
Show code
if body_obj and getFS():exist("$game_meshes$",visual) then body_obj:set_visual_name(visual) end
L14 🟡 unused_local_variable
Local variable 'last_pos_x' is assigned but never used
Impact: low
Show code
local last_pos_x
L15 🟡 unused_local_variable
Local variable 'last_pos_z' is assigned but never used
Impact: low
Show code
local last_pos_z
L17 🟡 unused_local_variable
Local variable 'pos_set' is assigned but never used
Impact: low
Show code
local pos_set
L18 🟡 unused_local_variable
Local variable 'lean_reset' is assigned but never used
Impact: low
Show code
local lean_reset = false
L23 🟡 unused_local_variable
Local variable 'demo_active' is assigned but never used
Impact: low
Show code
local demo_active
L34 🟡 unused_local_variable
Local variable 'idle_was_played' is assigned but never used
Impact: low
Show code
local idle_was_played = false
L65 🟡 unused_local_variable
Local variable 'DEFAULT_LEGS' is assigned but never used
Impact: low
Show code
local DEFAULT_LEGS = _u.ltx(LEGS_SECTION, "visual", "str") --> Äåôîëòíàÿ ìîäåëü íîã
L189 🟡 unused_local_variable
Local variable 'runback_speed' is assigned but never used
Impact: low
Show code
local runback_speed = db.actor:get_actor_runback_coef()
L468 🟡 unused_local_variable
Local variable 'AnimTable_BasicTEST' is assigned but never used
Impact: low
Show code
local AnimTable_BasicTEST = { --\\ Òàáëèöà ñîîòâåòñòâèÿ êîäîâ òåëà àíèìàöèÿì. [0] = "leg_stand_idle", --> Ñòîèì
L920 🟡 unused_local_variable
Local variable 'ActorSobj' is assigned but never used
Impact: low
Show code
local ActorSobj = alife():object(db.actor:id())
L1174 🟡 unused_local_variable
Local variable 'ray_pos' is assigned but never used
Impact: low
Show code
local ray_pos = {}
L1256 🟡 unused_local_variable
Local variable 'idl_tmr' is assigned but never used
Impact: low
Show code
local idl_tmr
L1495 🟡 unused_local_variable
Local variable 'movestate' is assigned but never used
Impact: low
Show code
local movestate = level.actor_moving_state()

swm_legs_mcm.script

L3 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "swm_legs",sh=true ,gr={

237- Bizon Replacer - Blackgrowl

2 files (🟢0 🟡0 🔴3 🔵0)

grok_gotta_go_fast.script

L10 🔴 global_write
Global write: run_coeff
Impact: low
Show code
run_coeff = grok_gotta_go_fast_mcm.get_config("gotta_go_fast_run")
L11 🔴 global_write
Global write: sprint_coeff
Impact: low
Show code
sprint_coeff = grok_gotta_go_fast_mcm.get_config("gotta_go_fast_sprint")

grok_gotta_go_fast_mcm.script

L12 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "gggf",sh=true ,gr={

240- Anomaly's Name Update for Stalkers ANUS - Grulag

1 file (🟢11 🟡5 🔴0 🔵1)

ui_mm_faction_select.script

L201 🟢 table_insert_append
table.insert(start_pos, v) -> start_pos[#start_pos+1] = v
Impact: high
Show code
table.insert(start_pos,ini_map:r_float_ex(start_location, "lvid"))
L202 🟢 table_insert_append
table.insert(start_pos, v) -> start_pos[#start_pos+1] = v
Impact: high
Show code
table.insert(start_pos,ini_map:r_float_ex(start_location, "gvid"))
L203 🟢 table_insert_append
table.insert(start_pos, v) -> start_pos[#start_pos+1] = v
Impact: high
Show code
table.insert(start_pos,vector():set(ini_map:r_float_ex(start_location,"x"),ini_map:r_float_ex(start_location,"y"),ini_map:r_float_ex(start_location,"z")))
L1130 🟢 table_insert_append
table.insert(self.table_icon, v) -> self.table_icon[#self.table_icon+1] = v
Impact: high
Show code
table.insert(self.table_icon, def_icon)
L1137 🟢 table_insert_append
table.insert(self.table_icon, v) -> self.table_icon[#self.table_icon+1] = v
Impact: high
Show code
table.insert(self.table_icon, id)
L1151 🟢 table_insert_append
table.insert(self.table_map, v) -> self.table_map[#self.table_map+1] = v
Impact: high
Show code
table.insert(self.table_map, "random_location")
L1161 🟢 table_insert_append
table.insert(self.table_map, v) -> self.table_map[#self.table_map+1] = v
Impact: high
Show code
table.insert(self.table_map, id)
L1164 🟢 table_insert_append
table.insert(self.table_map, v) -> self.table_map[#self.table_map+1] = v
Impact: high
Show code
table.insert(self.table_map, id)
L43 🟢 uncached_globals_summary
Cache 2 globals in on_game_load
Impact: medium
Show code
L57: tostring L57: tostring L57: math.random L57: math.random
L406 🟢 uncached_globals_summary
Cache 2 globals in __init
Impact: medium
Show code
L446: tonumber L457: tonumber L447: tostring L458: tostring
L1180 🟢 uncached_globals_summary
Cache 2 globals in LoadLoadout
Impact: medium
Show code
L1186: tostring L1187: tostring L1198: tonumber L1198: tonumber
L1528 🟡 string_concat_in_loop
String concat in loop: str_stats = str_stats .. x
Impact: critical
Show code
str_stats = str_stats .. "%c[0,150,150,150]• %c[0,50,175,50]" .. game.translate_string("st_faction_" .. k) .. "\\n"
L1702 🟡 string_concat_in_loop
String concat in loop: loadout_str = loadout_str .. x
Impact: critical
Show code
loadout_str = loadout_str .. "," .. ci.section
L1252 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("sec: %s | points: %s | points left: %s", ci.section, points, self.points_left)
L307 🟡 unused_local_variable
Local variable 'sim' is assigned but never used
Impact: low
Show code
local sim = alife()
L1195 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, sec, value = ini_itm:r_line(self.selected_faction .. "_loadout" , i , "", "")
L1632 🟡 unused_local_variable
Local variable 'bind' is assigned but never used
Impact: low
Show code
local bind = dik_to_bind(dik)

244- Weird Tasks Framework - Igigog

2 files (🟢0 🟡0 🔴3 🔵0)

grok_gotta_go_fast.script

L10 🔴 global_write
Global write: run_coeff
Impact: low
Show code
run_coeff = grok_gotta_go_fast_mcm.get_config("gotta_go_fast_run")
L11 🔴 global_write
Global write: sprint_coeff
Impact: low
Show code
sprint_coeff = grok_gotta_go_fast_mcm.get_config("gotta_go_fast_sprint")

grok_gotta_go_fast_mcm.script

L12 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "gggf",sh=true ,gr={

245- Hideout Furniture - Aoldri

22 files (🟢50 🟡14 🔴56 🔵16)

aol_bbox.script

L4 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("aol_bbox_collision: " .. ...)

aol_bshape.script

L1 🔴 global_write
Global write: last_gizmo_id
Impact: low
Show code
last_gizmo_id = 696969
L2 🔴 global_write
Global write: color_colliding
Impact: low
Show code
color_colliding = fcolor():set(1,0,0,1)
L3 🔴 global_write
Global write: color_not_colliding
Impact: low
Show code
color_not_colliding = fcolor():set(0,1,0,1)
L4 🔴 global_write
Global write: color_not_colliding_front
Impact: low
Show code
color_not_colliding_front = fcolor():set(0.25,1,0.75,1)
L5 🔴 global_write
Global write: color_contact
Impact: low
Show code
color_contact = fcolor():set(1,1,0,1)
L6 🔴 global_write
Global write: color_side
Impact: low
Show code
color_side = fcolor():set(0.5,0.5,0.5,1)

aol_rotation.script

L80 🟢 uncached_globals_summary
Cache 1 globals in to_euler_angles
Impact: medium
Show code
L127: math.atan2 L128: math.atan2
L167 🟢 uncached_globals_summary
Cache 1 globals in orthogonal
Impact: medium
Show code
L168: math.abs L169: math.abs
L215 🟢 uncached_globals_summary
Cache 1 globals in get_rotation_around
Impact: medium
Show code
L218: math.sin L219: math.sin
L114 🟡 unused_local_variable
Local variable 'm13' is assigned but never used
Impact: low
Show code
local m13 = te[8];
L117 🟡 unused_local_variable
Local variable 'm23' is assigned but never used
Impact: low
Show code
local m23 = te[9];

arm.script

L224 🟢 table_insert_append
table.insert(self.option_data, v) -> self.option_data[#self.option_data+1] = v
Impact: high
Show code
table.insert(self.option_data, option_data)
L350 🟢 table_insert_append
table.insert(self.callbacks[callback_id], v) -> self.callbacks[callback_id][#self.callbacks[callback_id]+1] = v
Impact: high
Show code
table.insert(self.callbacks[callback_id], callback_function)
L20 🔴 global_write
Global write: p_width
Impact: low
Show code
p_width = parent_width or 1024
L21 🔴 global_write
Global write: p_center
Impact: low
Show code
p_center = p_width/2
L22 🔴 global_write
Global write: width
Impact: low
Show code
width = ele:GetWidth()
L23 🔴 global_write
Global write: pos
Impact: low
Show code
pos = ele:GetWndPos()
L24 🔴 global_write
Global write: anchorpos
Impact: low
Show code
anchorpos = {}
L28 🔴 global_write
Global write: ratio
Impact: low
Show code
ratio = (device().height / device().width) / (768 / 1024)
L29 🔴 global_write
Global write: xadjust
Impact: low
Show code
xadjust = anchorpos.left
L32 🔴 global_write
Global write: xadjust
Impact: low
Show code
xadjust = p_width - (p_width - (anchor and anchorpos[anchor] or anchorpos.left))*ratio
L34 🔴 global_write
Global write: xadjust
Impact: low
Show code
xadjust = p_center - (p_center - (anchor and anchorpos[anchor] or anchorpos.left))*ratio
L36 🔴 global_write
Global write: xadjust
Impact: low
Show code
xadjust = ratio * (anchor and anchorpos[anchor] or anchorpos.left)
L48 🔴 global_write
Global write: States
Impact: low
Show code
States = {
L56 🔴 global_write
Global write: State2Suffix
Impact: low
Show code
State2Suffix = {
L74 🔴 global_write
Global write: State2Colour
Impact: low
Show code
State2Colour = {

bind_hf_base.script

L43 🟢 table_insert_append
table.insert(func_split, v) -> func_split[#func_split+1] = v
Impact: high
Show code
table.insert(func_split, s)
L1 🔴 global_write
Global write: gc
Impact: low
Show code
gc = game.translate_string

bind_light_furniture.script

L95 🟢 uncached_globals_summary
Cache 1 globals in update
Impact: medium
Show code
L126: math.random L162: math.random
L62 🟢 repeated_obj_id()
obj:id() called 4x in __init
Impact: low
Show code
Cache obj:id() result
L19 🔴 global_write
Global write: gc
Impact: low
Show code
gc = game.translate_string

hf_furniture_types.script

L5 🟢 uncached_globals_summary
Cache 1 globals in get_type
Impact: medium
Show code
L7: type L13: type

hf_map_objects.script

L185 🟢 table_insert_append
table.insert(obj_tbl, v) -> obj_tbl[#obj_tbl+1] = v
Impact: high
Show code
table.insert(obj_tbl, entry)
L147 🟢 uncached_globals_summary
Cache 1 globals in generate_spawn_list
Impact: medium
Show code
L161: tonumber L161: tonumber
L191 🟢 uncached_globals_summary
Cache 1 globals in actor_on_first_update
Impact: medium
Show code
L193: pairs L213: pairs
L140 🔴 global_write
Global write: spawned_objects
Impact: low
Show code
spawned_objects = {}
L143 🔴 global_write
Global write: id_to_spawn_id
Impact: low
Show code
id_to_spawn_id = {}
L228 🔴 global_write
Global write: spawned_objects
Impact: low
Show code
spawned_objects = m_data.spawned_objects or spawned_objects
L156 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_map_objects.ini:r_line_ex(section,i)

hf_mcm.script

L1 🟡 unused_local_variable
Local variable 'mcm_keybinds' is assigned but never used
Impact: low
Show code
local mcm_keybinds = ui_mcm and ui_mcm.key_hold

hf_obj_manager.script

L29 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("print_data(id):"..id)
L32 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("no data")
L36 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("index:"..index..", datum:"..datum)

hf_version.script

L71 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(i)

placeable_furniture.script

L419 🟢 uncached_globals_summary
Cache 1 globals in start_placing_item
Impact: medium
Show code
L434: tonumber L434: tonumber
L194 🟢 repeated_device
device called 2x in actor_on_update
Impact: low
Show code
local dev = device()
L362 🟢 repeated_alife
alife called 2x in on_key_press
Impact: low
Show code
local sim = alife()
L7 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("placeable_furniture: " .. ...)
L1 🔴 global_write
Global write: gc
Impact: low
Show code
gc = game.translate_string
L28 🔴 global_write
Global write: states
Impact: low
Show code
states = {
L36 🔴 global_write
Global write: align_states
Impact: low
Show code
align_states = {
L40 🔴 global_write
Global write: align_state
Impact: low
Show code
align_state = align_states.ACTOR
L69 🔴 global_write
Global write: transition_functors
Impact: low
Show code
transition_functors = {
L381 🔴 global_write
Global write: align_state
Impact: low
Show code
align_state = align_states.SURFACE
L384 🔴 global_write
Global write: align_state
Impact: low
Show code
align_state = align_states.ACTOR
L455 🔴 global_write
Global write: physic_section
Impact: low
Show code
physic_section = ini_sys:r_string_ex(obj:section(), "placeable_section")
L733 🔴 global_write
Global write: RadialGUI
Impact: low
Show code
RadialGUI = nil
L861 🔴 global_write
Global write: RadialGUI
Impact: low
Show code
RadialGUI = create_interact_gui()

placeable_items_trade.script

L52 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update

placeable_radio.script

L163 🟢 uncached_globals_summary
Cache 1 globals in update
Impact: medium
Show code
L193: math.random L194: math.random
L61 🔴 global_write
Global write: wthr
Impact: low
Show code
wthr = gini:r_string_ex(levels[i],"weathers")
L21 🟡 unused_local_variable
Local variable 'ini_radio' is assigned but never used
Impact: low
Show code
local ini_radio = ini_file("plugins\\radio_zone_fm.ltx") -- File control: reading the ltx file that controls the hotkeys
L533 🟡 unused_local_variable
Local variable 'bind' is assigned but never used
Impact: low
Show code
local bind = dik_to_bind(dik)

stash_capacities.script

L4 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("stash_capacities: " .. ...)
L31 🔴 global_write
Global write: inventory_update
Impact: low
Show code
inventory_update = ui_inventory.UIInventory.UpdateWeight
L46 🔴 global_write
Global write: inventory_reset
Impact: low
Show code
inventory_reset = ui_inventory.UIInventory.Reset
L65 🔴 global_write
Global write: item
Impact: low
Show code
item = self:CheckItem(id)
L67 🔴 global_write
Global write: item_weight
Impact: low
Show code
item_weight = item:weight()

trader_autoinject.script

L43 🟢 repeated_npc_id()
npc:id() called 3x in trade_manager.update
Impact: low
Show code
Cache npc:id() result
L187 🟢 repeated_item_section()
item:section() called 4x in itr_inv
Impact: low
Show code
Cache item:section() result
L16 🔴 global_write
Global write: find
Impact: low
Show code
find = string.find
L41 🔴 global_write
Global write: TraderUpdate
Impact: low
Show code
TraderUpdate = trade_manager.update

ui_furniture_light.script

L170 🟢 table_insert_append
table.insert(required_tools, v) -> required_tools[#required_tools+1] = v
Impact: high
Show code
table.insert(required_tools, "matches")
L171 🟢 table_insert_append
table.insert(required_tools, v) -> required_tools[#required_tools+1] = v
Impact: high
Show code
table.insert(required_tools, "box_matches")
L101 🟢 uncached_globals_summary
Cache 1 globals in Update
Impact: medium
Show code
L109: math.floor L110: math.floor
L116 🟡 unused_local_variable
Local variable 'clr_grey' is assigned but never used
Impact: low
Show code
local clr_grey = utils_xml.get_color("ui_gray_1")
L133 🟡 unused_local_variable
Local variable 'bind' is assigned but never used
Impact: low
Show code
local bind = dik_to_bind(dik)

ui_furniture_piano.script

L19 🟢 table_insert_append
table.insert(sound_object_by_path, v) -> sound_object_by_path[#sound_object_by_path+1] = v
Impact: high
Show code
table.insert(sound_object_by_path, snd_obj)
L358 🟢 table_insert_append
table.insert(matching_sheets, v) -> matching_sheets[#matching_sheets+1] = v
Impact: high
Show code
table.insert(matching_sheets, selected_sheet)
L376 🟢 table_insert_append
table.insert(tags_info, v) -> tags_info[#tags_info+1] = v
Impact: high
Show code
table.insert(tags_info, {
L386 🟢 table_insert_append
table.insert(tags, v) -> tags[#tags+1] = v
Impact: high
Show code
table.insert(tags, v["tag"])
L411 🟢 table_insert_append
table.insert(tags, v) -> tags[#tags+1] = v
Impact: high
Show code
table.insert(tags, tag)
L414 🟢 table_insert_append
table.insert(tag2sheets[tag], v) -> tag2sheets[tag][#tag2sheets[tag]+1] = v
Impact: high
Show code
table.insert(tag2sheets[tag], i)
L457 🟢 table_insert_append
table.insert(simult_notes, v) -> simult_notes[#simult_notes+1] = v
Impact: high
Show code
table.insert(simult_notes, autokey2note[data])
L461 🟢 table_insert_append
table.insert(music_chart, v) -> music_chart[#music_chart+1] = v
Impact: high
Show code
table.insert(music_chart, {
L467 🟢 table_insert_append
table.insert(music_chart, v) -> music_chart[#music_chart+1] = v
Impact: high
Show code
table.insert(music_chart, {
L477 🟢 table_insert_append
table.insert(music_chart, v) -> music_chart[#music_chart+1] = v
Impact: high
Show code
table.insert(music_chart, {
L484 🟢 table_insert_append
table.insert(music_chart, v) -> music_chart[#music_chart+1] = v
Impact: high
Show code
table.insert(music_chart, {
L490 🟢 table_insert_append
table.insert(music_chart, v) -> music_chart[#music_chart+1] = v
Impact: high
Show code
table.insert(music_chart, {
L497 🟢 table_insert_append
table.insert(music_chart, v) -> music_chart[#music_chart+1] = v
Impact: high
Show code
table.insert(music_chart, {
L505 🟢 table_insert_append
table.insert(music_chart, v) -> music_chart[#music_chart+1] = v
Impact: high
Show code
table.insert(music_chart, {
L509 🟢 table_insert_append
table.insert(music_chart, v) -> music_chart[#music_chart+1] = v
Impact: high
Show code
table.insert(music_chart, {
L515 🟢 table_insert_append
table.insert(music_chart, v) -> music_chart[#music_chart+1] = v
Impact: high
Show code
table.insert(music_chart, {
L522 🟢 table_insert_append
table.insert(music_chart, v) -> music_chart[#music_chart+1] = v
Impact: high
Show code
table.insert(music_chart, {
L529 🟢 table_insert_append
table.insert(music_chart, v) -> music_chart[#music_chart+1] = v
Impact: high
Show code
table.insert(music_chart, {
L551 🟢 table_insert_append
table.insert(sheets, v) -> sheets[#sheets+1] = v
Impact: high
Show code
table.insert(sheets, {
L798 🟢 table_insert_append
table.insert(self.tag_checkboxes, v) -> self.tag_checkboxes[#self.tag_checkboxes+1] = v
Impact: high
Show code
table.insert(self.tag_checkboxes, {
L823 🟢 table_insert_append
table.insert(self.white_keys, v) -> self.white_keys[#self.white_keys+1] = v
Impact: high
Show code
table.insert(self.white_keys, xml:InitStatic("white_key", self))
L843 🟢 table_insert_append
table.insert(self.black_keys, v) -> self.black_keys[#self.black_keys+1] = v
Impact: high
Show code
table.insert(self.black_keys, xml:InitStatic("black_key", self))
L937 🟢 table_insert_append
table.insert(tags, v) -> tags[#tags+1] = v
Impact: high
Show code
table.insert(tags, self.tag_checkboxes[i].tag_name)
L441 🟡 string_concat_in_loop
String concat in loop: file_data = file_data .. x
Impact: critical
Show code
file_data = file_data .. data
L1 🔴 global_write
Global write: gc
Impact: low
Show code
gc = game.translate_string
L1066 🟡 unused_local_variable
Local variable 'bind' is assigned but never used
Impact: low
Show code
local bind = dik_to_bind(dik)

ui_furniture_workshop.script

L69 🟢 table_insert_append
table.insert(items, v) -> items[#items+1] = v
Impact: high
Show code
table.insert(items, obj:id())
L80 🔴 global_write
Global write: workshop_ui_ref
Impact: low
Show code
workshop_ui_ref = ui_workshop.get_workshop_ui(nil, nil, {false,false,false,false,false}, false)
L171 🟡 unused_local_variable
Local variable 'bind' is assigned but never used
Impact: low
Show code
local bind = dik_to_bind(dik)

weapon_showcase.script

L54 🟢 repeated_se_obj_id()
se_obj:id() called 3x in game_object_on_net_spawn
Impact: low
Show code
Cache se_obj:id() result
L1 🔴 global_write
Global write: weapon_displays
Impact: low
Show code
weapon_displays = {}
L2 🔴 global_write
Global write: weapon_display_slots
Impact: low
Show code
weapon_display_slots = {}
L27 🔴 global_write
Global write: valid_actor_bags
Impact: low
Show code
valid_actor_bags = {
L32 🔴 global_write
Global write: valid_stash
Impact: low
Show code
valid_stash = {}
L34 🔴 global_write
Global write: valid_display_kind
Impact: low
Show code
valid_display_kind = {}
L269 🔴 global_write
Global write: weapon_displays
Impact: low
Show code
weapon_displays = m_data.weapon_displays or {}
L270 🔴 global_write
Global write: weapon_display_slots
Impact: low
Show code
weapon_display_slots = m_data.weapon_display_slots or {}
L210 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
local phys = obj and obj:get_physics_shell()

workshop_autoinject.script

L118 🟢 uncached_globals_summary
Cache 1 globals in ListRecipes
Impact: medium
Show code
L123: pairs L131: pairs
L151 🟢 uncached_globals_summary
Cache 1 globals in LoadRecipes
Impact: medium
Show code
L198: pairs L202: pairs
L305 🟢 uncached_globals_summary
Cache 2 globals in add_recipe
Impact: medium
Show code
L312: tonumber L316: tonumber L315: tostring L317: tostring
L349 🟢 uncached_globals_summary
Cache 2 globals in add_recipe_ui
Impact: medium
Show code
L354: tonumber L357: tonumber L356: tostring L358: tostring
L191 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopCraft:LoadRecipes() | section [%s] not found!",id)
L260 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! workshop_craft_ui:LoadRecipes() | section [%s] not found!",id)
L319 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! Workshop UI craft | componenet section [%s] not found for [%s] recipe!", tostring(t[3]), id)
L327 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopCraft:LoadRecipes() | componenet section [%s] not found for [%s] recipe!", tostring(t[5]), id)
L335 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopCraft:LoadRecipes() | componenet section [%s] not found for [%s] recipe!", tostring(t[7]), id)
L343 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopCraft:LoadRecipes() | componenet section [%s] not found for [%s] recipe!", tostring(t[9]), id)
L360 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! Workshop UI craft | componenet section [%s] not found for [%s] recipe!", tostring(t[3]), id)
L368 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopCraft:LoadRecipes() | componenet section [%s] not found for [%s] recipe!", tostring(t[5]), id)
L376 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopCraft:LoadRecipes() | componenet section [%s] not found for [%s] recipe!", tostring(t[7]), id)
L384 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopCraft:LoadRecipes() | componenet section [%s] not found for [%s] recipe!", tostring(t[9]), id)
L241 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_craft:r_line(ind_str , i , "", "")

zzz_workshop_return_items.script

L1 🔴 global_write
Global write: item_ids
Impact: low
Show code
item_ids = {}
L2 🔴 global_write
Global write: stash_id
Impact: low
Show code
stash_id = nil
L15 🔴 global_write
Global write: item_ids
Impact: low
Show code
item_ids = {}
L16 🔴 global_write
Global write: stash_id
Impact: low
Show code
stash_id = nil
L19 🔴 global_write
Global write: ui_workshop_UIWorkshop_Close
Impact: low
Show code
ui_workshop_UIWorkshop_Close = ui_workshop.UIWorkshop.Close

245- Hideout Furniture 1.2.0 - Aoldri

14 files (🟢35 🟡9 🔴22 🔵13)

aol_bbox.script

L4 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("aol_bbox_collision: " .. ...)

bind_light_furniture.script

L92 🟢 uncached_globals_summary
Cache 1 globals in update
Impact: medium
Show code
L127: math.random L163: math.random
L4 🔴 global_write
Global write: gc
Impact: low
Show code
gc = game.translate_string

bind_piano_furniture.script

L4 🔴 global_write
Global write: gc
Impact: low
Show code
gc = game.translate_string

bind_workshop_furniture.script

L5 🔴 global_write
Global write: curBoxID
Impact: low
Show code
curBoxID = nil
L6 🔴 global_write
Global write: gc
Impact: low
Show code
gc = game.translate_string
L12 🔴 global_write
Global write: curBoxID
Impact: low
Show code
curBoxID = pid

placeable_furniture.script

L306 🟢 uncached_globals_summary
Cache 1 globals in func_place_item
Impact: medium
Show code
L332: tonumber L332: tonumber
L154 🟢 repeated_device
device called 3x in actor_on_update
Impact: low
Show code
local dev = device()
L5 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("placeable_furniture: " .. ...)
L1 🔴 global_write
Global write: gc
Impact: low
Show code
gc = game.translate_string
L40 🔴 global_write
Global write: conditions
Impact: low
Show code
conditions = {}

placeable_items_trade.script

L241 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update

placeable_radio.script

L163 🟢 uncached_globals_summary
Cache 1 globals in update
Impact: medium
Show code
L194: math.random L195: math.random
L61 🔴 global_write
Global write: wthr
Impact: low
Show code
wthr = gini:r_string_ex(levels[i],"weathers")
L21 🟡 unused_local_variable
Local variable 'ini_radio' is assigned but never used
Impact: low
Show code
local ini_radio = ini_file("plugins\\radio_zone_fm.ltx") -- File control: reading the ltx file that controls the hotkeys
L564 🟡 unused_local_variable
Local variable 'needle_pos' is assigned but never used
Impact: low
Show code
local needle_pos = self.frequency_needle:GetWndPos(pos)
L581 🟡 unused_local_variable
Local variable 'bind' is assigned but never used
Impact: low
Show code
local bind = dik_to_bind(dik)

stash_capacities.script

L4 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("stash_capacities: " .. ...)
L31 🔴 global_write
Global write: inventory_update
Impact: low
Show code
inventory_update = ui_inventory.UIInventory.UpdateWeight
L46 🔴 global_write
Global write: inventory_reset
Impact: low
Show code
inventory_reset = ui_inventory.UIInventory.Reset
L65 🔴 global_write
Global write: item
Impact: low
Show code
item = self:CheckItem(id)
L67 🔴 global_write
Global write: item_weight
Impact: low
Show code
item_weight = item:weight()

trader_autoinject.script

L34 🟢 repeated_npc_id()
npc:id() called 3x in trade_manager.update
Impact: low
Show code
Cache npc:id() result
L182 🟢 repeated_item_section()
item:section() called 4x in itr_inv
Impact: low
Show code
Cache item:section() result
L16 🔴 global_write
Global write: find
Impact: low
Show code
find = string.find
L32 🔴 global_write
Global write: TraderUpdate
Impact: low
Show code
TraderUpdate = trade_manager.update

ui_furniture_light.script

L126 🟢 uncached_globals_summary
Cache 1 globals in Update
Impact: medium
Show code
L134: math.floor L135: math.floor
L141 🟡 unused_local_variable
Local variable 'clr_grey' is assigned but never used
Impact: low
Show code
local clr_grey = utils_xml.get_color("ui_gray_1")
L158 🟡 unused_local_variable
Local variable 'bind' is assigned but never used
Impact: low
Show code
local bind = dik_to_bind(dik)

ui_furniture_piano.script

L19 🟢 table_insert_append
table.insert(sound_object_by_path, v) -> sound_object_by_path[#sound_object_by_path+1] = v
Impact: high
Show code
table.insert(sound_object_by_path, snd_obj)
L356 🟢 table_insert_append
table.insert(matching_sheets, v) -> matching_sheets[#matching_sheets+1] = v
Impact: high
Show code
table.insert(matching_sheets, selected_sheet)
L374 🟢 table_insert_append
table.insert(tags_info, v) -> tags_info[#tags_info+1] = v
Impact: high
Show code
table.insert(tags_info, {
L384 🟢 table_insert_append
table.insert(tags, v) -> tags[#tags+1] = v
Impact: high
Show code
table.insert(tags, v["tag"])
L409 🟢 table_insert_append
table.insert(tags, v) -> tags[#tags+1] = v
Impact: high
Show code
table.insert(tags, tag)
L412 🟢 table_insert_append
table.insert(tag2sheets[tag], v) -> tag2sheets[tag][#tag2sheets[tag]+1] = v
Impact: high
Show code
table.insert(tag2sheets[tag], i)
L455 🟢 table_insert_append
table.insert(simult_notes, v) -> simult_notes[#simult_notes+1] = v
Impact: high
Show code
table.insert(simult_notes, autokey2note[data])
L459 🟢 table_insert_append
table.insert(music_chart, v) -> music_chart[#music_chart+1] = v
Impact: high
Show code
table.insert(music_chart, {
L465 🟢 table_insert_append
table.insert(music_chart, v) -> music_chart[#music_chart+1] = v
Impact: high
Show code
table.insert(music_chart, {
L475 🟢 table_insert_append
table.insert(music_chart, v) -> music_chart[#music_chart+1] = v
Impact: high
Show code
table.insert(music_chart, {
L482 🟢 table_insert_append
table.insert(music_chart, v) -> music_chart[#music_chart+1] = v
Impact: high
Show code
table.insert(music_chart, {
L488 🟢 table_insert_append
table.insert(music_chart, v) -> music_chart[#music_chart+1] = v
Impact: high
Show code
table.insert(music_chart, {
L495 🟢 table_insert_append
table.insert(music_chart, v) -> music_chart[#music_chart+1] = v
Impact: high
Show code
table.insert(music_chart, {
L503 🟢 table_insert_append
table.insert(music_chart, v) -> music_chart[#music_chart+1] = v
Impact: high
Show code
table.insert(music_chart, {
L507 🟢 table_insert_append
table.insert(music_chart, v) -> music_chart[#music_chart+1] = v
Impact: high
Show code
table.insert(music_chart, {
L513 🟢 table_insert_append
table.insert(music_chart, v) -> music_chart[#music_chart+1] = v
Impact: high
Show code
table.insert(music_chart, {
L520 🟢 table_insert_append
table.insert(music_chart, v) -> music_chart[#music_chart+1] = v
Impact: high
Show code
table.insert(music_chart, {
L527 🟢 table_insert_append
table.insert(music_chart, v) -> music_chart[#music_chart+1] = v
Impact: high
Show code
table.insert(music_chart, {
L549 🟢 table_insert_append
table.insert(sheets, v) -> sheets[#sheets+1] = v
Impact: high
Show code
table.insert(sheets, {
L796 🟢 table_insert_append
table.insert(self.tag_checkboxes, v) -> self.tag_checkboxes[#self.tag_checkboxes+1] = v
Impact: high
Show code
table.insert(self.tag_checkboxes, {
L821 🟢 table_insert_append
table.insert(self.white_keys, v) -> self.white_keys[#self.white_keys+1] = v
Impact: high
Show code
table.insert(self.white_keys, xml:InitStatic("white_key", self))
L841 🟢 table_insert_append
table.insert(self.black_keys, v) -> self.black_keys[#self.black_keys+1] = v
Impact: high
Show code
table.insert(self.black_keys, xml:InitStatic("black_key", self))
L929 🟢 table_insert_append
table.insert(tags, v) -> tags[#tags+1] = v
Impact: high
Show code
table.insert(tags, self.tag_checkboxes[i].tag_name)
L439 🟡 string_concat_in_loop
String concat in loop: file_data = file_data .. x
Impact: critical
Show code
file_data = file_data .. data
L1 🔴 global_write
Global write: gc
Impact: low
Show code
gc = game.translate_string
L1057 🟡 unused_local_variable
Local variable 'bind' is assigned but never used
Impact: low
Show code
local bind = dik_to_bind(dik)

ui_furniture_workshop.script

L114 🟢 table_insert_append
table.insert(items, v) -> items[#items+1] = v
Impact: high
Show code
table.insert(items, obj:id())
L128 🔴 global_write
Global write: workshop_ui_ref
Impact: low
Show code
workshop_ui_ref = ui_workshop.get_workshop_ui(_ui1, nil, {false,false,false,false,false}, false)
L163 🟡 unused_local_variable
Local variable 'bind' is assigned but never used
Impact: low
Show code
local bind = dik_to_bind(dik)

workshop_autoinject.script

L118 🟢 uncached_globals_summary
Cache 1 globals in ListRecipes
Impact: medium
Show code
L123: pairs L131: pairs
L151 🟢 uncached_globals_summary
Cache 1 globals in LoadRecipes
Impact: medium
Show code
L198: pairs L202: pairs
L305 🟢 uncached_globals_summary
Cache 2 globals in add_recipe
Impact: medium
Show code
L312: tonumber L316: tonumber L315: tostring L317: tostring
L349 🟢 uncached_globals_summary
Cache 2 globals in add_recipe_ui
Impact: medium
Show code
L354: tonumber L357: tonumber L356: tostring L358: tostring
L191 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopCraft:LoadRecipes() | section [%s] not found!",id)
L260 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! workshop_craft_ui:LoadRecipes() | section [%s] not found!",id)
L319 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! Workshop UI craft | componenet section [%s] not found for [%s] recipe!", tostring(t[3]), id)
L327 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopCraft:LoadRecipes() | componenet section [%s] not found for [%s] recipe!", tostring(t[5]), id)
L335 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopCraft:LoadRecipes() | componenet section [%s] not found for [%s] recipe!", tostring(t[7]), id)
L343 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopCraft:LoadRecipes() | componenet section [%s] not found for [%s] recipe!", tostring(t[9]), id)
L360 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! Workshop UI craft | componenet section [%s] not found for [%s] recipe!", tostring(t[3]), id)
L368 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopCraft:LoadRecipes() | componenet section [%s] not found for [%s] recipe!", tostring(t[5]), id)
L376 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopCraft:LoadRecipes() | componenet section [%s] not found for [%s] recipe!", tostring(t[7]), id)
L384 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopCraft:LoadRecipes() | componenet section [%s] not found for [%s] recipe!", tostring(t[9]), id)
L241 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_craft:r_line(ind_str , i , "", "")

zzz_workshop_return_items.script

L1 🔴 global_write
Global write: item_ids
Impact: low
Show code
item_ids = {}
L2 🔴 global_write
Global write: stash_obj_id
Impact: low
Show code
stash_obj_id = nil
L15 🔴 global_write
Global write: item_ids
Impact: low
Show code
item_ids = {}
L16 🔴 global_write
Global write: stash_obj_id
Impact: low
Show code
stash_obj_id = nil
L19 🔴 global_write
Global write: ui_workshop_UIWorkshop_Close
Impact: low
Show code
ui_workshop_UIWorkshop_Close = ui_workshop.UIWorkshop.Close

246- Gunslinger Controller Suicide - Demonized

1 file (🟢1 🟡13 🔴0 🔵5)

gunslinger_controller.script

L365 🟢 uncached_globals_summary
Cache 1 globals in update_controller_state
Impact: medium
Show code
L387: math.random L395: math.random
L5 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
_G.printf("Gunslinger Controller: " .. s, ...)
L12 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(error_or_result)
L104 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('bisect, lo must be non-negative')
L483 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("boom shakalaka")
L557 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("adding controller %s", obj:name())
L250 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local active_item = actor:active_item()
L254 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local item = actor:item_in_slot(v)
L256 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:activate_slot(v)
L260 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:iterate_inventory(function(owner, item)
L262 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:make_item_active(item)
L323 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local outfit = actor:item_in_slot(7)
L332 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local helm = actor:item_in_slot(12)
L341 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:iterate_belt(function(owner, obj)
L351 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:cast_Actor():conditions():BoosterForEach(function(booster_type, booster_time, booster_value)
L379 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local det_active = actor:active_detector()
L422 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local wpn = actor:active_item()
L507 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:set_health_ex(0)
L20 🟡 unused_local_variable
Local variable 'dte' is assigned but never used
Impact: low
Show code
local dte = demonized_time_events

247- Player Icon Fix - MissingnoBW

1 file (🟢0 🟡1 🔴0 🔵0)

outfit_icon.script

L11 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local icon = ini_sys:r_string_ex(outfit:section(),"character_portrait")

248- Night Mutants - xcvb

1 file (🟢3 🟡2 🔴0 🔵5)

night_mutants.script

L124 🟢 table_insert_append
table.insert(spawned_mutants[level_name], v) -> spawned_mutants[level_name][#spawned_mutants[level_name]+1] = v
Impact: high
Show code
table.insert(spawned_mutants[level_name], squad.id)
L197 🟢 table_insert_append
table.insert(available_smart_terrains[smart_level_name], v) -> available_smart_terrains[smart_level_name][#available_smart_terrains[smart_level_name]+1] = v
Impact: high
Show code
table.insert(available_smart_terrains[smart_level_name], smart.id)
L205 🟢 table_insert_append
table.insert(squads_to_spawn, v) -> squads_to_spawn[#squads_to_spawn+1] = v
Impact: high
Show code
table.insert(squads_to_spawn, sec)
L145 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("delete_mutants (xcvb mutants): squad id: %s deleted || sec: %s", t[idx], squad:section_name())
L151 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! not squad, remove from table (xcvb mutants): obj id: %s || sec: %s", t[idx], squad:section_name())
L166 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("server_entity_on_unregister (xcvb mutants): squad_id: %s || sec: %s", t[idx], mutant_squad and mutant_squad:section_name() or "")
L180 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("squad_on_npc_death (xcvb mutants): squad_id: %s || sec: %s", t[idx], mutant_squad and mutant_squad:section_name() or "")
L248 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L63 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local actor_level = sim:level_name(gg:vertex(sim:actor().m_game_vertex_id):level_id())
L63 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local actor_level = sim:level_name(gg:vertex(sim:actor().m_game_vertex_id):level_id())

249- Backpack Icons - DeadEnvoy

1 file (🟢2 🟡4 🔴3 🔵3)

aaa_rax_icon_override_mcm.script

L728 🟢 uncached_globals_summary
Cache 1 globals in Refresh
Impact: medium
Show code
L757: math.ceil L758: math.ceil
L22 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( "RAX: | %s | "..text ,time_global(), ...)
L367 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR utils_xml.set_icon | XML_box or XML_temp doesn't exist")
L375 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR utils_xml.set_icon | section [%s] doesn't exist in system ini", sec)
L18 🔴 global_write
Global write: icon_override
Impact: low
Show code
icon_override = ini_file_ex("icon_override\\icon_override.ltx")
L540 🔴 global_write
Global write: axis
Impact: low
Show code
axis = utils_xml.get_item_axis(a_sec,1)
L555 🔴 global_write
Global write: axis
Impact: low
Show code
axis = utils_xml.get_item_axis(b_sec,1)
L21 🟢 dead_code_if_false
Dead code: if false (lines 21-23)
Impact: low
Show code
if false then
L358 🟡 unused_local_variable
Local variable 'rw' is assigned but never used
Impact: low
Show code
local ico_size, rw, rh, _le = 0.7,1,1,50
L358 🟡 unused_local_variable
Local variable 'rh' is assigned but never used
Impact: low
Show code
local ico_size, rw, rh, _le = 0.7,1,1,50
L54 🟡 unused_local_variable
Local variable 'clr_list_hl' is assigned but never used
Impact: low
Show code
local clr_list_hl = {
L525 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, kind, order = ini_sys:r_line_ex("item_kind_order",i,"","")

252- Tooltip in Corner - RavenAscendant

1 file (🟢0 🟡0 🔴1 🔵0)

zzzz_rax_move_tooltip.script

L28 🔴 global_write
Global write: curPos
Impact: low
Show code
curPos = GetCursorPosition()

253- Attach Patches with hotkey - Demonized

1 file (🟢0 🟡3 🔴1 🔵1)

patches_by_hotkey_mcm.script

L3 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(text, ...)
L35 🔴 global_write
Global write: op
Impact: low
Show code
op = {
L89 🟡 potential_nil_access
Potential nil access: 'obj' from :item_in_slot() used without nil check
Impact: low
Show code
local id = obj:id()
L90 🟡 potential_nil_access
Potential nil access: 'obj' from :item_in_slot() used without nil check
Impact: low
Show code
local section = obj:section()
L91 🟡 potential_nil_access
Potential nil access: 'obj' from :item_in_slot() used without nil check
Impact: low
Show code
local state = se_load_var(id, obj:name(), "unpatched")

254- Better RF Receiver sound - Coverdrave

3 files (🟢12 🟡10 🔴90 🔵4)

TB_RF_Receiver_Packages.script

L842 🟢 table_insert_append
table.insert(tb_new_queue, v) -> tb_new_queue[#tb_new_queue+1] = v
Impact: high
Show code
table.insert(tb_new_queue,tb_package_queue[i])
L926 🟢 table_insert_append
table.insert(tb_package_queue, v) -> tb_package_queue[#tb_package_queue+1] = v
Impact: high
Show code
table.insert(tb_package_queue,{level.name(),tb_relations[tb_factions[i]][2]})
L929 🟢 table_insert_append
table.insert(tb_package_queue, v) -> tb_package_queue[#tb_package_queue+1] = v
Impact: high
Show code
table.insert(tb_package_queue,{tb_homebases[i],tb_relations[tb_factions[i]][2]})
L1050 🟢 table_insert_append
table.insert(notfriends, v) -> notfriends[#notfriends+1] = v
Impact: high
Show code
table.insert(notfriends,tb_cut_factions[i])
L1060 🟢 table_insert_append
table.insert(bg_array, v) -> bg_array[#bg_array+1] = v
Impact: high
Show code
table.insert(bg_array,bg_num)
L777 🟢 uncached_globals_summary
Cache 2 globals in give_bonus_items
Impact: medium
Show code
L781: math.random L782: math.random L783: tostring L786: tostring
L964 🟢 uncached_globals_summary
Cache 2 globals in tb_radio_thing
Impact: medium
Show code
L989: math.random L1008: math.random L1020: tostring L1028: tostring
L1042 🟢 uncached_globals_summary
Cache 1 globals in spawn_some_badguys
Impact: medium
Show code
L1043: math.random L1053: math.random
L1135 🟢 uncached_globals_summary
Cache 1 globals in actor_on_item_take
Impact: medium
Show code
L1155: tostring L1156: tostring
L1056 🟢 repeated_alife
alife called 3x in spawn_some_badguys
Impact: low
Show code
local sim = alife()
L818 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("--- Loading TBs_RF_Receiver_Hidden_Package_Sidequests_v1.8 ---")
L846 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("--- Cleaning v1.5 package queue for v1.6 | Queue size was: %s, is now: %s ---",tb_queue_num,#tb_package_queue)
L861 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! --------------------------------------------------\n! ERROR!\n! SOMETHING HAS REMOVED THE PACKAGE FROM THE GAME!\n! Please post the following information to tweaki_breeki on moddb!\n! tb_target_item is %s\n! tb_package_active is %s\n! tb_package_in_level is %s\n! #tb_package_queue is %s\n! tb_target_lvid is %s\n! tb_target_gvid is %s\n! --------------------------------------------------",tb_target_item,tb_package_active,tb_package_in_level,#tb_package_queue,tb_target_lvid,tb_target_gvid)
L26 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
tb_target_item = 0
L27 🔴 global_write
Global write: tb_sufficient_passed
Impact: low
Show code
tb_sufficient_passed = false
L28 🔴 global_write
Global write: tb_package_active
Impact: low
Show code
tb_package_active = false
L29 🔴 global_write
Global write: tb_reminder
Impact: low
Show code
tb_reminder = "empty"
L30 🔴 global_write
Global write: tb_package_in_level
Impact: low
Show code
tb_package_in_level = "empty"
L31 🔴 global_write
Global write: tb_freq
Impact: low
Show code
tb_freq = 0
L32 🔴 global_write
Global write: tb_sender_icon
Impact: low
Show code
tb_sender_icon = "empty"
L33 🔴 global_write
Global write: tb_scan_time
Impact: low
Show code
tb_scan_time = 4000
L34 🔴 global_write
Global write: tb_tg_scan
Impact: low
Show code
tb_tg_scan = 0
L35 🔴 global_write
Global write: tb_device
Impact: low
Show code
tb_device = "detector_radio"
L36 🔴 global_write
Global write: tb_relation_diff
Impact: low
Show code
tb_relation_diff = 250
L38 🔴 global_write
Global write: tb_target_lvid
Impact: low
Show code
tb_target_lvid = 0
L39 🔴 global_write
Global write: tb_target_gvid
Impact: low
Show code
tb_target_gvid = 0
L40 🔴 global_write
Global write: tb_bonus_items
Impact: low
Show code
tb_bonus_items = 0
L41 🔴 global_write
Global write: tb_badguy_spawned
Impact: low
Show code
tb_badguy_spawned = false
L42 🔴 global_write
Global write: tb_tg_badguys
Impact: low
Show code
tb_tg_badguys = 0
L44 🔴 global_write
Global write: tb_previous_level
Impact: low
Show code
tb_previous_level = "empty"
L46 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
tb_making_package = false
L49 🔴 global_write
Global write: tb_relations
Impact: low
Show code
tb_relations = {
L65 🔴 global_write
Global write: tb_maybe_badguys
Impact: low
Show code
tb_maybe_badguys = {
L81 🔴 global_write
Global write: tb_factions
Impact: low
Show code
tb_factions = {"army", "bandit", "csky", "dolg", "ecolog", "freedom", "greh", "isg", "killer", "monolith", "renegade", "stalker"}
L83 🔴 global_write
Global write: tb_cut_factions
Impact: low
Show code
tb_cut_factions = {"army", "bandit", "csky", "dolg", "ecolog", "freedom", "killer", "renegade", "stalker"}
L85 🔴 global_write
Global write: tb_homebases
Impact: low
Show code
tb_homebases = {"l03_agroprom", "l04_darkvalley", "k00_marsh", "l05_bar", "l08_yantar", "l07_military", "l10_red_forest", "pripyat", "l09_deadcity", "l11_pripyat", "k00_marsh", "l01_escape"}
L88 🔴 global_write
Global write: tb_package_queue
Impact: low
Show code
tb_package_queue = {}
L91 🔴 global_write
Global write: tb_allmaps
Impact: low
Show code
tb_allmaps = {
L129 🔴 global_write
Global write: tb_package_coords
Impact: low
Show code
tb_package_coords = {
L617 🔴 global_write
Global write: tb_extraloot
Impact: low
Show code
tb_extraloot = {
L634 🔴 global_write
Global write: tb_extraupgrades
Impact: low
Show code
tb_extraupgrades = {
L724 🔴 global_write
Global write: tb_junks
Impact: low
Show code
tb_junks = {
L759 🔴 global_write
Global write: tb_copy_of_itms_manager
Impact: low
Show code
tb_copy_of_itms_manager = itms_manager.use_package_random
L772 🔴 global_write
Global write: tb_bonus_items
Impact: low
Show code
tb_bonus_items = tb_bonus_items - 1
L845 🔴 global_write
Global write: tb_package_queue
Impact: low
Show code
tb_package_queue = tb_new_queue
L873 🔴 global_write
Global write: tb_tg_badguys
Impact: low
Show code
tb_tg_badguys = tg + 2000
L878 🔴 global_write
Global write: tb_badguy_spawned
Impact: low
Show code
tb_badguy_spawned = true
L900 🔴 global_write
Global write: tb_tg_scan
Impact: low
Show code
tb_tg_scan = tg + tb_scan_time
L917 🔴 global_write
Global write: tb_sender_icon
Impact: low
Show code
tb_sender_icon = tb_relations[tb_factions[i]][2]
L922 🔴 global_write
Global write: tb_sufficient_passed
Impact: low
Show code
tb_sufficient_passed = true
L940 🔴 global_write
Global write: tb_sender_icon
Impact: low
Show code
tb_sender_icon = tb_relations[tb_factions[i]][2]
L941 🔴 global_write
Global write: tb_reminder
Impact: low
Show code
tb_reminder = game.translate_string("tb_sooner_rf")
L944 🔴 global_write
Global write: tb_sufficient_passed
Impact: low
Show code
tb_sufficient_passed = true
L965 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
tb_making_package = true
L969 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
tb_making_package = false
L973 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
tb_making_package = false
L982 🔴 global_write
Global write: tb_sender_icon
Impact: low
Show code
tb_sender_icon = tb_package_queue[1][2]
L996 🔴 global_write
Global write: tb_package_in_level
Impact: low
Show code
tb_package_in_level = chosenmap
L1007 🔴 global_write
Global write: tb_previous_level
Impact: low
Show code
tb_previous_level = chosenmap
L1016 🔴 global_write
Global write: tb_freq
Impact: low
Show code
tb_freq = rfreq
L1022 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
tb_target_item = se_obj.id
L1023 🔴 global_write
Global write: tb_target_lvid
Impact: low
Show code
tb_target_lvid = rlvid
L1024 🔴 global_write
Global write: tb_target_gvid
Impact: low
Show code
tb_target_gvid = rgvid
L1027 🔴 global_write
Global write: tb_package_active
Impact: low
Show code
tb_package_active = true
L1029 🔴 global_write
Global write: tb_reminder
Impact: low
Show code
tb_reminder = game.translate_string("tb_dont_forget") .. " " .. game.translate_string(rlocat) .. " " .. game.translate_string(rplace) .. game.translate_string("tb_freq_was_on") .. " " .. tostring(rfreq) .. game.translate_string("tb_the_mhz")
L1033 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
tb_making_package = false
L1036 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
tb_making_package = false
L1093 🔴 global_write
Global write: tb_scan_time
Impact: low
Show code
tb_scan_time = 1000
L1104 🔴 global_write
Global write: tb_scan_time
Impact: low
Show code
tb_scan_time = 2000
L1115 🔴 global_write
Global write: tb_scan_time
Impact: low
Show code
tb_scan_time = 3000
L1125 🔴 global_write
Global write: tb_scan_time
Impact: low
Show code
tb_scan_time = 4000
L1141 🔴 global_write
Global write: tb_package_active
Impact: low
Show code
tb_package_active = false
L1142 🔴 global_write
Global write: tb_badguy_spawned
Impact: low
Show code
tb_badguy_spawned = false
L1143 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
tb_target_item = 0
L1144 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
tb_target_item = 0
L1145 🔴 global_write
Global write: tb_reminder
Impact: low
Show code
tb_reminder = "empty"
L1146 🔴 global_write
Global write: tb_package_in_level
Impact: low
Show code
tb_package_in_level = "empty"
L1147 🔴 global_write
Global write: tb_scan_time
Impact: low
Show code
tb_scan_time = 4000
L1161 🔴 global_write
Global write: tb_bonus_items
Impact: low
Show code
tb_bonus_items = 0
L1163 🔴 global_write
Global write: tb_bonus_items
Impact: low
Show code
tb_bonus_items = tb_bonus_items + 1
L1193 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
tb_target_item = m_data.tb_target_item
L1194 🔴 global_write
Global write: tb_sufficient_passed
Impact: low
Show code
tb_sufficient_passed = m_data.tb_sufficient_passed
L1195 🔴 global_write
Global write: tb_package_active
Impact: low
Show code
tb_package_active = m_data.tb_package_active
L1196 🔴 global_write
Global write: tb_reminder
Impact: low
Show code
tb_reminder = m_data.tb_reminder
L1197 🔴 global_write
Global write: tb_package_in_level
Impact: low
Show code
tb_package_in_level = m_data.tb_package_in_level
L1198 🔴 global_write
Global write: tb_freq
Impact: low
Show code
tb_freq = m_data.tb_freq
L1199 🔴 global_write
Global write: tb_sender_icon
Impact: low
Show code
tb_sender_icon = m_data.tb_sender_icon
L1200 🔴 global_write
Global write: tb_relations
Impact: low
Show code
tb_relations = m_data.tb_relations
L1201 🔴 global_write
Global write: tb_package_queue
Impact: low
Show code
tb_package_queue = m_data.tb_package_queue
L1204 🔴 global_write
Global write: tb_target_lvid
Impact: low
Show code
tb_target_lvid = m_data.tb_target_lvid
L1205 🔴 global_write
Global write: tb_target_gvid
Impact: low
Show code
tb_target_gvid = m_data.tb_target_gvid
L1206 🔴 global_write
Global write: tb_bonus_items
Impact: low
Show code
tb_bonus_items = m_data.tb_bonus_items
L1207 🔴 global_write
Global write: tb_badguy_spawned
Impact: low
Show code
tb_badguy_spawned = m_data.tb_badguy_spawned
L1210 🔴 global_write
Global write: tb_previous_level
Impact: low
Show code
tb_previous_level = m_data.tb_previous_level
L896 🟡 potential_nil_access
Potential nil access: 'obj_det' from :active_detector() used without nil check
Impact: low
Show code
if not (obj_det and obj_det:section() == tb_device and obj_det:condition() >= obj_det:power_critical()) then
L896 🟡 potential_nil_access
Potential nil access: 'obj_det' from :active_detector() used without nil check
Impact: low
Show code
if not (obj_det and obj_det:section() == tb_device and obj_det:condition() >= obj_det:power_critical()) then
L896 🟡 potential_nil_access
Potential nil access: 'obj_det' from :active_detector() used without nil check
Impact: low
Show code
if not (obj_det and obj_det:section() == tb_device and obj_det:condition() >= obj_det:power_critical()) then
L1072 🟡 unused_local_variable
Local variable 'tb_highbeep_flash_time' is assigned but never used
Impact: low
Show code
local tb_highbeep_flash_time = 600

item_radio.script

L458 🟢 uncached_globals_summary
Cache 1 globals in actor_on_first_update
Impact: medium
Show code
L466: pairs L476: pairs
L508 🟢 uncached_globals_summary
Cache 1 globals in actor_on_update
Impact: medium
Show code
L568: math.random L581: math.random
L144 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("item_radio | " .. fmt, ...)
L96 🔴 global_write
Global write: tb_flash_time
Impact: low
Show code
tb_flash_time = 0
L97 🔴 global_write
Global write: tb_in_range
Impact: low
Show code
tb_in_range = false
L98 🔴 global_write
Global write: tb_sound_object
Impact: low
Show code
tb_sound_object = false
L135 🔴 global_write
Global write: RF_stashes
Impact: low
Show code
RF_stashes = {} -- stored stashes with RF source
L136 🔴 global_write
Global write: RF_targets
Impact: low
Show code
RF_targets = {} -- stored specific targets with RF source
L312 🔴 global_write
Global write: refresh
Impact: low
Show code
refresh = true -- require sounds update
L597 🔴 global_write
Global write: RF_stashes
Impact: low
Show code
RF_stashes = m_data.RF_stashes or {}
L598 🔴 global_write
Global write: RF_targets
Impact: low
Show code
RF_targets = m_data.RF_targets or {}
L467 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se = sim:object(id)
L469 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local lvl = sim:level_name(gg:vertex(se.m_game_vertex_id):level_id())
L518 🟡 potential_nil_access
Potential nil access: 'obj_det' from :active_detector() used without nil check
Impact: low
Show code
if not (obj_det and obj_det:section() == _device and obj_det:condition() >= obj_det:power_critical()) then
L518 🟡 potential_nil_access
Potential nil access: 'obj_det' from :active_detector() used without nil check
Impact: low
Show code
if not (obj_det and obj_det:section() == _device and obj_det:condition() >= obj_det:power_critical()) then
L518 🟡 potential_nil_access
Potential nil access: 'obj_det' from :active_detector() used without nil check
Impact: low
Show code
if not (obj_det and obj_det:section() == _device and obj_det:condition() >= obj_det:power_critical()) then
L622 🟡 potential_nil_access
Potential nil access: 'detector' from :active_detector() used without nil check
Impact: low
Show code
if detector and (detector:section() == _device) and (not wep) then

reworked_rf_receiver_mcm.script

L6 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "reworked_rf_receiver",sh=true ,gr={

255- Coffee in the Zone - sticknou

3 files (🟢2 🟡4 🔴6 🔵0)

coffee_drink.script

L82 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update
L163 🔴 global_write
Global write: SpawnCosmetics
Impact: low
Show code
SpawnCosmetics = death_manager.spawn_cosmetics
L91 🟡 unused_local_variable
Local variable 'loot_table' is assigned but never used
Impact: low
Show code
local loot_table = {
L146 🟡 unused_local_variable
Local variable 'sections_table' is assigned but never used
Impact: low
Show code
local sections_table = {

ground_coffee.script

L82 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update
L163 🔴 global_write
Global write: SpawnCosmetics
Impact: low
Show code
SpawnCosmetics = death_manager.spawn_cosmetics
L91 🟡 unused_local_variable
Local variable 'loot_table' is assigned but never used
Impact: low
Show code
local loot_table = {
L146 🟡 unused_local_variable
Local variable 'sections_table' is assigned but never used
Impact: low
Show code
local sections_table = {

trader_autoinject.script

L34 🟢 repeated_npc_id()
npc:id() called 3x in trade_manager.update
Impact: low
Show code
Cache npc:id() result
L182 🟢 repeated_item_section()
item:section() called 4x in itr_inv
Impact: low
Show code
Cache item:section() result
L16 🔴 global_write
Global write: find
Impact: low
Show code
find = string.find
L32 🔴 global_write
Global write: TraderUpdate
Impact: low
Show code
TraderUpdate = trade_manager.update

257- Zone Customization Project (ZCP) - Diphenhydramine-HCl

19 files (🟢64 🟡89 🔴33 🔵59)

bind_anomaly_field.script

L57 🟢 uncached_globals_summary
Cache 1 globals in ini_settings
Impact: medium
Show code
L84: tonumber L109: tonumber
L425 🟢 uncached_globals_summary
Cache 1 globals in pulse_anomaly_update
Impact: medium
Show code
L445: math.random L450: math.random
L30 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L48 🔴 global_write
Global write: dyn_anomalies
Impact: low
Show code
dyn_anomalies = {} -- [level][id] = name
L517 🔴 global_write
Global write: dyn_anomalies
Impact: low
Show code
dyn_anomalies = m_data.dyn_anomalies or {}
L554 🔴 global_write
Global write: fields_by_names
Impact: low
Show code
fields_by_names = {}

bind_awr.script

L266 🟢 table_insert_append
table.insert(angles_t[k], v) -> angles_t[k][#angles_t[k]+1] = v
Impact: high
Show code
angles_t[k] = {}
L304 🟢 uncached_globals_summary
Cache 1 globals in full_access
Impact: medium
Show code
L309: string.format L310: string.format
L437 🟢 uncached_globals_summary
Cache 2 globals in table_to_string
Impact: medium
Show code
L447: type L449: type L450: tostring L462: tostring
L61 🟢 repeated_npc_section()
npc:section() called 3x in OnDeath
Impact: low
Show code
Cache npc:section() result
L432 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
local txt = header and ("-- " .. tostring(header) .. "\n{\n\n") or "{\n\n"
L456 🟡 string_concat_in_loop
String concat in loop: txt = txt .. x
Impact: critical
Show code
key = "[\""..tostring(k) .. "\"]"
L164 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/ Registered vice [%s] = %s", name, i)
L172 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/ Registered vice lamp [%s] = %s", name, i)
L417 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
return tostring(p[i])
L497 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
txt = txt .. "\n}"
L153 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local s_obj = sim:object(i)
L233 🟡 potential_nil_access
Potential nil access: 'alife' from alife() used without nil check
Impact: low
Show code
local se_actor = alife:actor()
L292 🟡 potential_nil_access
Potential nil access: 'lamp' from level.object_by_id() used without nil check
Impact: low
Show code
if lamp then
L10 🟡 unused_local_variable
Local variable 'settings_list' is assigned but never used
Impact: low
Show code
local settings_list = {}

dph_debug_log.script

L123 🟢 table_insert_append
table.insert(private.modules, v) -> private.modules[#private.modules+1] = v
Impact: high
Show code
table.insert(private.modules, m)
L31 🟢 uncached_globals_summary
Cache 1 globals in new
Impact: medium
Show code
L85: ipairs L94: ipairs
L49 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe(public.format_entry("dph_debug_log/log", LOG_LEVEL_ERROR, "Unable to open logfile %s! Entry logged on the following line.", public.config.file))
L50 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(public.format_entry(mod, level, entry, ...))
L58 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe(ln)
L60 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(ln)
L71 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe(public.format_entry("dph_debug_log/pda", LOG_LEVEL_ERROR, "Could not send message to PDA: Actor does not exist! Entry logged on the following line."))
L72 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(public.format_entry(mod, level, entry, ...))
L139 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe(public.format_entry("dph_debug_log", LOG_LEVEL_ERROR, "Target %s threw an exception while logging <%s> %s", target, mod, entry))
L140 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("ERROR: %s", err)
L141 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(public.format_entry(mod, level, entry, ...))
L16 🔴 global_write
Global write: log_levels
Impact: low
Show code
log_levels = {
L78 🔴 global_write
Global write: m
Impact: low
Show code
m = tostring(mt)
L79 🔴 global_write
Global write: p
Impact: low
Show code
p = tostring(pt)
L137 🟡 unused_local_variable
Local variable 'status' is assigned but never used
Impact: low
Show code
local status, err = pcall(private.targets[target], mod, level, entry, ...)

faction_expansions.script

L128 🟢 uncached_globals_summary
Cache 1 globals in get_section
Impact: medium
Show code
L129: math.random L140: math.random
L8 🔴 global_write
Global write: faction
Impact: low
Show code
faction = {}
L9 🔴 global_write
Global write: level
Impact: low
Show code
level = {}
L10 🔴 global_write
Global write: mutant
Impact: low
Show code
mutant = {}
L11 🔴 global_write
Global write: mutant_tier_by_clsid
Impact: low
Show code
mutant_tier_by_clsid = {
L232 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_fact:r_line_ex("mutant_tier",i,"","")

game_setup.script

L106 🟢 uncached_globals_summary
Cache 1 globals in init_settings
Impact: medium
Show code
L127: tonumber L149: tonumber
L182 🟢 uncached_globals_summary
Cache 1 globals in try_spawn_world_item
Impact: medium
Show code
L199: math.random L225: math.random
L348 🟢 repeated_alife
alife called 3x in freedom_medic_fix
Impact: low
Show code
local sim = alife()
L79 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L315 🟡 potential_nil_access
Potential nil access: 'se' from :object() used without nil check
Impact: low
Show code
if se and (se:name() == 'bar_physic_object_mlr_0002' or se:name() == 'bar_physic_object_mlr_0003') then
L315 🟡 potential_nil_access
Potential nil access: 'se' from :object() used without nil check
Impact: low
Show code
if se and (se:name() == 'bar_physic_object_mlr_0002' or se:name() == 'bar_physic_object_mlr_0003') then
L330 🟡 potential_nil_access
Potential nil access: 'se' from :object() used without nil check
Impact: low
Show code
if se and (se:name() == 'ds_physic_destroyable_object_0046' or se:name() == 'ds_physic_object_0009' or se:name() == 'ds_physic_object_0010' or se:name() == 'ds_physic_object_0002') then
L330 🟡 potential_nil_access
Potential nil access: 'se' from :object() used without nil check
Impact: low
Show code
if se and (se:name() == 'ds_physic_destroyable_object_0046' or se:name() == 'ds_physic_object_0009' or se:name() == 'ds_physic_object_0010' or se:name() == 'ds_physic_object_0002') then
L330 🟡 potential_nil_access
Potential nil access: 'se' from :object() used without nil check
Impact: low
Show code
if se and (se:name() == 'ds_physic_destroyable_object_0046' or se:name() == 'ds_physic_object_0009' or se:name() == 'ds_physic_object_0010' or se:name() == 'ds_physic_object_0002') then
L330 🟡 potential_nil_access
Potential nil access: 'se' from :object() used without nil check
Impact: low
Show code
if se and (se:name() == 'ds_physic_destroyable_object_0046' or se:name() == 'ds_physic_object_0009' or se:name() == 'ds_physic_object_0010' or se:name() == 'ds_physic_object_0002') then
L392 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(i)
L422 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(i)

pda.script

L117 🟢 uncached_globals_summary
Cache 1 globals in get_time_elapsed
Impact: medium
Show code
L122: string.format L124: string.format
L132 🟢 uncached_globals_summary
Cache 1 globals in get_stat
Impact: medium
Show code
L136: tostring L138: tostring
L523 🟢 uncached_globals_summary
Cache 1 globals in coc_rankings_set_hint
Impact: medium
Show code
L547: tostring L550: tostring
L457 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("- get_coc_ranking_list | id [%s] = %s", i , coc_ranking_list[i])
L4 🔴 global_write
Global write: dialog_closed
Impact: low
Show code
dialog_closed = true
L89 🔴 global_write
Global write: dialog_closed
Impact: low
Show code
dialog_closed = false
L112 🔴 global_write
Global write: dialog_closed
Impact: low
Show code
dialog_closed = true
L24 🟡 potential_nil_access
Potential nil access: 'obj' from :item_in_slot() used without nil check
Impact: low
Show code
local sec = obj and obj:section()
L467 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
t[0] = sim:actor():rank()
L471 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(i)
L472 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if (se_obj and IsStalker(nil,se_obj:clsid()) and se_obj:alive() and se_obj:community() ~= "zombied" and se_obj:community() ~= "trader") then
L472 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if (se_obj and IsStalker(nil,se_obj:clsid()) and se_obj:alive() and se_obj:community() ~= "zombied" and se_obj:community() ~= "trader") then
L472 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if (se_obj and IsStalker(nil,se_obj:clsid()) and se_obj:alive() and se_obj:community() ~= "zombied" and se_obj:community() ~= "trader") then
L472 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if (se_obj and IsStalker(nil,se_obj:clsid()) and se_obj:alive() and se_obj:community() ~= "zombied" and se_obj:community() ~= "trader") then
L476 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
t[se_obj.id] = se_obj:rank()
L610 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local icon = ini_sys:r_string_ex(outfit:section(),"character_portrait")
L648 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
if actor:dont_has_info(v.target) then
L652 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
if (db.storage[obj_id].object:position():distance_to(actor:position()) <= n_dist) then

sim_board.script

L91 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Smart already exist in list [%s]", obj:name())
L166 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("create_squad_at_named_location: squad section does not exist in misc\\squad_descr.ltx: %s",squad_id)
L174 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('create_squad_at_named_location: named location not defined in named_locations.ltx: %s',loc_name)
L190 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("str_explode_num: warning: %s couldn't be parsed as number", s)
L305 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("---------------- Welcome To Test Map ----------------")
L362 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("sim_board:fill_start_position incorrect smart by name %s",section)
L145 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = k.object or k.id and sim:object(k.id)
L211 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = k.object or k.id and sim:object(k.id)
L278 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local squad = se_obj.group_id and se_obj.group_id ~= 65535 and sim:object(se_obj.group_id)
L284 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local smart = squad.smart_id and sim:object(squad.smart_id)
L6 🟡 unused_local_variable
Local variable 'tsort' is assigned but never used
Impact: low
Show code
local level,alife,game_graph,math,pairs,tostring,tonumber,tsort,tinsert = level,alife,game_graph,math,pairs,tostring,tonumber,table.sort,table.insert
L6 🟡 unused_local_variable
Local variable 'tinsert' is assigned but never used
Impact: low
Show code
local level,alife,game_graph,math,pairs,tostring,tonumber,tsort,tinsert = level,alife,game_graph,math,pairs,tostring,tonumber,table.sort,table.insert
L273 🟡 unused_local_variable
Local variable 'community_groups' is assigned but never used
Impact: low
Show code
local community_groups = {}

sim_squad_scripted.script

L629 🟢 uncached_globals_summary
Cache 2 globals in create_npc
Impact: medium
Show code
L644: tonumber L646: tonumber L728: math.random L728: math.random
L937 🟢 uncached_globals_summary
Cache 1 globals in STATE_Write
Impact: medium
Show code
L947: tostring L948: tostring
L961 🟢 uncached_globals_summary
Cache 1 globals in STATE_Read
Impact: medium
Show code
L977: tonumber L983: tonumber
L604 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: npc section %s does not exist!",spawn_section)
L610 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("INCORRECT npc_spawn_section USED [%s]. You cannot use npc with custom_data in squads", spawn_section)
L687 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('spawn smart: %s', spawn_smart)
L746 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("You are trying to spawn an empty squad [%s]!!!", settings_id)
L872 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("squad community is 'nil' for player_id [%s]", self.player_id)
L12 🔴 global_write
Global write: dbg_map_hud
Impact: low
Show code
dbg_map_hud = false
L228 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_actor = sim:actor()
L239 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local cur_lvl = sim:level_name(game_graph():vertex(self.m_game_vertex_id):level_id())
L427 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(id)
L499 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local obj = sim:object(member_id)
L619 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local actor = sim:actor()
L620 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
if (simulation_objects.is_on_the_same_level(obj, actor) and spawn_position:distance_to_sqr(actor.position) <= sim:switch_distance()^2) then
L861 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(k.id)
L862 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if se_obj and se_obj:has_detector() then
L1227 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_actor = sim:actor()
L21 🟡 unused_local_variable
Local variable 'a' is assigned but never used
Impact: low
Show code
local a,key,val = locations_ini:r_line_ex(section,0,"","")
L21 🟡 unused_local_variable
Local variable 'val' is assigned but never used
Impact: low
Show code
local a,key,val = locations_ini:r_line_ex(section,0,"","")
L173 🟡 unused_local_variable
Local variable 'itm' is assigned but never used
Impact: low
Show code
local itm = alife_create_item(vv, alife_object(k.id))
L813 🟡 unused_local_variable
Local variable 'planner' is assigned but never used
Impact: low
Show code
local planner = npc:motivation_action_manager()
L1399 🟡 unused_local_variable
Local variable 'smarts_by_no_assault_zones' is assigned but never used
Impact: low
Show code
local smarts_by_no_assault_zones = {

smart_terrain.script

L626 🟢 uncached_globals_summary
Cache 1 globals in select_npc_job
Impact: medium
Show code
L695: pairs L705: pairs
L925 🟢 uncached_globals_summary
Cache 1 globals in STATE_Write
Impact: medium
Show code
L935: pairs L944: pairs
L1121 🟢 uncached_globals_summary
Cache 2 globals in get_smart_props
Impact: medium
Show code
L1123: tostring L1129: tostring L1146: pairs L1162: pairs
L1209 🟢 uncached_globals_summary
Cache 1 globals in check_smart_faction
Impact: medium
Show code
L1211: pairs L1220: pairs
L1597 🟢 uncached_globals_summary
Cache 1 globals in try_respawn
Impact: medium
Show code
L1698: math.random L1714: math.random
L1359 🟢 repeated_npc_id()
npc:id() called 4x in setup_logic
Impact: low
Show code
Cache npc:id() result
L528 🟡 string_concat_in_loop
String concat in loop: path_name = path_name .. x
Impact: critical
Show code
path_name = path_name.."_task"
L1148 🟡 string_concat_in_loop
String concat in loop: props = props .. x
Impact: critical
Show code
props = props.."["..k.."] = "..v.num.."("..(xr_logic.pick_section_from_condlist(db.actor, self,self.respawn_params[k].num) or "0")..")\\n"
L1163 🟡 string_concat_in_loop
String concat in loop: props = props .. x
Impact: critical
Show code
props = props .. tostring(k) .. "\\n"
L1169 🟡 string_concat_in_loop
String concat in loop: props = props .. x
Impact: critical
Show code
props = props .. prop .. " = " .. val .. "\\n"
L199 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR!: smart_terrain: no configuration file defined in spawn ini for %s",self:name())
L210 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: There is no configuration file [%s] in smart_terrain [%s]", filename, self:name())
L217 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! SMART_TERRAIN [%s] has no terrain_mask section in smart_terrain_masks.ltx!!!",self:name())
L276 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s Wrong smart_terrain respawn_params section [%s](there is no section)",self:name(),respawn_params)
L282 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s Wrong smart_terrain respawn_params section [%s](empty params)", self:name(), respawn_params)
L293 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: %s Wrong smatr_terrain respawn_params section [%s] prop [%s](there is no section)",self:name(), respawn_params, prop_name)
L313 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
return printf("fill_npc_info invalid clsid for %s",obj and obj:name())
L318 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
return printf("fill_npc_info invalid stype for %s [clsid=%s]",obj and obj:name(),cls)
L351 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
return printf("register_npc no clsid! %s",obj and obj:name())
L446 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("validate_patrol_path WARNING: %s: invalid game_vertex_id for point %s",path_name,i)
L451 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("validate_patrol_path ERROR: %s: path does not exist",path_name)
L471 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!CRITICAL ERROR: %s does not have a dynamic ltx!",self:name())
L491 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("gulag: ltx=%s no 'active' in section %s", self.ltx_name, section)
L517 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("smart_terrain.load_jobs(): Cannot find path_field in section %s. ini_path=%s",active_section,job.ini_path)
L539 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s:load_jobs() There is no such patrol path %s",self:name(),path_name)
L549 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("There is an exclusive job with wrong smatrcover name [%s] smartterrain [%s]", tostring(smartcover_name), self:name())
L634 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
return printf("%s no npc_info!",self:name())
L640 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
return printf("%s no job table for %s [stype = %s]",self:name(),npc_info.se_obj:name(),npc_info.stype)
L1007 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s:STATE_Read: invalid id in npc_info table. Check for save corruption or error in smart_terrain job system.")
L1355 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s.setup_logic: NPC is nil",self:name())
L1361 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s.setup_logic: npc_info is nil! for id=%s",self:name(),npc:id())
L1366 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s.setup_logic: npc_info.se_obj is nil! for id=%s",self:name(),npc:id())
L1372 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s.setup_logic: npc_info has no job! for id=%s",self:name(),npc:id())
L1385 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[smart_terrain %s] section=%s, don't use section 'nil'!", self:name(), sect)
L1709 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("ERROR: %s Incorrect Respawn Params. respawn_params[%s].num=%s already_spawned[%s]=%s already_spawned[%s].num=%s",self:name(),k,v.num,k,type(self.already_spawned[k]),self.already_spawned[k] and self.already_spawned[k].num)
L11 🔴 global_write
Global write: nearest_to_actor_smart
Impact: low
Show code
nearest_to_actor_smart = {id = nil , dist = math.huge}
L12 🔴 global_write
Global write: dbg_hud
Impact: low
Show code
dbg_hud = false
L137 🔴 global_write
Global write: actor_level
Impact: low
Show code
actor_level = nil
L146 🔴 global_write
Global write: actor_level
Impact: low
Show code
actor_level = actor_level or sim:level_name(gg:vertex(sim:actor().m_game_vertex_id):level_id())
L1786 🔴 global_write
Global write: temp1
Impact: low
Show code
temp1, level_name, temp2 = names_ini:r_line("levels", i, "", "")
L1786 🔴 global_write
Global write: level_name
Impact: low
Show code
temp1, level_name, temp2 = names_ini:r_line("levels", i, "", "")
L1786 🔴 global_write
Global write: temp2
Impact: low
Show code
temp1, level_name, temp2 = names_ini:r_line("levels", i, "", "")
L1790 🔴 global_write
Global write: result
Impact: low
Show code
result, smart_name, value = names_ini:r_line(level_name, i, "", "")
L1790 🔴 global_write
Global write: smart_name
Impact: low
Show code
result, smart_name, value = names_ini:r_line(level_name, i, "", "")
L1790 🔴 global_write
Global write: value
Impact: low
Show code
result, smart_name, value = names_ini:r_line(level_name, i, "", "")
L146 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
actor_level = actor_level or sim:level_name(gg:vertex(sim:actor().m_game_vertex_id):level_id())
L146 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
actor_level = actor_level or sim:level_name(gg:vertex(sim:actor().m_game_vertex_id):level_id())
L147 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local smart_level = sim:level_name(gg:vertex(self.m_game_vertex_id):level_id())
L197 🟡 potential_nil_access
Potential nil access: 'spawn_ini' from :spawn_ini() used without nil check
Impact: low
Show code
local filename = spawn_ini:r_string_ex(smart_sect,"cfg")
L1074 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local sobj = sim:object(id)
L1075 🟡 potential_nil_access
Potential nil access: 'sobj' from :object() used without nil check
Impact: low
Show code
local cls = sobj and sobj:clsid()
L1095 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(id)
L1249 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_actor = sim:actor()
L1398 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local smart = se_obj.m_smart_terrain_id and se_obj.m_smart_terrain_id ~= 65535 and sim:object(se_obj.m_smart_terrain_id)
L1427 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local smart = sim and se_obj.m_smart_terrain_id and se_obj.m_smart_terrain_id ~= 65535 and sim:object(se_obj.m_smart_terrain_id)
L1461 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = k.object or k.id and sim:object(k.id)
L291 🟡 unused_local_variable
Local variable 'prop_condlist' is assigned but never used
Impact: low
Show code
local result, prop_name, prop_condlist = ini:r_line(respawn_params,j,"","")

smr_civil_war.script

L114 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(member.id)
L115 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj2 = sim:object(k.id)
L116 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
smr_debug.get_log().info("civilwar/relations", "setting up squad relations between %s and %s in squad %s", se_obj:section_name(), se_obj2:section_name(), squad:section_name())
L116 🟡 potential_nil_access
Potential nil access: 'se_obj2' from :object() used without nil check (auto-fixable)
Impact: low
Show code
smr_debug.get_log().info("civilwar/relations", "setting up squad relations between %s and %s in squad %s", se_obj:section_name(), se_obj2:section_name(), squad:section_name())
L118 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
se_obj:force_set_goodwill(5000, se_obj2.id)
L119 🟡 potential_nil_access
Potential nil access: 'se_obj2' from :object() used without nil check
Impact: low
Show code
se_obj2:force_set_goodwill(5000, se_obj.id)
L127 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(k.id)
L128 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if (not IsStalker(nil, se_obj:clsid())) then
L129 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
smr_debug.get_log().info("civilwar/relations", "not a stalker: %s in squad %s", se_obj:section_name(), squad:section_name())
L132 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
smr_debug.get_log().info("civilwar/relations", "setting up relations for %s in squad %s", se_obj:section_name(), squad:section_name())
L133 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
se_obj:force_set_goodwill(-5000, sim:object(0))
L133 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
se_obj:force_set_goodwill(-5000, sim:object(0))

smr_loot.script

L439 🟢 table_insert_append
table.insert(useful_tier1, v) -> useful_tier1[#useful_tier1+1] = v
Impact: high
Show code
table.insert(useful_tier1, "device_glowstick_orange")
L440 🟢 table_insert_append
table.insert(useful_tier1, v) -> useful_tier1[#useful_tier1+1] = v
Impact: high
Show code
table.insert(useful_tier1, "device_glowstick_red")
L441 🟢 table_insert_append
table.insert(useful_tier1, v) -> useful_tier1[#useful_tier1+1] = v
Impact: high
Show code
table.insert(useful_tier1, "device_glowstick_blue")
L442 🟢 table_insert_append
table.insert(useful_tier1, v) -> useful_tier1[#useful_tier1+1] = v
Impact: high
Show code
table.insert(useful_tier1, "device_glowstick")
L445 🟢 table_insert_append
table.insert(useful_tier1, v) -> useful_tier1[#useful_tier1+1] = v
Impact: high
Show code
table.insert(useful_tier1, "lockpick")
L446 🟢 table_insert_append
table.insert(useful_tier1, v) -> useful_tier1[#useful_tier1+1] = v
Impact: high
Show code
table.insert(useful_tier1, "bundle_lockpick")
L447 🟢 table_insert_append
table.insert(useful_tier2, v) -> useful_tier2[#useful_tier2+1] = v
Impact: high
Show code
table.insert(useful_tier2, "lockpick_set")
L448 🟢 table_insert_append
table.insert(useful_tier4, v) -> useful_tier4[#useful_tier4+1] = v
Impact: high
Show code
table.insert(useful_tier4, "skeleton_key")
L451 🟢 table_insert_append
table.insert(repair_tier1, v) -> repair_tier1[#repair_tier1+1] = v
Impact: high
Show code
table.insert(repair_tier1, "ramrod_tool")
L452 🟢 table_insert_append
table.insert(repair_tier1, v) -> repair_tier1[#repair_tier1+1] = v
Impact: high
Show code
table.insert(repair_tier1, "rasp_tool")
L453 🟢 table_insert_append
table.insert(repair_tier1, v) -> repair_tier1[#repair_tier1+1] = v
Impact: high
Show code
table.insert(repair_tier1, "sewing_thread")
L454 🟢 table_insert_append
table.insert(repair_tier2, v) -> repair_tier2[#repair_tier2+1] = v
Impact: high
Show code
table.insert(repair_tier2, "heavy_sewing_thread")
L315 🟢 uncached_globals_summary
Cache 1 globals in try_spawn_ammo
Impact: medium
Show code
L316: math.random L318: math.random
L341 🟡 unused_local_variable
Local variable 'f' is assigned but never used
Impact: low
Show code
local f = factor or 1

smr_monkey_glitch_tab.script

L1 🔴 global_write
Global write: SetActiveSubdialog
Impact: low
Show code
SetActiveSubdialog = pda.set_active_subdialog

smr_pop.script

L94 🟢 table_insert_append
table.insert(mutant_spawn_squads, v) -> mutant_spawn_squads[#mutant_spawn_squads+1] = v
Impact: high
Show code
table.insert(mutant_spawn_squads, v)
L111 🟢 table_insert_append
table.insert(unused_mutant_spawn_table[mn[1]], v) -> unused_mutant_spawn_table[mn[1]][#unused_mutant_spawn_table[mn[1]]+1] = v
Impact: high
Show code
table.insert(unused_mutant_spawn_table[mn[1]], v)
L124 🟢 table_insert_append
table.insert(zombie_spawn_table, v) -> zombie_spawn_table[#zombie_spawn_table+1] = v
Impact: high
Show code
table.insert(zombie_spawn_table, s)
L130 🟢 table_insert_append
table.insert(zombie_spawn_table, v) -> zombie_spawn_table[#zombie_spawn_table+1] = v
Impact: high
Show code
table.insert(zombie_spawn_table, "simulation_zombie")
L141 🟢 table_insert_append
table.insert(faction_spawn_table, v) -> faction_spawn_table[#faction_spawn_table+1] = v
Impact: high
Show code
table.insert(faction_spawn_table, n)
L146 🟢 table_insert_append
table.insert(faction_spawn_table, v) -> faction_spawn_table[#faction_spawn_table+1] = v
Impact: high
Show code
table.insert(faction_spawn_table, "stalker")
L172 🟢 table_insert_append
table.insert(mutant_spawn_table, v) -> mutant_spawn_table[#mutant_spawn_table+1] = v
Impact: high
Show code
table.insert(mutant_spawn_table, m)
L176 🟢 table_insert_append
table.insert(mutant_spawn_table, v) -> mutant_spawn_table[#mutant_spawn_table+1] = v
Impact: high
Show code
table.insert(mutant_spawn_table, "chimera_")
L185 🟢 string_len
string.len(m) -> #m
Impact: low
Show code
if (string.sub(section, 1, string.len(m)) == m) then
L315 🟢 string_len
string.len("simulation_") -> #"simulation_"
Impact: low
Show code
if (string.sub(orig_spawn, 1, string.len("simulation_")) == "simulation_")
L220 🟢 uncached_globals_summary
Cache 1 globals in try_spawn_faction
Impact: medium
Show code
L227: math.random L228: math.random
L288 🟢 uncached_globals_summary
Cache 1 globals in smr_handle_spawn
Impact: medium
Show code
L299: math.random L308: math.random

smr_spawn_template.script

L1 🔴 global_write
Global write: template_cfg
Impact: low
Show code
template_cfg = {}
L2 🔴 global_write
Global write: template_cfg_weights
Impact: low
Show code
template_cfg_weights = {}
L7 🔴 global_write
Global write: template_cfg
Impact: low
Show code
template_cfg = load_template_config()
L21 🔴 global_write
Global write: lc
Impact: low
Show code
lc = ini:line_count(section)
L94 🔴 global_write
Global write: weeks
Impact: low
Show code
weeks = math.floor(days/7)
L95 🔴 global_write
Global write: weeks
Impact: low
Show code
if weeks > 3 then weeks = 3 end

smr_spawns_mcm.script

L15 🟢 table_insert_append
table.insert(flist, v) -> flist[#flist+1] = v
Impact: high
Show code
table.insert(flist, {"plugins\\zcp\\spawn_templates\\" .. file_name, file_name })

smr_squad.script

L53 🟢 string_len
string.len(m) -> #m
Impact: low
Show code
if (string.sub(section, 1, string.len(m)) == m) then

smr_utils.script

L45 🟢 table_insert_append
table.insert(tmp, v) -> tmp[#tmp+1] = v
Impact: high
Show code
table.insert(tmp, sq)
L42 🔴 global_write
Global write: lc
Impact: low
Show code
lc = ini:line_count(section)
L52 🔴 global_write
Global write: lc
Impact: low
Show code
lc = ini:line_count(section)
L61 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, sq, count = ini:r_line(section,line,"","")

tasks_fetch.script

L325 🟢 repeated_npc_id()
npc:id() called 3x in <global>
Impact: low
Show code
Cache npc:id() result
L189 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR: fetch_reward_and_remove | no fetch item found!")
L194 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Warning: fetch_reward_and_remove | total_cost is below 50")
L266 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR xr_effects.remove_artefact_item | no var found for %s", p[1])
L445 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR: %s | fetch list [%s] is invalid", p[1], p[2])
L552 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: xr_effects:setup_generic_fetch_task - invalid section %s",sec)
L740 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! WARNING: fetch_list.ltx | wrong section name [%s]", id)
L634 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local item = section and actor:object(section)
L657 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
if actor:object(section .. "_af_aam")
L658 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
or actor:object(section .. "_af_iam")
L659 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
or actor:object(section .. "_af_aac")
L660 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
or actor:object(section .. "_lead_box")
L124 🟡 unused_local_variable
Local variable 'sim' is assigned but never used
Impact: low
Show code
local sim = alife()

ui_mm_faction_select.script

L201 🟢 table_insert_append
table.insert(start_pos, v) -> start_pos[#start_pos+1] = v
Impact: high
Show code
table.insert(start_pos,ini_map:r_float_ex(start_location, "lvid"))
L202 🟢 table_insert_append
table.insert(start_pos, v) -> start_pos[#start_pos+1] = v
Impact: high
Show code
table.insert(start_pos,ini_map:r_float_ex(start_location, "gvid"))
L203 🟢 table_insert_append
table.insert(start_pos, v) -> start_pos[#start_pos+1] = v
Impact: high
Show code
table.insert(start_pos,vector():set(ini_map:r_float_ex(start_location,"x"),ini_map:r_float_ex(start_location,"y"),ini_map:r_float_ex(start_location,"z")))
L1130 🟢 table_insert_append
table.insert(self.table_icon, v) -> self.table_icon[#self.table_icon+1] = v
Impact: high
Show code
table.insert(self.table_icon, def_icon)
L1137 🟢 table_insert_append
table.insert(self.table_icon, v) -> self.table_icon[#self.table_icon+1] = v
Impact: high
Show code
table.insert(self.table_icon, id)
L1151 🟢 table_insert_append
table.insert(self.table_map, v) -> self.table_map[#self.table_map+1] = v
Impact: high
Show code
table.insert(self.table_map, "random_location")
L1161 🟢 table_insert_append
table.insert(self.table_map, v) -> self.table_map[#self.table_map+1] = v
Impact: high
Show code
table.insert(self.table_map, id)
L1164 🟢 table_insert_append
table.insert(self.table_map, v) -> self.table_map[#self.table_map+1] = v
Impact: high
Show code
table.insert(self.table_map, id)
L43 🟢 uncached_globals_summary
Cache 2 globals in on_game_load
Impact: medium
Show code
L57: tostring L57: tostring L57: math.random L57: math.random
L406 🟢 uncached_globals_summary
Cache 2 globals in __init
Impact: medium
Show code
L446: tonumber L457: tonumber L447: tostring L458: tostring
L1180 🟢 uncached_globals_summary
Cache 2 globals in LoadLoadout
Impact: medium
Show code
L1186: tostring L1187: tostring L1198: tonumber L1198: tonumber
L1528 🟡 string_concat_in_loop
String concat in loop: str_stats = str_stats .. x
Impact: critical
Show code
str_stats = str_stats .. "%c[0,150,150,150]� %c[0,50,175,50]" .. game.translate_string("st_faction_" .. k) .. "\\n"
L1688 🟡 string_concat_in_loop
String concat in loop: loadout_str = loadout_str .. x
Impact: critical
Show code
loadout_str = loadout_str .. "," .. ci.section
L1252 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("sec: %s | points: %s | points left: %s", ci.section, points, self.points_left)
L307 🟡 unused_local_variable
Local variable 'sim' is assigned but never used
Impact: low
Show code
local sim = alife()
L1195 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, sec, value = ini_itm:r_line(self.selected_faction .. "_loadout" , i , "", "")
L1618 🟡 unused_local_variable
Local variable 'bind' is assigned but never used
Impact: low
Show code
local bind = dik_to_bind(dik)

261- Ammo Check - Ishmaeel

1 file (🟢0 🟡6 🔴17 🔵2)

ammo_check_mcm.script

L41 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![AC] " .. msg, ...)
L49 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
if dbg_log then dbg_log:log(msg, ...) end
L115 🔴 global_write
Global write: gc
Impact: low
Show code
gc = game.translate_string
L118 🔴 global_write
Global write: get_data
Impact: low
Show code
get_data = magazine_binder.get_data
L119 🔴 global_write
Global write: set_data
Impact: low
Show code
set_data = magazine_binder.set_data
L120 🔴 global_write
Global write: get_mag_loaded
Impact: low
Show code
get_mag_loaded = magazine_binder.get_mag_loaded or get_mag_loaded_shim -- get_mag_loaded does not exist in moddb version. MagsRedux needs update.
L121 🔴 global_write
Global write: is_supported_weapon
Impact: low
Show code
is_supported_weapon = magazine_binder.is_supported_weapon
L122 🔴 global_write
Global write: is_jammed_weapon
Impact: low
Show code
is_jammed_weapon = magazines.is_jammed_weapon
L123 🔴 global_write
Global write: get_sec_chambered
Impact: low
Show code
get_sec_chambered = magazines.get_sec_chambered
L126 🔴 global_write
Global write: get_data
Impact: low
Show code
get_data = null_function -- Should not be called, just in case.
L127 🔴 global_write
Global write: set_data
Impact: low
Show code
set_data = null_function -- Should not be called, just in case.
L128 🔴 global_write
Global write: is_supported_weapon
Impact: low
Show code
is_supported_weapon = null_function -- Always returns false, meaning none of the weapons are supported, fall back on vanilla ammo handling.
L129 🔴 global_write
Global write: get_mag_loaded
Impact: low
Show code
get_mag_loaded = null_function -- There is never a loaded magazine in vanilla.
L130 🔴 global_write
Global write: is_jammed_weapon
Impact: low
Show code
is_jammed_weapon = null_function -- Sadly, standalone mode does not report weapon jams for now.
L131 🔴 global_write
Global write: get_sec_chambered
Impact: low
Show code
get_sec_chambered = null_function -- No "one-in-the-chamber" feature in vanilla.
L144 🔴 global_write
Global write: ch_options
Impact: low
Show code
ch_options = {
L181 🔴 global_write
Global write: pos
Impact: low
Show code
pos = ActorMenu.get_maingame().m_ui_hud_states.m_ui_weapon_cur_ammo:GetWndPos()
L185 🔴 global_write
Global write: pos
Impact: low
Show code
pos = ActorMenu.get_maingame().m_ui_hud_states.m_ui_weapon_icon:GetWndPos()
L268 🔴 global_write
Global write: idx
Impact: low
Show code
idx = l_round((curAmmoPerc * 10) + .5) -- gives an integer value n for the decile of curAmmoPerc and 11 for full.
L201 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local weaponId = weapon:id()
L206 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local currentState = weapon:get_state()
L207 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
if not (currentState == 0 or weapon:weapon_in_grenade_mode()) then
L212 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local currentAmmo = weapon:get_ammo_in_magazine()
L217 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local sec = weapon:section()
L225 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
elseif weapon:weapon_in_grenade_mode() then

262- MP412 Rex Reanimation - Aoldri

6 files (🟢3 🟡3 🔴7 🔵2)

animation_common.script

L31 🟢 table_insert_append
table.insert(anim_mutators, v) -> anim_mutators[#anim_mutators+1] = v
Impact: high
Show code
table.insert(anim_mutators, {functor=functor, priority=priority})

aol_anim_transitions.script

L30 🟢 table_insert_append
table.insert(pattern_transitions[hud_section], v) -> pattern_transitions[hud_section][#pattern_transitions[hud_section]+1] = v
Impact: high
Show code
table.insert(pattern_transitions[hud_section], {
L8 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L25 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L3 🔴 global_write
Global write: transitions
Impact: low
Show code
transitions = {
L19 🔴 global_write
Global write: pattern_transitions
Impact: low
Show code
pattern_transitions = {
L44 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_items:r_line_ex(section,i,"","")

aol_mp412_hangfire.script

L3 🟡 potential_nil_access
Potential nil access: 'active_item' from :active_item() used without nil check
Impact: low
Show code
local wpn = active_item and active_item:cast_Weapon()

aol_mp412_monkeypatches.script

L2 🔴 global_write
Global write: ui_inventory_UIInventory_RMode_UpgradeYes
Impact: low
Show code
ui_inventory_UIInventory_RMode_UpgradeYes = ui_inventory.UIInventory.RMode_UpgradeYes
L25 🔴 global_write
Global write: ui_workshop_UIWorkshopUpgrade_Upgrade
Impact: low
Show code
ui_workshop_UIWorkshopUpgrade_Upgrade = ui_workshop.UIWorkshopUpgrade.Upgrade
L71 🔴 global_write
Global write: hasCraftedItem
Impact: low
Show code
hasCraftedItem = true
L83 🔴 global_write
Global write: item_weapon_attach_scope
Impact: low
Show code
item_weapon_attach_scope = item_weapon.attach_scope

aol_mp412_scopes.script

L21 🟢 repeated_weapon_section()
weapon:section() called 3x in attach_scope
Impact: low
Show code
Cache weapon:section() result
L35 🟡 unused_local_variable
Local variable 'new_weapon' is assigned but never used
Impact: low
Show code
local new_weapon = old_weapon and alife_clone_weapon(old_weapon, child_section)

aol_sprint_cancel.script

L18 🔴 global_write
Global write: aol_anim_transitions_anm_transitions
Impact: low
Show code
aol_anim_transitions_anm_transitions = aol_anim_transitions.anm_transitions

264- Barry's Better Knives Animations - BarryBogs

3 files (🟢2 🟡1 🔴3 🔵2)

animation_common.script

L31 🟢 table_insert_append
table.insert(anim_mutators, v) -> anim_mutators[#anim_mutators+1] = v
Impact: high
Show code
table.insert(anim_mutators, {functor=functor, priority=priority})

aol_anim_transitions.script

L30 🟢 table_insert_append
table.insert(pattern_transitions[hud_section], v) -> pattern_transitions[hud_section][#pattern_transitions[hud_section]+1] = v
Impact: high
Show code
table.insert(pattern_transitions[hud_section], {
L8 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L25 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L3 🔴 global_write
Global write: transitions
Impact: low
Show code
transitions = {
L19 🔴 global_write
Global write: pattern_transitions
Impact: low
Show code
pattern_transitions = {
L44 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_items:r_line_ex(section,i,"","")

aol_sprint_cancel.script

L18 🔴 global_write
Global write: aol_anim_transitions_anm_transitions
Impact: low
Show code
aol_anim_transitions_anm_transitions = aol_anim_transitions.anm_transitions

265- NPCs Die in Emissions for Real - TheMrDemonized

9 files (🟢7 🟡17 🔴31 🔵37)

demonized_time_events.script

L24 🟢 uncached_globals_summary
Cache 1 globals in print_table
Impact: medium
Show code
L33: type L35: type
L36 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = function",k)
L39 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s",k,utils_data.vector_to_string(v))
L41 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = userdata", k)
L46 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = true",k)
L48 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = true")
L52 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = false", k)
L54 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = false")
L59 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s", k,v)
L61 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = nil", k,v)
L205 🟡 unused_local_variable
Local variable 'tg_past' is assigned but never used
Impact: low
Show code
local tg_past = 0

surge_manager.script

L300 🟢 uncached_globals_summary
Cache 1 globals in new_surge_time
Impact: medium
Show code
L306: math.floor L311: math.floor
L371 🟢 uncached_globals_summary
Cache 1 globals in end_surge
Impact: medium
Show code
L397: pairs L402: pairs
L601 🟢 uncached_globals_summary
Cache 1 globals in update
Impact: medium
Show code
L632: math.ceil L673: math.ceil
L1377 🟢 repeated_npc_section()
npc:section() called 3x in kill_objects_at_pos
Impact: low
Show code
Cache npc:section() result
L102 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Surge manager | " .. fmt, ...)
L597 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("played sound at x=%s z=%s", rnd_pos.x, rnd_pos.z)
L723 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Played far crows")
L759 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("opt_blowout_task", ui_options.get("alife/event/emission_task"))
L25 🔴 global_write
Global write: SurgeManager
Impact: low
Show code
SurgeManager = nil
L27 🔴 global_write
Global write: SurgeManager
Impact: low
Show code
SurgeManager = SurgeManager or CSurgeManager()
L461 🔴 global_write
Global write: temp1
Impact: low
Show code
temp1, id, temp2 = ini:r_line("list", i, "", "")
L461 🔴 global_write
Global write: id
Impact: low
Show code
temp1, id, temp2 = ini:r_line("list", i, "", "")
L461 🔴 global_write
Global write: temp2
Impact: low
Show code
temp1, id, temp2 = ini:r_line("list", i, "", "")
L521 🔴 global_write
Global write: protection
Impact: low
Show code
protection = (suit_protection + helmet_protection + drug_protection)
L523 🔴 global_write
Global write: protection
Impact: low
Show code
protection = 1
L525 🔴 global_write
Global write: hit_power
Impact: low
Show code
hit_power = power * (1 - protection)
L1219 🔴 global_write
Global write: currentIndik
Impact: low
Show code
currentIndik = nil
L1234 🔴 global_write
Global write: currentIndik
Impact: low
Show code
currentIndik = indik
L1336 🟡 potential_nil_access
Potential nil access: 'crow' from level.object_by_id() used without nil check
Impact: low
Show code
if crow and crow:alive() and pos < crow:position().z then
L1336 🟡 potential_nil_access
Potential nil access: 'crow' from level.object_by_id() used without nil check
Impact: low
Show code
if crow and crow:alive() and pos < crow:position().z then
L1382 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
se_npc = sim:object(id)
L1386 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
squad = squad_id and squad_id ~= 65535 and sim:object(squad_id)
L49 🟡 unused_local_variable
Local variable 'presurge_time' is assigned but never used
Impact: low
Show code
local presurge_time = 0
L471 🟡 unused_local_variable
Local variable 'artefact_factors' is assigned but never used
Impact: low
Show code
local artefact_factors = { 10, 5, 10, 10, 10 }
L1358 🟡 unused_local_variable
Local variable 'smart' is assigned but never used
Impact: low
Show code
local id, comm, npc_pos, se_npc, npc, squad, squad_id, smart, surge_smart
L1359 🟡 unused_local_variable
Local variable 'board' is assigned but never used
Impact: low
Show code
local board = SIMBOARD
L1614 🟡 unused_local_variable
Local variable 'time' is assigned but never used
Impact: low
Show code
local time = 0

surge_manager_faster_emissions.script

L1 🔴 global_write
Global write: sm_initialize
Impact: low
Show code
sm_initialize = surge_manager.CSurgeManager.initialize

surge_manager_ignore_npc.script

L3 🔴 global_write
Global write: ignore_npc
Impact: low
Show code
ignore_npc = {

surge_manager_tb_covers.script

L7 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(error_or_result)
L17 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
_G.printf(str, ...)
L49 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("adding TB based zones surge cover %s, %s", se_obj:name(), se_obj.id)
L71 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("adjusting tb zone position")
L72 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("old: %s %s %s, %s", obj[1].x, obj[1].y, obj[1].z, obj[2])
L73 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("new: %s %s %s, %s", pos.x, pos.y, pos.z, lvid)
L82 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("adding tb zones")
L31 🔴 global_write
Global write: tb
Impact: low
Show code
tb = {}
L32 🔴 global_write
Global write: tb_covers
Impact: low
Show code
tb_covers = {}
L33 🔴 global_write
Global write: tb_cover_radius_sqr
Impact: low
Show code
tb_cover_radius_sqr = 64
L56 🔴 global_write
Global write: tb_covers
Impact: low
Show code
tb_covers = kd_tree.buildTreeSeObjectIds(tb)
L39 🟡 unused_local_variable
Local variable 'curr_level' is assigned but never used
Impact: low
Show code
local curr_level = level.name()

surge_rush_scheme_common.script

L79 🟢 repeated_zone_id()
zone:id() called 4x in build_surge_covers
Impact: low
Show code
Cache zone:id() result
L7 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(error_or_result)
L17 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
_G.printf("SURGE RUSH [" .. script_name() .. "]: " .. str, ...)
L80 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("adding surge cover %s, %s", zone:name(), zone:id())
L88 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("adding tb surge cover %s", tb_ids[i])
L253 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s found cover %s, enable scheme", npc:name(), lvid)
L274 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("surge start")
L31 🔴 global_write
Global write: busy_lvids
Impact: low
Show code
busy_lvids = {}
L65 🔴 global_write
Global write: surge_covers
Impact: low
Show code
surge_covers = nil
L66 🔴 global_write
Global write: vanilla_covers
Impact: low
Show code
vanilla_covers = nil
L67 🔴 global_write
Global write: tb_ids
Impact: low
Show code
tb_ids = surge_manager_tb_covers.tb
L68 🔴 global_write
Global write: tb_covers
Impact: low
Show code
tb_covers = surge_manager_tb_covers.tb_covers
L69 🔴 global_write
Global write: tb_cover_radius_sqr
Impact: low
Show code
tb_cover_radius_sqr = surge_manager_tb_covers.tb_cover_radius_sqr
L92 🔴 global_write
Global write: surge_covers
Impact: low
Show code
surge_covers = kd_tree.buildTreeSeObjectIds(srs)
L93 🔴 global_write
Global write: vanilla_covers
Impact: low
Show code
vanilla_covers = kd_tree.buildTreeSeObjectIds(vanilla)
L102 🔴 global_write
Global write: last_surge_time
Impact: low
Show code
last_surge_time = nil
L108 🔴 global_write
Global write: surge_ignore_communities
Impact: low
Show code
surge_ignore_communities = {
L273 🔴 global_write
Global write: last_surge_time
Impact: low
Show code
last_surge_time = game.get_game_time()
L64 🟡 unused_local_variable
Local variable 'squads' is assigned but never used
Impact: low
Show code
local squads = {}
L74 🟡 unused_local_variable
Local variable 'curr_level' is assigned but never used
Impact: low
Show code
local curr_level = level.name()

surge_rush_scheme_evaluator_inside.script

L7 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(error_or_result)
L17 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
_G.printf("SURGE RUSH [" .. script_name() .. "]: " .. str, ...)
L52 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("npc %s enable surge rush scheme", npc:name())
L109 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("npc %s disable surge rush scheme", npc:name())
L178 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("axr_panic: no action id p[%s]",i)
L23 🔴 global_write
Global write: actid
Impact: low
Show code
actid = 198192
L24 🔴 global_write
Global write: evaid
Impact: low
Show code
evaid = 198192
L174 🟡 potential_nil_access
Potential nil access: 'manager' from :motivation_action_manager() used without nil check
Impact: low
Show code
action = manager:action(p[i])

surge_rush_scheme_evaluator_outside.script

L7 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(error_or_result)
L17 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
_G.printf("SURGE RUSH [" .. script_name() .. "]: " .. str, ...)
L47 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("npc %s enable surge rush scheme", npc:name())
L104 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("npc %s disable surge rush scheme", npc:name())
L174 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("axr_panic: no action id p[%s]",i)
L23 🔴 global_write
Global write: actid
Impact: low
Show code
actid = 198193
L24 🔴 global_write
Global write: evaid
Impact: low
Show code
evaid = 198193
L170 🟡 potential_nil_access
Potential nil access: 'manager' from :motivation_action_manager() used without nil check
Impact: low
Show code
action = manager:action(p[i])

zz_surge_manager_npc_die.script

L39 🟢 repeated_npc_section()
npc:section() called 3x in <global>
Impact: low
Show code
Cache npc:section() result
L4 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Psi-Storm Manager | " .. fmt,...)
L43 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
se_npc = sim:object(id)
L45 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
squad = squad_id and sim:object(squad_id)

268- VSSK Reanimation and Remodel - BarryBogs

7 files (🟢9 🟡5 🔴13 🔵3)

animation_common.script

L31 🟢 table_insert_append
table.insert(anim_mutators, v) -> anim_mutators[#anim_mutators+1] = v
Impact: high
Show code
table.insert(anim_mutators, {functor=functor, priority=priority})

aol_anim_transitions.script

L6 🟢 table_insert_append
table.insert(valid_anims, v) -> valid_anims[#valid_anims+1] = v
Impact: high
Show code
table.insert(valid_anims, anm_suffix)
L37 🟢 table_insert_append
table.insert(pattern_transitions[hud_section], v) -> pattern_transitions[hud_section][#pattern_transitions[hud_section]+1] = v
Impact: high
Show code
table.insert(pattern_transitions[hud_section], {
L99 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L128 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L15 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L32 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L3 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L10 🔴 global_write
Global write: transitions
Impact: low
Show code
transitions = {
L26 🔴 global_write
Global write: pattern_transitions
Impact: low
Show code
pattern_transitions = {
L162 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L51 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_items:r_line_ex(section,i,"","")

aol_sprint_cancel.script

L16 🔴 global_write
Global write: aol_anim_transitions_anm_transitions
Impact: low
Show code
aol_anim_transitions_anm_transitions = aol_anim_transitions.anm_transitions

trader_autoinject.script

L34 🟢 repeated_npc_id()
npc:id() called 3x in trade_manager.update
Impact: low
Show code
Cache npc:id() result
L182 🟢 repeated_item_section()
item:section() called 4x in itr_inv
Impact: low
Show code
Cache item:section() result
L16 🔴 global_write
Global write: find
Impact: low
Show code
find = string.find
L32 🔴 global_write
Global write: TraderUpdate
Impact: low
Show code
TraderUpdate = trade_manager.update

vks_custom.script

L50 🟢 table_insert_append
table.insert(bore_anims, v) -> bore_anims[#bore_anims+1] = v
Impact: high
Show code
table.insert(bore_anims, {anm = "anm_bore"})
L51 🟢 table_insert_append
table.insert(bore_anims, v) -> bore_anims[#bore_anims+1] = v
Impact: high
Show code
table.insert(bore_anims, {anm = "anm_ammo_check", snd = "snd_ammo_check"})
L62 🟢 table_insert_append
table.insert(bore_anims, v) -> bore_anims[#bore_anims+1] = v
Impact: high
Show code
table.insert(bore_anims, {anm = "anm_bore_empty"})
L63 🟢 table_insert_append
table.insert(bore_anims, v) -> bore_anims[#bore_anims+1] = v
Impact: high
Show code
table.insert(bore_anims, {anm = "anm_ammo_check_empty", snd = "snd_ammo_check"})
L5 🔴 global_write
Global write: n
Impact: low
Show code
n = ini_sys:line_count(snd_path) or 0
L7 🔴 global_write
Global write: result
Impact: low
Show code
result, id, value = ini_sys:r_line_ex(snd_path,i,"","")
L7 🔴 global_write
Global write: id
Impact: low
Show code
result, id, value = ini_sys:r_line_ex(snd_path,i,"","")
L7 🔴 global_write
Global write: value
Impact: low
Show code
result, id, value = ini_sys:r_line_ex(snd_path,i,"","")
L76 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
if key == DIK_keys.MOUSE_2 and arti_jamming and weapon and weapon:get_state() == 4 then

vks_trade_inject.script

L81 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! Trader has no supplies [%s] - [%s]", npc_name, supply_level)
L95 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update
L67 🟡 unused_local_variable
Local variable 'format_table' is assigned but never used
Impact: low
Show code
local format_table = utils_data.print_table

wpn_sway_enable.script

L4 🔴 global_write
Global write: valid_wpns
Impact: low
Show code
valid_wpns = {

27- Fairer Thermal Anomalies - Tweaki_Breeki

1 file (🟢5 🟡0 🔴0 🔵0)

TB_Fairer_Thermal_Anomalies.script

L38 🟢 table_insert_append
table.insert(tb_thermals, v) -> tb_thermals[#tb_thermals+1] = v
Impact: high
Show code
table.insert(tb_thermals,{i,objpos,se_obj})
L40 🟢 table_insert_append
table.insert(tb_thermals, v) -> tb_thermals[#tb_thermals+1] = v
Impact: high
Show code
table.insert(tb_thermals,{i,objpos,se_obj})
L43 🟢 table_insert_append
table.insert(tb_thermals, v) -> tb_thermals[#tb_thermals+1] = v
Impact: high
Show code
table.insert(tb_thermals,{i,objpos,se_obj})
L65 🟢 uncached_globals_summary
Cache 1 globals in makesparks
Impact: medium
Show code
L66: math.random L68: math.random
L74 🟢 uncached_globals_summary
Cache 1 globals in makecrackles
Impact: medium
Show code
L75: math.random L78: math.random

270- Headlamp Animation Fix - RavenAscendant

2 files (🟢0 🟡0 🔴3 🔵0)

grok_gotta_go_fast.script

L10 🔴 global_write
Global write: run_coeff
Impact: low
Show code
run_coeff = grok_gotta_go_fast_mcm.get_config("gotta_go_fast_run")
L11 🔴 global_write
Global write: sprint_coeff
Impact: low
Show code
sprint_coeff = grok_gotta_go_fast_mcm.get_config("gotta_go_fast_sprint")

grok_gotta_go_fast_mcm.script

L12 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "gggf",sh=true ,gr={

274- Dark Signal Audio Pack - Shrike

2 files (🟢0 🟡1 🔴1 🔵0)

eft_rattle.script

L14 🟡 potential_nil_access
Potential nil access: 'player' from db.actor() used without nil check
Impact: low
Show code
if not (player and player:alive()) then return end

eft_rattle_mcm.script

L2 🔴 global_write
Global write: op
Impact: low
Show code
op = {

277- Tommy Gun - Firebreath

8 files (🟢9 🟡2 🔴23 🔵5)

animation_common.script

L31 🟢 table_insert_append
table.insert(anim_mutators, v) -> anim_mutators[#anim_mutators+1] = v
Impact: high
Show code
table.insert(anim_mutators, {functor=functor, priority=priority})

aol_anim_transitions.script

L28 🟢 table_insert_append
table.insert(pattern_transitions[hud_section], v) -> pattern_transitions[hud_section][#pattern_transitions[hud_section]+1] = v
Impact: high
Show code
table.insert(pattern_transitions[hud_section], {
L6 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L23 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L1 🔴 global_write
Global write: transitions
Impact: low
Show code
transitions = {
L17 🔴 global_write
Global write: pattern_transitions
Impact: low
Show code
pattern_transitions = {
L42 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_items:r_line_ex(section,i,"","")

aol_sprint_cancel.script

L18 🔴 global_write
Global write: aol_anim_transitions_actor_on_hud_animation_play
Impact: low
Show code
aol_anim_transitions_actor_on_hud_animation_play = aol_anim_transitions.actor_on_hud_animation_play

loadouts_injector.script

L131 🟢 uncached_globals_summary
Cache 1 globals in xrs_rnd_npc_loadout.create_item_on_npc
Impact: medium
Show code
L159: math.random L163: math.random
L189 🟢 uncached_globals_summary
Cache 1 globals in create_item
Impact: medium
Show code
L202: math.random L205: math.random
L222 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR: NPC Loadouts | wrong ammo_type set for [%s], missing value in ammo_class", section)
L52 🔴 global_write
Global write: tmp
Impact: low
Show code
tmp = ini_loadouts:r_string_ex("settings","scope_chance")
L54 🔴 global_write
Global write: tmp
Impact: low
Show code
tmp = str_explode(tmp,",")
L74 🔴 global_write
Global write: tmp
Impact: low
Show code
tmp = str_explode(id,":")
L92 🔴 global_write
Global write: tokens
Impact: low
Show code
tokens = str_explode(loadout, "_")
L106 🔴 global_write
Global write: faction
Impact: low
Show code
faction, rank, slot = unpack(tokens)
L106 🔴 global_write
Global write: rank
Impact: low
Show code
faction, rank, slot = unpack(tokens)
L106 🔴 global_write
Global write: slot
Impact: low
Show code
faction, rank, slot = unpack(tokens)
L107 🔴 global_write
Global write: slot
Impact: low
Show code
slot = slots[slot]
L117 🔴 global_write
Global write: l
Impact: low
Show code
l = custom_loadouts[faction][rank][slot]
L130 🔴 global_write
Global write: CreateItem
Impact: low
Show code
CreateItem = xrs_rnd_npc_loadout.create_item_on_npc
L177 🔴 global_write
Global write: id
Impact: low
Show code
id = custom_tbl[pick]
L115 🟡 unused_local_variable
Local variable 'value' is assigned but never used
Impact: low
Show code
local _, id, value = ini_wep_loadouts:r_line_ex(weapons,i)

m1a1_autoinject.script

L50 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update

new_game_loadout_injector_mcm.script

L188 🟢 table_insert_append
table.insert(loadout_items[item_table.section], v) -> loadout_items[item_table.section][#loadout_items[item_table.section]+1] = v
Impact: high
Show code
table.insert(loadout_items[item_table.section], item_table)
L145 🟢 uncached_globals_summary
Cache 1 globals in add_item
Impact: medium
Show code
L146: type L159: type
L211 🟢 uncached_globals_summary
Cache 1 globals in ui_mm_faction_select.UINewGame.LoadLoadout
Impact: medium
Show code
L218: pairs L227: pairs
L78 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Loadout Injector: " .. str, ...)
L82 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!Loadout Injector: ERROR, " .. str, ...)
L109 🔴 global_write
Global write: loadout_items
Impact: low
Show code
loadout_items = {}
L112 🔴 global_write
Global write: loadout_removed_items
Impact: low
Show code
loadout_removed_items = {}

trader_autoinject.script

L34 🟢 repeated_npc_id()
npc:id() called 3x in trade_manager.update
Impact: low
Show code
Cache npc:id() result
L182 🟢 repeated_item_section()
item:section() called 4x in itr_inv
Impact: low
Show code
Cache item:section() result
L16 🔴 global_write
Global write: find
Impact: low
Show code
find = string.find
L32 🔴 global_write
Global write: TraderUpdate
Impact: low
Show code
TraderUpdate = trade_manager.update

z_parts_inject.script

L1 🔴 global_write
Global write: cached_r_string_ex
Impact: low
Show code
cached_r_string_ex = itms_manager.ini_parts.r_string_ex
L2 🔴 global_write
Global write: cached_parse_list
Impact: low
Show code
cached_parse_list = _G.parse_list
L3 🔴 global_write
Global write: parts_custom
Impact: low
Show code
parts_custom = {}
L4 🔴 global_write
Global write: parts_custom_ini
Impact: low
Show code
parts_custom_ini = {

279- Crafting Info in Tooltips - Utjan

2 files (🟢1 🟡4 🔴18 🔵4)

craft_use_in_tooltip_mcm.script

L1 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("1057 error fix")

zzz_craft_use_in_tooltip_mcm.script

L286 🟢 uncached_globals_summary
Cache 1 globals in getCraftableItems
Impact: medium
Show code
L294: pairs L306: pairs
L403 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str = str .. ","
L428 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str = str .. ","
L14 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(error_or_result)
L415 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! Craft Info in Tooltip | Could not find inv name of section " .. craftable_sec)
L437 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! Craft Info in Tooltip | Could not find inv name of section " .. meal_sec)
L25 🔴 global_write
Global write: og_info_item_init
Impact: low
Show code
og_info_item_init = utils_ui.UIInfoItem.__init
L181 🔴 global_write
Global write: og_info_item_update
Impact: low
Show code
og_info_item_update = utils_ui.UIInfoItem.Update
L292 🔴 global_write
Global write: result
Impact: low
Show code
result, ingredients, item = ini_craft:r_line_ex(section,i,"","")
L292 🔴 global_write
Global write: ingredients
Impact: low
Show code
result, ingredients, item = ini_craft:r_line_ex(section,i,"","")
L292 🔴 global_write
Global write: item
Impact: low
Show code
result, ingredients, item = ini_craft:r_line_ex(section,i,"","")
L304 🔴 global_write
Global write: result
Impact: low
Show code
result, recipe_name, info = ini_craft:r_line_ex(section,i,"","")
L304 🔴 global_write
Global write: recipe_name
Impact: low
Show code
result, recipe_name, info = ini_craft:r_line_ex(section,i,"","")
L304 🔴 global_write
Global write: info
Impact: low
Show code
result, recipe_name, info = ini_craft:r_line_ex(section,i,"","")
L359 🔴 global_write
Global write: result
Impact: low
Show code
result, recipe_name, info = ini_cook:r_line_ex("meal_list",i,"","")
L359 🔴 global_write
Global write: recipe_name
Impact: low
Show code
result, recipe_name, info = ini_cook:r_line_ex("meal_list",i,"","")
L359 🔴 global_write
Global write: info
Impact: low
Show code
result, recipe_name, info = ini_cook:r_line_ex("meal_list",i,"","")
L479 🔴 global_write
Global write: base_build_desc_footer
Impact: low
Show code
base_build_desc_footer = ui_item.build_desc_footer
L482 🔴 global_write
Global write: base_details_reset
Impact: low
Show code
base_details_reset = ui_itm_details.UIItemSheet.Reset
L487 🔴 global_write
Global write: base_add_recipe
Impact: low
Show code
base_add_recipe = workshop_autoinject.add_new_recipe
L500 🔴 global_write
Global write: base_add_override_recipe
Impact: low
Show code
base_add_override_recipe = workshop_autoinject.add_override_recipe
L509 🔴 global_write
Global write: base_remove_recipe
Impact: low
Show code
base_remove_recipe = workshop_autoinject.remove_existing_recipes
L518 🔴 global_write
Global write: base_clear_recipe
Impact: low
Show code
base_clear_recipe = workshop_autoinject.clear_existing_recipes
L539 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "craft_in_tooltip",sh=true ,gr={
L111 🟡 unused_local_variable
Local variable 'recipes_pos' is assigned but never used
Impact: low
Show code
local recipes_pos = self[cont]:GetWndPos()
L112 🟡 unused_local_variable
Local variable 'recipes_size' is assigned but never used
Impact: low
Show code
local recipes_size = {x = self[cont]:GetWidth(), y = self[cont]:GetHeight()}

28- Black Jack - Feel_Fried

2 files (🟢2 🟡0 🔴200 🔵0)

ui_mod_elements.script

L842 🟢 table_insert_append
table.insert(t, v) -> t[#t+1] = v
Impact: high
Show code
if avail_codicil(name)==true then table.insert(t,w_name) end
L890 🟢 table_getn
table.getn(tbl) -> #tbl
Impact: low
Show code
return tbl[math.random(table.getn(tbl))]
L15 🔴 global_write
Global write: card_game_21_minimum_rate
Impact: low
Show code
card_game_21_minimum_rate=50
L16 🔴 global_write
Global write: value_card_21_max_rate
Impact: low
Show code
value_card_21_max_rate=1000
L20 🔴 global_write
Global write: card_game_21_minimum_rate
Impact: low
Show code
card_game_21_minimum_rate=ui_mcm.get("21_game/card_game_21_minimum_rate")
L21 🔴 global_write
Global write: value_card_21_max_rate
Impact: low
Show code
value_card_21_max_rate=ui_mcm.get("21_game/value_card_21_max_rate")
L27 🔴 global_write
Global write: st_21_point_your_card_value
Impact: low
Show code
st_21_point_your_card_value = 'Âû:'
L28 🔴 global_write
Global write: st_21_point_enemy_card_value
Impact: low
Show code
st_21_point_enemy_card_value = 'Ñîïåðíèê:'
L29 🔴 global_write
Global write: st_21_point_rate_field
Impact: low
Show code
st_21_point_rate_field = 'Âàøà ñòàâêà íà âûèãðûø:'
L30 🔴 global_write
Global write: st_21_point_infoline_1
Impact: low
Show code
st_21_point_infoline_1 = 'Â âàøåì ðþêçàêå äåíåã:'
L31 🔴 global_write
Global write: st_21_point_infoline_2
Impact: low
Show code
st_21_point_infoline_2 = 'Ìèíèìàëüíàÿ ñòàâêà - '..card_game_21_minimum_rate..', ìàêñèìàëüíàÿ ñòàâêà -'
L32 🔴 global_write
Global write: st_21_point_money
Impact: low
Show code
st_21_point_money = 'ðóáëåé.'
L33 🔴 global_write
Global write: st_21_point_info_about_your
Impact: low
Show code
st_21_point_info_about_your = 'Âû: ñòàâêà'
L34 🔴 global_write
Global write: st_21_point_info_about_enemy
Impact: low
Show code
st_21_point_info_about_enemy = 'Ïðîòèâíèê: ñòàâêà'
L35 🔴 global_write
Global write: st_21_point_web_money
Impact: low
Show code
st_21_point_web_money = 'ýëåêòðîííûõ ðóáëåé.'
L36 🔴 global_write
Global write: st_21_point_winner_your_1
Impact: low
Show code
st_21_point_winner_your_1 = 'Âû âûèãðàëè. Âûèãðûø ñîñòàâèë -'
L37 🔴 global_write
Global write: st_21_point_winner_your_2
Impact: low
Show code
st_21_point_winner_your_2 = 'ðóáëåé. Ñóììà î÷êîâ: âû -'
L38 🔴 global_write
Global write: st_21_point_winner_your_3
Impact: low
Show code
st_21_point_winner_your_3 = ', ïðîòèâíèê -'
L39 🔴 global_write
Global write: st_21_point_winner_enemy_1
Impact: low
Show code
st_21_point_winner_enemy_1 = 'Âû ïðîèãðàëè. Ïðîèãðàø ñîñòàâèë -'
L40 🔴 global_write
Global write: st_21_point_winner_enemy_2
Impact: low
Show code
st_21_point_winner_enemy_2 = 'ðóáëåé. Ñóììà î÷êîâ: âû -'
L41 🔴 global_write
Global write: st_21_point_winner_enemy_3
Impact: low
Show code
st_21_point_winner_enemy_3 = ', ïðîòèâíèê -'
L42 🔴 global_write
Global write: st_21_point_winner_equally_1
Impact: low
Show code
st_21_point_winner_equally_1 = 'Íè÷üÿ. Ñóììà î÷êîâ: âû -'
L43 🔴 global_write
Global write: st_21_point_winner_equally_2
Impact: low
Show code
st_21_point_winner_equally_2 = ', ïðîòèâíèê -'
L44 🔴 global_write
Global write: st_21_point_title
Impact: low
Show code
st_21_point_title = 'Èãðà: 21 î÷êî'
L45 🔴 global_write
Global write: st_21_point_dont_money_to_rate
Impact: low
Show code
st_21_point_dont_money_to_rate = 'Ïîâûøåíèå ñòàâêè íåâîçìîæíî: íå õâàòàåò äåíåã.'
L46 🔴 global_write
Global write: st_21_point_dont_take_rate
Impact: low
Show code
st_21_point_dont_take_rate = 'Ïðîäîëæåíèå èãðû íåâîçìîæíî: ñòàâêè íå ñäåëàíû.'
L47 🔴 global_write
Global write: st_21_point_dont_take_rate2
Impact: low
Show code
st_21_point_dont_take_rate2 = 'Òû ïðîñàäèë âñå äåíüãè, ñòàëêåð!'
L48 🔴 global_write
Global write: st_21_point_dont_take_rate3
Impact: low
Show code
st_21_point_dont_take_rate3 = 'Ìèíèìàëüíàÿ ñòàâêà - '..card_game_21_minimum_rate
L49 🔴 global_write
Global write: st_question_game_title
Impact: low
Show code
st_question_game_title = 'Èãðà: ×òî? Ãäå? Êîãäà?'
L50 🔴 global_write
Global write: st_question_game_reward_advice
Impact: low
Show code
st_question_game_reward_advice = 'Çàðàáîòàí ñîâåò:'
L51 🔴 global_write
Global write: st_question_game_reward_money
Impact: low
Show code
st_question_game_reward_money = 'Ïîëó÷åíû äåíüãè:'
L52 🔴 global_write
Global write: st_in_web_money
Impact: low
Show code
st_in_web_money = 'Ïîëó÷åíû äåíüãè:'
L54 🔴 global_write
Global write: st_21_point_your_card_value
Impact: low
Show code
st_21_point_your_card_value = 'You:'
L55 🔴 global_write
Global write: st_21_point_enemy_card_value
Impact: low
Show code
st_21_point_enemy_card_value = 'Opponent:'
L56 🔴 global_write
Global write: st_21_point_rate_field
Impact: low
Show code
st_21_point_rate_field = 'Your bet:'
L57 🔴 global_write
Global write: st_21_point_infoline_1
Impact: low
Show code
st_21_point_infoline_1 = 'Your money left:'
L58 🔴 global_write
Global write: st_21_point_infoline_2
Impact: low
Show code
st_21_point_infoline_2 = 'Minimum bet - '..card_game_21_minimum_rate..', Maximum bet -'
L59 🔴 global_write
Global write: st_21_point_money
Impact: low
Show code
st_21_point_money = 'rubles.'
L60 🔴 global_write
Global write: st_21_point_info_about_your
Impact: low
Show code
st_21_point_info_about_your = 'You: bet'
L61 🔴 global_write
Global write: st_21_point_info_about_enemy
Impact: low
Show code
st_21_point_info_about_enemy = 'Opponent: bet'
L62 🔴 global_write
Global write: st_21_point_web_money
Impact: low
Show code
st_21_point_web_money = 'E-rubles.'
L63 🔴 global_write
Global write: st_21_point_winner_your_1
Impact: low
Show code
st_21_point_winner_your_1 = 'You win. Total -'
L64 🔴 global_write
Global write: st_21_point_winner_your_2
Impact: low
Show code
st_21_point_winner_your_2 = 'rubles. Total points: your -'
L65 🔴 global_write
Global write: st_21_point_winner_your_3
Impact: low
Show code
st_21_point_winner_your_3 = ', Opponent -'
L66 🔴 global_write
Global write: st_21_point_winner_enemy_1
Impact: low
Show code
st_21_point_winner_enemy_1 = 'You loose. Total -'
L67 🔴 global_write
Global write: st_21_point_winner_enemy_2
Impact: low
Show code
st_21_point_winner_enemy_2 = 'rubles. Total points: your -'
L68 🔴 global_write
Global write: st_21_point_winner_enemy_3
Impact: low
Show code
st_21_point_winner_enemy_3 = ', Opponent -'
L69 🔴 global_write
Global write: st_21_point_winner_equally_1
Impact: low
Show code
st_21_point_winner_equally_1 = 'Push. Total points: your -'
L70 🔴 global_write
Global write: st_21_point_winner_equally_2
Impact: low
Show code
st_21_point_winner_equally_2 = ', Opponent -'
L71 🔴 global_write
Global write: st_21_point_title
Impact: low
Show code
st_21_point_title = 'Game: Blackjack '
L72 🔴 global_write
Global write: st_21_point_dont_money_to_rate
Impact: low
Show code
st_21_point_dont_money_to_rate = 'You cannot raise bet: not enough money.'
L73 🔴 global_write
Global write: st_21_point_dont_take_rate
Impact: low
Show code
st_21_point_dont_take_rate = 'You cannot start game: there is no bets.'
L74 🔴 global_write
Global write: st_21_point_dont_take_rate2
Impact: low
Show code
st_21_point_dont_take_rate2 = 'You run out of money, stalker!'
L75 🔴 global_write
Global write: st_21_point_dont_take_rate3
Impact: low
Show code
st_21_point_dont_take_rate3 = 'Minimum bet - '..card_game_21_minimum_rate
L76 🔴 global_write
Global write: st_question_game_title
Impact: low
Show code
st_question_game_title = 'Èãðà: ×òî? Ãäå? Êîãäà?'
L77 🔴 global_write
Global write: st_question_game_reward_advice
Impact: low
Show code
st_question_game_reward_advice = 'Çàðàáîòàí ñîâåò:'
L78 🔴 global_write
Global write: st_question_game_reward_money
Impact: low
Show code
st_question_game_reward_money = 'Ïîëó÷åíû äåíüãè:'
L79 🔴 global_write
Global write: st_in_web_money
Impact: low
Show code
st_in_web_money = 'Money taken:'
L85 🔴 global_write
Global write: table_mod_data_all
Impact: low
Show code
table_mod_data_all={}
L86 🔴 global_write
Global write: table_mod_data_actor
Impact: low
Show code
table_mod_data_actor={}
L87 🔴 global_write
Global write: table_mod_data_actor_cleaner
Impact: low
Show code
table_mod_data_actor_cleaner={}
L88 🔴 global_write
Global write: table_mod_data_object
Impact: low
Show code
table_mod_data_object={}
L89 🔴 global_write
Global write: table_mod_data_object_cleaner
Impact: low
Show code
table_mod_data_object_cleaner={}
L90 🔴 global_write
Global write: table_mod_utils
Impact: low
Show code
table_mod_utils={}
L91 🔴 global_write
Global write: table_mod_offline
Impact: low
Show code
table_mod_offline={}
L92 🔴 global_write
Global write: table_mod_secrets
Impact: low
Show code
table_mod_secrets={}
L93 🔴 global_write
Global write: table_mod_autosaves
Impact: low
Show code
table_mod_autosaves={}
L94 🔴 global_write
Global write: table_mod_callbacks
Impact: low
Show code
table_mod_callbacks={}
L95 🔴 global_write
Global write: table_mod_schemes
Impact: low
Show code
table_mod_schemes={}
L96 🔴 global_write
Global write: table_mod_teleports
Impact: low
Show code
table_mod_teleports={}
L97 🔴 global_write
Global write: table_mod_mineraps
Impact: low
Show code
table_mod_mineraps={}
L98 🔴 global_write
Global write: table_mod_respawn
Impact: low
Show code
table_mod_respawn={}
L99 🔴 global_write
Global write: table_mod_timers
Impact: low
Show code
table_mod_timers={}
L100 🔴 global_write
Global write: table_level_changes
Impact: low
Show code
table_level_changes={}
L101 🔴 global_write
Global write: table_s_skill_hits
Impact: low
Show code
table_s_skill_hits={}
L102 🔴 global_write
Global write: table_m_skill_hits
Impact: low
Show code
table_m_skill_hits={}
L103 🔴 global_write
Global write: table_m_capture_hits
Impact: low
Show code
table_m_capture_hits={}
L104 🔴 global_write
Global write: table_flashlight
Impact: low
Show code
table_flashlight={}
L105 🔴 global_write
Global write: table_squad_dm
Impact: low
Show code
table_squad_dm={}
L109 🔴 global_write
Global write: bool_approach_sleep_began
Impact: low
Show code
bool_approach_sleep_began=false
L110 🔴 global_write
Global write: bool_approach_sleep
Impact: low
Show code
bool_approach_sleep=false
L111 🔴 global_write
Global write: bool_aura_inactivity_inc
Impact: low
Show code
bool_aura_inactivity_inc=false
L112 🔴 global_write
Global write: bool_aura_inactivity_dec
Impact: low
Show code
bool_aura_inactivity_dec=false
L113 🔴 global_write
Global write: bool_aura_inactivity_action
Impact: low
Show code
bool_aura_inactivity_action=false
L114 🔴 global_write
Global write: bool_aura_inactivity_need_release
Impact: low
Show code
bool_aura_inactivity_need_release=false
L115 🔴 global_write
Global write: bool_allspawn_auto_print
Impact: low
Show code
bool_allspawn_auto_print=false
L116 🔴 global_write
Global write: bool_headshot_s_allower
Impact: low
Show code
bool_headshot_s_allower=false
L117 🔴 global_write
Global write: bool_headshot_s_waiting
Impact: low
Show code
bool_headshot_s_waiting=false
L118 🔴 global_write
Global write: bool_headshot_m_allower
Impact: low
Show code
bool_headshot_m_allower=false
L119 🔴 global_write
Global write: bool_headshot_m_waiting
Impact: low
Show code
bool_headshot_m_waiting=false
L120 🔴 global_write
Global write: bool_end_of_the_month
Impact: low
Show code
bool_end_of_the_month=false
L121 🔴 global_write
Global write: bool_enter_level_change
Impact: low
Show code
bool_enter_level_change=false
L122 🔴 global_write
Global write: bool_travel_level_change
Impact: low
Show code
bool_travel_level_change=false
L123 🔴 global_write
Global write: bool_throw_level_change
Impact: low
Show code
bool_throw_level_change=false
L124 🔴 global_write
Global write: bool_snd_end
Impact: low
Show code
bool_snd_end=false
L125 🔴 global_write
Global write: bool_surge_day_is_present
Impact: low
Show code
bool_surge_day_is_present=false
L126 🔴 global_write
Global write: bool_surge_day_is_critical
Impact: low
Show code
bool_surge_day_is_critical=false
L127 🔴 global_write
Global write: bool_surge_day_end
Impact: low
Show code
bool_surge_day_end=false
L128 🔴 global_write
Global write: bool_black_day_end
Impact: low
Show code
bool_black_day_end=false
L129 🔴 global_write
Global write: bool_every_night_end
Impact: low
Show code
bool_every_night_end=false
L130 🔴 global_write
Global write: bool_remote_marker
Impact: low
Show code
bool_remote_marker=false
L131 🔴 global_write
Global write: bool_show_restrictors
Impact: low
Show code
bool_show_restrictors=false
L132 🔴 global_write
Global write: bool_show_anomalies
Impact: low
Show code
bool_show_anomalies=false
L133 🔴 global_write
Global write: bool_show_smarts
Impact: low
Show code
bool_show_smarts=false
L134 🔴 global_write
Global write: bool_cheat_mode_activate
Impact: low
Show code
bool_cheat_mode_activate=false
L135 🔴 global_write
Global write: bool_is_ui_disabled
Impact: low
Show code
bool_is_ui_disabled=false
L136 🔴 global_write
Global write: bool_mod_update
Impact: low
Show code
bool_mod_update=true
L137 🔴 global_write
Global write: bool_data_loaded
Impact: low
Show code
bool_data_loaded=false
L141 🔴 global_write
Global write: value_bodyguard_release_victim
Impact: low
Show code
value_bodyguard_release_victim=0
L142 🔴 global_write
Global write: value_capture_meal_monster_id
Impact: low
Show code
value_capture_meal_monster_id=0
L143 🔴 global_write
Global write: value_wpn1_state_bar
Impact: low
Show code
value_wpn1_state_bar=0
L144 🔴 global_write
Global write: value_wpn2_state_bar
Impact: low
Show code
value_wpn2_state_bar=0
L145 🔴 global_write
Global write: value_guidebook_type
Impact: low
Show code
value_guidebook_type=1
L146 🔴 global_write
Global write: value_marauder_outfit_id
Impact: low
Show code
value_marauder_outfit_id=0
L147 🔴 global_write
Global write: value_throw_item_id
Impact: low
Show code
value_throw_item_id=0
L148 🔴 global_write
Global write: value_throw_item_cond
Impact: low
Show code
value_throw_item_cond=1.0
L149 🔴 global_write
Global write: value_outfit_flg
Impact: low
Show code
value_outfit_flg=0
L150 🔴 global_write
Global write: value_helm_flg
Impact: low
Show code
value_helm_flg=0
L151 🔴 global_write
Global write: value_remote_marker
Impact: low
Show code
value_remote_marker=0
L152 🔴 global_write
Global write: value_last_discount
Impact: low
Show code
value_last_discount=0.0
L153 🔴 global_write
Global write: value_rank_counter
Impact: low
Show code
value_rank_counter=0
L154 🔴 global_write
Global write: value_headshot_counter
Impact: low
Show code
value_headshot_counter=0
L155 🔴 global_write
Global write: value_demo_anim_counter
Impact: low
Show code
value_demo_anim_counter=0
L156 🔴 global_write
Global write: value_safe_loaded
Impact: low
Show code
value_safe_loaded=0
L157 🔴 global_write
Global write: value_shot_item_ammo
Impact: low
Show code
value_shot_item_ammo=-1
L158 🔴 global_write
Global write: value_webmoney_course_from
Impact: low
Show code
value_webmoney_course_from=20
L159 🔴 global_write
Global write: value_webmoney_course_before
Impact: low
Show code
value_webmoney_course_before=80
L160 🔴 global_write
Global write: value_pstor_factor
Impact: low
Show code
value_pstor_factor=0
L164 🔴 global_write
Global write: card_game_21_stage
Impact: low
Show code
card_game_21_stage="need_rate"
L165 🔴 global_write
Global write: card_game_21_take_else
Impact: low
Show code
card_game_21_take_else="empty_card"
L166 🔴 global_write
Global write: card_game_21_existing_masks
Impact: low
Show code
card_game_21_existing_masks={"kresta","pika","bubna","chirva"}
L167 🔴 global_write
Global write: card_game_21_existing_names
Impact: low
Show code
card_game_21_existing_names={"6","7","8","9","10","J","Q","K","T"}
L168 🔴 global_write
Global write: card_game_21_winner
Impact: low
Show code
card_game_21_winner="none"
L169 🔴 global_write
Global write: card_game_21_enemy_name
Impact: low
Show code
card_game_21_enemy_name=""
L170 🔴 global_write
Global write: card_game_21_info_about_your
Impact: low
Show code
card_game_21_info_about_your=""
L171 🔴 global_write
Global write: card_game_21_info_about_enemy
Impact: low
Show code
card_game_21_info_about_enemy=""
L172 🔴 global_write
Global write: card_game_21_your_points
Impact: low
Show code
card_game_21_your_points=0
L173 🔴 global_write
Global write: card_game_21_enemy_points
Impact: low
Show code
card_game_21_enemy_points=0
L174 🔴 global_write
Global write: card_game_21_rate
Impact: low
Show code
card_game_21_rate=0
L175 🔴 global_write
Global write: card_game_21_show_winner
Impact: low
Show code
card_game_21_show_winner="hide"
L176 🔴 global_write
Global write: card_game_21_difficulty
Impact: low
Show code
card_game_21_difficulty="easy"
L177 🔴 global_write
Global write: card_game_21_increasing_rate
Impact: low
Show code
card_game_21_increasing_rate=50
L191 🔴 global_write
Global write: xml
Impact: low
Show code
xml = CScriptXmlInit()
L272 🔴 global_write
Global write: card_game_21_rate
Impact: low
Show code
card_game_21_rate=0
L274 🔴 global_write
Global write: card_game_21_rate
Impact: low
Show code
card_game_21_rate=value_card_21_max_rate
L277 🔴 global_write
Global write: card_game_21_rate
Impact: low
Show code
card_game_21_rate=db.actor:money()
L447 🔴 global_write
Global write: card_game_21_show_winner
Impact: low
Show code
card_game_21_show_winner="hide"
L452 🔴 global_write
Global write: card_game_21_increasing_rate
Impact: low
Show code
card_game_21_increasing_rate=200
L454 🔴 global_write
Global write: card_game_21_increasing_rate
Impact: low
Show code
card_game_21_increasing_rate=50
L492 🔴 global_write
Global write: card_game_21_your_points
Impact: low
Show code
card_game_21_your_points=card_game_21_your_points+result
L494 🔴 global_write
Global write: card_game_21_enemy_points
Impact: low
Show code
card_game_21_enemy_points=card_game_21_enemy_points+result
L563 🔴 global_write
Global write: card_game_21_rate
Impact: low
Show code
card_game_21_rate=card_game_21_rate-card_game_21_increasing_rate
L566 🔴 global_write
Global write: card_game_21_rate
Impact: low
Show code
card_game_21_rate=card_game_21_rate+card_game_21_increasing_rate
L582 🔴 global_write
Global write: card_game_21_stage
Impact: low
Show code
card_game_21_stage="taked_rate"
L592 🔴 global_write
Global write: card_game_21_stage
Impact: low
Show code
card_game_21_stage="need_rate"
L593 🔴 global_write
Global write: card_game_21_info_about_your
Impact: low
Show code
card_game_21_info_about_your=""
L594 🔴 global_write
Global write: card_game_21_info_about_enemy
Impact: low
Show code
card_game_21_info_about_enemy=""
L595 🔴 global_write
Global write: card_game_21_enemy_name
Impact: low
Show code
card_game_21_enemy_name=""
L596 🔴 global_write
Global write: card_game_21_your_points
Impact: low
Show code
card_game_21_your_points=0
L597 🔴 global_write
Global write: card_game_21_enemy_points
Impact: low
Show code
card_game_21_enemy_points=0
L598 🔴 global_write
Global write: card_game_21_take_else
Impact: low
Show code
card_game_21_take_else="empty_card"
L599 🔴 global_write
Global write: card_game_21_winner
Impact: low
Show code
card_game_21_winner="none"
L601 🔴 global_write
Global write: card_game_21_rate
Impact: low
Show code
card_game_21_rate=0
L603 🔴 global_write
Global write: card_game_21_show_winner
Impact: low
Show code
card_game_21_show_winner="hide"
L607 🔴 global_write
Global write: card_game_21_difficulty
Impact: low
Show code
card_game_21_difficulty=get_random_line("easy,normal,hard")
L610 🔴 global_write
Global write: card_game_21_stage
Impact: low
Show code
card_game_21_stage="play_game"
L611 🔴 global_write
Global write: card_game_21_winner
Impact: low
Show code
card_game_21_winner="none"
L612 🔴 global_write
Global write: card_game_21_info_about_your
Impact: low
Show code
card_game_21_info_about_your=st_21_point_info_about_your.." "..card_game_21_rate.." "..st_21_point_money
L613 🔴 global_write
Global write: card_game_21_info_about_enemy
Impact: low
Show code
card_game_21_info_about_enemy=card_game_21_enemy_name..st_21_point_info_about_enemy.." "..card_game_21_rate.." "..st_21_point_web_money
L627 🔴 global_write
Global write: card_game_21_take_else
Impact: low
Show code
card_game_21_take_else="1st_card"
L633 🔴 global_write
Global write: card_game_21_take_else
Impact: low
Show code
card_game_21_take_else="2nd_card"
L639 🔴 global_write
Global write: card_game_21_take_else
Impact: low
Show code
card_game_21_take_else="3rd_card"
L681 🔴 global_write
Global write: card_game_21_winner
Impact: low
Show code
card_game_21_winner="your"
L683 🔴 global_write
Global write: card_game_21_winner
Impact: low
Show code
card_game_21_winner="enemy"
L686 🔴 global_write
Global write: card_game_21_winner
Impact: low
Show code
card_game_21_winner="your"
L688 🔴 global_write
Global write: card_game_21_winner
Impact: low
Show code
card_game_21_winner="enemy"
L690 🔴 global_write
Global write: card_game_21_winner
Impact: low
Show code
card_game_21_winner="equally"
L695 🔴 global_write
Global write: card_game_21_winner
Impact: low
Show code
card_game_21_winner="equally"
L697 🔴 global_write
Global write: card_game_21_winner
Impact: low
Show code
card_game_21_winner="your"
L699 🔴 global_write
Global write: card_game_21_winner
Impact: low
Show code
card_game_21_winner="enemy"
L702 🔴 global_write
Global write: card_game_21_stage
Impact: low
Show code
card_game_21_stage="end_game"
L705 🔴 global_write
Global write: card_game_21_show_winner
Impact: low
Show code
card_game_21_show_winner="begin_show"
L731 🔴 global_write
Global write: card_game_21_show_winner
Impact: low
Show code
card_game_21_show_winner="end_show"
L767 🔴 global_write
Global write: bool_travel_level_change
Impact: low
Show code
bool_travel_level_change=false
L768 🔴 global_write
Global write: bool_throw_level_change
Impact: low
Show code
bool_throw_level_change=true
L778 🔴 global_write
Global write: bool_travel_level_change
Impact: low
Show code
bool_travel_level_change=true
L788 🔴 global_write
Global write: bool_travel_level_change
Impact: low
Show code
bool_travel_level_change=false
L789 🔴 global_write
Global write: bool_throw_level_change
Impact: low
Show code
bool_throw_level_change=true
L814 🔴 global_write
Global write: bool_is_ui_disabled
Impact: low
Show code
bool_is_ui_disabled=true
L818 🔴 global_write
Global write: bool_is_ui_disabled
Impact: low
Show code
bool_is_ui_disabled=false
L834 🔴 global_write
Global write: line_table
Impact: low
Show code
line_table=parse_general_names(line)
L1008 🔴 global_write
Global write: result
Impact: low
Show code
result=false
L1010 🔴 global_write
Global write: result
Impact: low
Show code
result=true
L1014 🔴 global_write
Global write: result
Impact: low
Show code
result=true
L1016 🔴 global_write
Global write: result
Impact: low
Show code
result=false

ui_mod_elements_mcm.script

L6 🔴 global_write
Global write: st_min
Impact: low
Show code
st_min = "Óñòàíîâèòü ìèíèìàëüíóþ ñòàâêó"
L7 🔴 global_write
Global write: st_max
Impact: low
Show code
st_max = "Óñòàíîâèòü ìàêñèìàëüíóþ ñòàâêó"
L8 🔴 global_write
Global write: st_name
Impact: low
Show code
st_name = "21 Î÷êî"
L10 🔴 global_write
Global write: st_min
Impact: low
Show code
st_min = "Set minimum bet"
L11 🔴 global_write
Global write: st_max
Impact: low
Show code
st_max = "Set maxumum bet"
L12 🔴 global_write
Global write: st_name
Impact: low
Show code
st_name = "Blackjack"
L35 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "21_game" ,sh=true ,gr={

281- Axes Remodel and Reanimation - BarryBogs

6 files (🟢6 🟡3 🔴5 🔵24)

animation_common.script

L31 🟢 table_insert_append
table.insert(anim_mutators, v) -> anim_mutators[#anim_mutators+1] = v
Impact: high
Show code
table.insert(anim_mutators, {functor=functor, priority=priority})

aol_anim_transitions.script

L30 🟢 table_insert_append
table.insert(pattern_transitions[hud_section], v) -> pattern_transitions[hud_section][#pattern_transitions[hud_section]+1] = v
Impact: high
Show code
table.insert(pattern_transitions[hud_section], {
L8 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L25 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L3 🔴 global_write
Global write: transitions
Impact: low
Show code
transitions = {
L19 🔴 global_write
Global write: pattern_transitions
Impact: low
Show code
pattern_transitions = {
L44 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_items:r_line_ex(section,i,"","")

aol_sprint_cancel.script

L18 🔴 global_write
Global write: aol_anim_transitions_anm_transitions
Impact: low
Show code
aol_anim_transitions_anm_transitions = aol_anim_transitions.anm_transitions

custom_functor_autoinject.script

L114 🟢 string_len
string.len(pos) -> #pos
Impact: low
Show code
sub_print_r(val,indent..string.rep(" ",string.len(pos)+8))
L115 🟢 string_len
string.len(pos) -> #pos
Impact: low
Show code
printf(indent..string.rep(" ",string.len(pos)+6).."}")
L105 🟢 uncached_globals_summary
Cache 1 globals in sub_print_r
Impact: medium
Show code
L106: tostring L107: tostring
L128 🟢 uncached_globals_summary
Cache 1 globals in print_table
Impact: medium
Show code
L137: type L139: type
L107 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."*"..tostring(t))
L113 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."["..pos.."] => "..tostring(t).." {")
L115 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent..string.rep(" ",string.len(pos)+6).."}")
L117 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."["..pos.."] => "..tostring(val))
L121 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent..tostring(t))
L140 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = function",k)
L143 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s",k,utils_data.vector_to_string(v))
L145 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = userdata", k)
L150 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = true",k)
L152 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = true")
L156 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = false", k)
L158 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = false")
L163 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s", k,v)
L165 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = nil", k,v)
L319 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s, %s", k, v.index)
L322 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s, %s, max custom_functor reached", k, v.index)
L424 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Custom functors, processing queue")
L427 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Custom functors, type %s", v.type)
L464 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("functor slot is not valid, min 1, max 10, your slot: %s", slot)
L479 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("functor slot is not valid min 1, max 10, your slot: %s", slot)
L515 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[" .. k .. "] => ")
L98 🟡 unused_local_variable
Local variable 'table_remove' is assigned but never used
Impact: low
Show code
local table_remove = table.remove

half_damage.script

L11 🔴 global_write
Global write: new_axes
Impact: low
Show code
new_axes = {

melee_trade_inject.script

L52 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! Trader has no supplies for this supply level [%s] - [%s]", npc_name, supply_level)
L66 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update
L33 🟡 unused_local_variable
Local variable 'format_table' is assigned but never used
Impact: low
Show code
local format_table = utils_data.print_table

286- High-level Toolkits Include Low-level Toolkits - ilrathcxv

1 file (🟢0 🟡0 🔴2 🔵0)

z_monkey_toolkit_workshop.script

L1 🔴 global_write
Global write: base_workshop
Impact: low
Show code
base_workshop = ui_workshop.UIWorkshop.Reset
L2 🔴 global_write
Global write: workshop_toolkits
Impact: low
Show code
workshop_toolkits = ui_workshop.workshop_toolkits

287- G.A.M.M.A. Massive Text Overhaul Project - SageDaHerb and Dr.Pr1nkos

4 files (🟢21 🟡23 🔴203 🔵14)

txr_routes.script

L1321 🟢 uncached_globals_summary
Cache 2 globals in list_map
Impact: medium
Show code
L1324: pairs L1326: pairs L1346: tostring L1346: tostring
L1399 🟢 uncached_globals_summary
Cache 1 globals in c_search
Impact: medium
Show code
L1401: pairs L1411: pairs
L1448 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! get_shortest_path_num | no level defined!")
L52 🔴 global_write
Global write: maps
Impact: low
Show code
maps = {
L260 🔴 global_write
Global write: routes
Impact: low
Show code
routes = {
L400 🟡 unused_local_variable
Local variable 'money_2' is assigned but never used
Impact: low
Show code
local money_2 = money_ini:line_exist("money_2") and money_ini:r_float_ex("money_2") or 10000
L401 🟡 unused_local_variable
Local variable 'money_3' is assigned but never used
Impact: low
Show code
local money_3 = money_ini:line_exist("money_3") and money_ini:r_float_ex("money_3") or 12000
L402 🟡 unused_local_variable
Local variable 'money_4' is assigned but never used
Impact: low
Show code
local money_4 = money_ini:line_exist("money_4") and money_ini:r_float_ex("money_4") or 40000

ui_debug_launcher.script

L100 🟢 table_insert_append
table.insert(content[key], v) -> content[key][#content[key]+1] = v
Impact: high
Show code
table.insert(content[key],v)
L908 🟢 table_insert_append
table.insert(p, v) -> p[#p+1] = v
Impact: high
Show code
table.insert(p,s)
L913 🟢 table_insert_append
table.insert(p, v) -> p[#p+1] = v
Impact: high
Show code
table.insert(p,val)
L897 🟢 string_len
string.len(wrd) -> #wrd
Impact: low
Show code
local args = string.sub(txt,string.len(wrd)+1)
L978 🟢 string_len
string.len(out) -> #out
Impact: low
Show code
local out_cut = string.sub(out, 2, string.len(out))
L876 🟢 uncached_globals_summary
Cache 1 globals in OnConsoleInput
Impact: medium
Show code
L900: string.gsub L906: string.gsub
L1503 🟢 uncached_globals_summary
Cache 1 globals in SetMsg
Impact: medium
Show code
L1511: math.random L1511: math.random
L1940 🟢 uncached_globals_summary
Cache 1 globals in Spawn
Impact: medium
Show code
L1950: string.find L1951: string.find
L2080 🟢 uncached_globals_summary
Cache 1 globals in SetMsg
Impact: medium
Show code
L2088: math.random L2088: math.random
L2322 🟢 uncached_globals_summary
Cache 1 globals in SetMsg
Impact: medium
Show code
L2330: math.random L2330: math.random
L123 🟢 repeated_o1_id()
o1:id() called 3x in get_info
Impact: low
Show code
Cache o1:id() result
L2302 🟢 repeated_o1_id()
o1:id() called 3x in Reset
Impact: low
Show code
Cache o1:id() result
L819 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("- Debug Launcher | Execute (%s)", content[tab][index].name)
L987 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Debug Console: %s",out)
L1416 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("UIDebug_ItemSpawn: No spawn table could be created for %s",name)
L1508 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf((mark or "") .. " " .. text)
L1609 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("- Spawned item [%s](%s)", spawntbl[i].sec, se_obj.id)
L1919 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("UIDebug_ObjSpawn: No spawn table could be created for %s",name)
L2085 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf((mark or "") .. " " .. text)
L2127 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~" .. lvl)
L2327 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf((mark or "") .. " " .. text)
L2611 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(txt,...)
L2648 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L13 🔴 global_write
Global write: ini_cc
Impact: low
Show code
ini_cc = nil
L16 🔴 global_write
Global write: content
Impact: low
Show code
content = {}
L18 🔴 global_write
Global write: ini_cc
Impact: low
Show code
ini_cc = ini_file_ex("cache_dbg.ltx",true)
L20 🔴 global_write
Global write: content
Impact: low
Show code
content = {
L350 🔴 global_write
Global write: debug_mode
Impact: low
Show code
debug_mode = false
L1048 🔴 global_write
Global write: itm_to_spawn_table
Impact: low
Show code
itm_to_spawn_table = {
L1635 🔴 global_write
Global write: obj_to_spawn_table
Impact: low
Show code
obj_to_spawn_table = {
L489 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L505 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then
L521 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L537 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then
L553 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L2037 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_npc = k.object or k.id and sim:object(k.id)
L2130 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local smart_level = sim:level_name(gg:vertex(v.m_game_vertex_id):level_id())
L110 🟡 unused_local_variable
Local variable 'm_floor' is assigned but never used
Impact: low
Show code
local clr, m_floor, m_ceil, s_find = utils_xml.get_color, math.floor, math.ceil, string.find
L110 🟡 unused_local_variable
Local variable 'm_ceil' is assigned but never used
Impact: low
Show code
local clr, m_floor, m_ceil, s_find = utils_xml.get_color, math.floor, math.ceil, string.find
L1457 🟡 unused_local_variable
Local variable 'chk_inv' is assigned but never used
Impact: low
Show code
local chk_inv = self.dl4_chk_i:GetCheck()
L1927 🟡 unused_local_variable
Local variable 'xml_itm' is assigned but never used
Impact: low
Show code
local xml_itm, xml_itm_s, xml_itm_tmp
L1927 🟡 unused_local_variable
Local variable 'xml_itm_s' is assigned but never used
Impact: low
Show code
local xml_itm, xml_itm_s, xml_itm_tmp
L1927 🟡 unused_local_variable
Local variable 'xml_itm_tmp' is assigned but never used
Impact: low
Show code
local xml_itm, xml_itm_s, xml_itm_tmp
L1978 🟡 unused_local_variable
Local variable 'chk_nearby' is assigned but never used
Impact: low
Show code
local chk_nearby = self.d15_chk_n:GetCheck()

ui_mod_elements.script

L843 🟢 table_insert_append
table.insert(t, v) -> t[#t+1] = v
Impact: high
Show code
if avail_codicil(name)==true then table.insert(t,w_name) end
L891 🟢 table_getn
table.getn(tbl) -> #tbl
Impact: low
Show code
return tbl[math.random(table.getn(tbl))]
L15 🔴 global_write
Global write: card_game_21_minimum_rate
Impact: low
Show code
card_game_21_minimum_rate=50
L16 🔴 global_write
Global write: value_card_21_max_rate
Impact: low
Show code
value_card_21_max_rate=1000
L20 🔴 global_write
Global write: card_game_21_minimum_rate
Impact: low
Show code
card_game_21_minimum_rate=ui_mcm.get("21_game/card_game_21_minimum_rate")
L21 🔴 global_write
Global write: value_card_21_max_rate
Impact: low
Show code
value_card_21_max_rate=ui_mcm.get("21_game/value_card_21_max_rate")
L27 🔴 global_write
Global write: st_21_point_your_card_value
Impact: low
Show code
st_21_point_your_card_value = 'Âû:'
L28 🔴 global_write
Global write: st_21_point_enemy_card_value
Impact: low
Show code
st_21_point_enemy_card_value = 'Ñîïåðíèê:'
L29 🔴 global_write
Global write: st_21_point_rate_field
Impact: low
Show code
st_21_point_rate_field = 'Âàøà ñòàâêà íà âûèãðûø:'
L30 🔴 global_write
Global write: st_21_point_infoline_1
Impact: low
Show code
st_21_point_infoline_1 = 'Â âàøåì ðþêçàêå äåíåã:'
L31 🔴 global_write
Global write: st_21_point_infoline_2
Impact: low
Show code
st_21_point_infoline_2 = 'Ìèíèìàëüíàÿ ñòàâêà - '..card_game_21_minimum_rate..', ìàêñèìàëüíàÿ ñòàâêà -'
L32 🔴 global_write
Global write: st_21_point_money
Impact: low
Show code
st_21_point_money = 'ðóáëåé.'
L33 🔴 global_write
Global write: st_21_point_info_about_your
Impact: low
Show code
st_21_point_info_about_your = 'Âû: ñòàâêà'
L34 🔴 global_write
Global write: st_21_point_info_about_enemy
Impact: low
Show code
st_21_point_info_about_enemy = 'Ïðîòèâíèê: ñòàâêà'
L35 🔴 global_write
Global write: st_21_point_web_money
Impact: low
Show code
st_21_point_web_money = 'ýëåêòðîííûõ ðóáëåé.'
L36 🔴 global_write
Global write: st_21_point_winner_your_1
Impact: low
Show code
st_21_point_winner_your_1 = 'Âû âûèãðàëè. Âûèãðûø ñîñòàâèë -'
L37 🔴 global_write
Global write: st_21_point_winner_your_2
Impact: low
Show code
st_21_point_winner_your_2 = 'ðóáëåé. Ñóììà î÷êîâ: âû -'
L38 🔴 global_write
Global write: st_21_point_winner_your_3
Impact: low
Show code
st_21_point_winner_your_3 = ', ïðîòèâíèê -'
L39 🔴 global_write
Global write: st_21_point_winner_enemy_1
Impact: low
Show code
st_21_point_winner_enemy_1 = 'Âû ïðîèãðàëè. Ïðîèãðàø ñîñòàâèë -'
L40 🔴 global_write
Global write: st_21_point_winner_enemy_2
Impact: low
Show code
st_21_point_winner_enemy_2 = 'ðóáëåé. Ñóììà î÷êîâ: âû -'
L41 🔴 global_write
Global write: st_21_point_winner_enemy_3
Impact: low
Show code
st_21_point_winner_enemy_3 = ', ïðîòèâíèê -'
L42 🔴 global_write
Global write: st_21_point_winner_equally_1
Impact: low
Show code
st_21_point_winner_equally_1 = 'Íè÷üÿ. Ñóììà î÷êîâ: âû -'
L43 🔴 global_write
Global write: st_21_point_winner_equally_2
Impact: low
Show code
st_21_point_winner_equally_2 = ', ïðîòèâíèê -'
L44 🔴 global_write
Global write: st_21_point_title
Impact: low
Show code
st_21_point_title = 'Èãðà: 21 î÷êî'
L45 🔴 global_write
Global write: st_21_point_dont_money_to_rate
Impact: low
Show code
st_21_point_dont_money_to_rate = 'Ïîâûøåíèå ñòàâêè íåâîçìîæíî: íå õâàòàåò äåíåã.'
L46 🔴 global_write
Global write: st_21_point_dont_take_rate
Impact: low
Show code
st_21_point_dont_take_rate = 'Ïðîäîëæåíèå èãðû íåâîçìîæíî: ñòàâêè íå ñäåëàíû.'
L47 🔴 global_write
Global write: st_21_point_dont_take_rate2
Impact: low
Show code
st_21_point_dont_take_rate2 = 'Òû ïðîñàäèë âñå äåíüãè, ñòàëêåð!'
L48 🔴 global_write
Global write: st_21_point_dont_take_rate3
Impact: low
Show code
st_21_point_dont_take_rate3 = 'Ìèíèìàëüíàÿ ñòàâêà - '..card_game_21_minimum_rate
L49 🔴 global_write
Global write: st_question_game_title
Impact: low
Show code
st_question_game_title = 'Èãðà: ×òî? Ãäå? Êîãäà?'
L50 🔴 global_write
Global write: st_question_game_reward_advice
Impact: low
Show code
st_question_game_reward_advice = 'Çàðàáîòàí ñîâåò:'
L51 🔴 global_write
Global write: st_question_game_reward_money
Impact: low
Show code
st_question_game_reward_money = 'Ïîëó÷åíû äåíüãè:'
L52 🔴 global_write
Global write: st_in_web_money
Impact: low
Show code
st_in_web_money = 'Ïîëó÷åíû äåíüãè:'
L54 🔴 global_write
Global write: st_21_point_your_card_value
Impact: low
Show code
st_21_point_your_card_value = 'You:'
L55 🔴 global_write
Global write: st_21_point_your_card_value
Impact: low
Show code
st_21_point_your_card_value = 'You:'
L56 🔴 global_write
Global write: st_21_point_enemy_card_value
Impact: low
Show code
st_21_point_enemy_card_value = 'Opponent:'
L57 🔴 global_write
Global write: st_21_point_rate_field
Impact: low
Show code
st_21_point_rate_field = 'Your Bet:'
L58 🔴 global_write
Global write: st_21_point_infoline_1
Impact: low
Show code
st_21_point_infoline_1 = 'Money Remaining:'
L59 🔴 global_write
Global write: st_21_point_infoline_2
Impact: low
Show code
st_21_point_infoline_2 = 'Minimum Bet - '..card_game_21_minimum_rate..', Maximum Bet -'
L60 🔴 global_write
Global write: st_21_point_money
Impact: low
Show code
st_21_point_money = 'RU.'
L61 🔴 global_write
Global write: st_21_point_info_about_your
Impact: low
Show code
st_21_point_info_about_your = 'You bet'
L62 🔴 global_write
Global write: st_21_point_info_about_enemy
Impact: low
Show code
st_21_point_info_about_enemy = 'Opponent bet'
L63 🔴 global_write
Global write: st_21_point_web_money
Impact: low
Show code
st_21_point_web_money = 'RU'
L64 🔴 global_write
Global write: st_21_point_winner_your_1
Impact: low
Show code
st_21_point_winner_your_1 = 'You win! Winnings:'
L65 🔴 global_write
Global write: st_21_point_winner_your_2
Impact: low
Show code
st_21_point_winner_your_2 = 'RU. Score: You -'
L66 🔴 global_write
Global write: st_21_point_winner_your_3
Impact: low
Show code
st_21_point_winner_your_3 = ', Them -'
L67 🔴 global_write
Global write: st_21_point_winner_enemy_1
Impact: low
Show code
st_21_point_winner_enemy_1 = 'You lost. Total -'
L68 🔴 global_write
Global write: st_21_point_winner_enemy_2
Impact: low
Show code
st_21_point_winner_enemy_2 = 'RU. Score: You -'
L69 🔴 global_write
Global write: st_21_point_winner_enemy_3
Impact: low
Show code
st_21_point_winner_enemy_3 = ', Tie. Score: You -'
L70 🔴 global_write
Global write: st_21_point_winner_equally_1
Impact: low
Show code
st_21_point_winner_equally_1 = 'Push. Total: You -'
L71 🔴 global_write
Global write: st_21_point_winner_equally_2
Impact: low
Show code
st_21_point_winner_equally_2 = ', Them -'
L72 🔴 global_write
Global write: st_21_point_title
Impact: low
Show code
st_21_point_title = 'Blackjack '
L73 🔴 global_write
Global write: st_21_point_dont_money_to_rate
Impact: low
Show code
st_21_point_dont_money_to_rate = 'CANNOT RAISE BET: NOT ENOUGH MONEY'
L74 🔴 global_write
Global write: st_21_point_dont_take_rate
Impact: low
Show code
st_21_point_dont_take_rate = 'CANNOT START GAME: NO BETS PLACED'
L75 🔴 global_write
Global write: st_21_point_dont_take_rate2
Impact: low
Show code
st_21_point_dont_take_rate2 = 'YOU HAVE NO MONEY LEFT!'
L76 🔴 global_write
Global write: st_21_point_dont_take_rate3
Impact: low
Show code
st_21_point_dont_take_rate3 = 'Minimum Bet - '..card_game_21_minimum_rate
L77 🔴 global_write
Global write: st_question_game_title
Impact: low
Show code
st_question_game_title = 'Èãðà: ×òî? Ãäå? Êîãäà?'
L78 🔴 global_write
Global write: st_question_game_reward_advice
Impact: low
Show code
st_question_game_reward_advice = 'Çàðàáîòàí ñîâåò:'
L79 🔴 global_write
Global write: st_question_game_reward_money
Impact: low
Show code
st_question_game_reward_money = 'Ïîëó÷åíû äåíüãè:'
L80 🔴 global_write
Global write: st_in_web_money
Impact: low
Show code
st_in_web_money = 'Money Taken:'
L86 🔴 global_write
Global write: table_mod_data_all
Impact: low
Show code
table_mod_data_all={}
L87 🔴 global_write
Global write: table_mod_data_actor
Impact: low
Show code
table_mod_data_actor={}
L88 🔴 global_write
Global write: table_mod_data_actor_cleaner
Impact: low
Show code
table_mod_data_actor_cleaner={}
L89 🔴 global_write
Global write: table_mod_data_object
Impact: low
Show code
table_mod_data_object={}
L90 🔴 global_write
Global write: table_mod_data_object_cleaner
Impact: low
Show code
table_mod_data_object_cleaner={}
L91 🔴 global_write
Global write: table_mod_utils
Impact: low
Show code
table_mod_utils={}
L92 🔴 global_write
Global write: table_mod_offline
Impact: low
Show code
table_mod_offline={}
L93 🔴 global_write
Global write: table_mod_secrets
Impact: low
Show code
table_mod_secrets={}
L94 🔴 global_write
Global write: table_mod_autosaves
Impact: low
Show code
table_mod_autosaves={}
L95 🔴 global_write
Global write: table_mod_callbacks
Impact: low
Show code
table_mod_callbacks={}
L96 🔴 global_write
Global write: table_mod_schemes
Impact: low
Show code
table_mod_schemes={}
L97 🔴 global_write
Global write: table_mod_teleports
Impact: low
Show code
table_mod_teleports={}
L98 🔴 global_write
Global write: table_mod_mineraps
Impact: low
Show code
table_mod_mineraps={}
L99 🔴 global_write
Global write: table_mod_respawn
Impact: low
Show code
table_mod_respawn={}
L100 🔴 global_write
Global write: table_mod_timers
Impact: low
Show code
table_mod_timers={}
L101 🔴 global_write
Global write: table_level_changes
Impact: low
Show code
table_level_changes={}
L102 🔴 global_write
Global write: table_s_skill_hits
Impact: low
Show code
table_s_skill_hits={}
L103 🔴 global_write
Global write: table_m_skill_hits
Impact: low
Show code
table_m_skill_hits={}
L104 🔴 global_write
Global write: table_m_capture_hits
Impact: low
Show code
table_m_capture_hits={}
L105 🔴 global_write
Global write: table_flashlight
Impact: low
Show code
table_flashlight={}
L106 🔴 global_write
Global write: table_squad_dm
Impact: low
Show code
table_squad_dm={}
L110 🔴 global_write
Global write: bool_approach_sleep_began
Impact: low
Show code
bool_approach_sleep_began=false
L111 🔴 global_write
Global write: bool_approach_sleep
Impact: low
Show code
bool_approach_sleep=false
L112 🔴 global_write
Global write: bool_aura_inactivity_inc
Impact: low
Show code
bool_aura_inactivity_inc=false
L113 🔴 global_write
Global write: bool_aura_inactivity_dec
Impact: low
Show code
bool_aura_inactivity_dec=false
L114 🔴 global_write
Global write: bool_aura_inactivity_action
Impact: low
Show code
bool_aura_inactivity_action=false
L115 🔴 global_write
Global write: bool_aura_inactivity_need_release
Impact: low
Show code
bool_aura_inactivity_need_release=false
L116 🔴 global_write
Global write: bool_allspawn_auto_print
Impact: low
Show code
bool_allspawn_auto_print=false
L117 🔴 global_write
Global write: bool_headshot_s_allower
Impact: low
Show code
bool_headshot_s_allower=false
L118 🔴 global_write
Global write: bool_headshot_s_waiting
Impact: low
Show code
bool_headshot_s_waiting=false
L119 🔴 global_write
Global write: bool_headshot_m_allower
Impact: low
Show code
bool_headshot_m_allower=false
L120 🔴 global_write
Global write: bool_headshot_m_waiting
Impact: low
Show code
bool_headshot_m_waiting=false
L121 🔴 global_write
Global write: bool_end_of_the_month
Impact: low
Show code
bool_end_of_the_month=false
L122 🔴 global_write
Global write: bool_enter_level_change
Impact: low
Show code
bool_enter_level_change=false
L123 🔴 global_write
Global write: bool_travel_level_change
Impact: low
Show code
bool_travel_level_change=false
L124 🔴 global_write
Global write: bool_throw_level_change
Impact: low
Show code
bool_throw_level_change=false
L125 🔴 global_write
Global write: bool_snd_end
Impact: low
Show code
bool_snd_end=false
L126 🔴 global_write
Global write: bool_surge_day_is_present
Impact: low
Show code
bool_surge_day_is_present=false
L127 🔴 global_write
Global write: bool_surge_day_is_critical
Impact: low
Show code
bool_surge_day_is_critical=false
L128 🔴 global_write
Global write: bool_surge_day_end
Impact: low
Show code
bool_surge_day_end=false
L129 🔴 global_write
Global write: bool_black_day_end
Impact: low
Show code
bool_black_day_end=false
L130 🔴 global_write
Global write: bool_every_night_end
Impact: low
Show code
bool_every_night_end=false
L131 🔴 global_write
Global write: bool_remote_marker
Impact: low
Show code
bool_remote_marker=false
L132 🔴 global_write
Global write: bool_show_restrictors
Impact: low
Show code
bool_show_restrictors=false
L133 🔴 global_write
Global write: bool_show_anomalies
Impact: low
Show code
bool_show_anomalies=false
L134 🔴 global_write
Global write: bool_show_smarts
Impact: low
Show code
bool_show_smarts=false
L135 🔴 global_write
Global write: bool_cheat_mode_activate
Impact: low
Show code
bool_cheat_mode_activate=false
L136 🔴 global_write
Global write: bool_is_ui_disabled
Impact: low
Show code
bool_is_ui_disabled=false
L137 🔴 global_write
Global write: bool_mod_update
Impact: low
Show code
bool_mod_update=true
L138 🔴 global_write
Global write: bool_data_loaded
Impact: low
Show code
bool_data_loaded=false
L142 🔴 global_write
Global write: value_bodyguard_release_victim
Impact: low
Show code
value_bodyguard_release_victim=0
L143 🔴 global_write
Global write: value_capture_meal_monster_id
Impact: low
Show code
value_capture_meal_monster_id=0
L144 🔴 global_write
Global write: value_wpn1_state_bar
Impact: low
Show code
value_wpn1_state_bar=0
L145 🔴 global_write
Global write: value_wpn2_state_bar
Impact: low
Show code
value_wpn2_state_bar=0
L146 🔴 global_write
Global write: value_guidebook_type
Impact: low
Show code
value_guidebook_type=1
L147 🔴 global_write
Global write: value_marauder_outfit_id
Impact: low
Show code
value_marauder_outfit_id=0
L148 🔴 global_write
Global write: value_throw_item_id
Impact: low
Show code
value_throw_item_id=0
L149 🔴 global_write
Global write: value_throw_item_cond
Impact: low
Show code
value_throw_item_cond=1.0
L150 🔴 global_write
Global write: value_outfit_flg
Impact: low
Show code
value_outfit_flg=0
L151 🔴 global_write
Global write: value_helm_flg
Impact: low
Show code
value_helm_flg=0
L152 🔴 global_write
Global write: value_remote_marker
Impact: low
Show code
value_remote_marker=0
L153 🔴 global_write
Global write: value_last_discount
Impact: low
Show code
value_last_discount=0.0
L154 🔴 global_write
Global write: value_rank_counter
Impact: low
Show code
value_rank_counter=0
L155 🔴 global_write
Global write: value_headshot_counter
Impact: low
Show code
value_headshot_counter=0
L156 🔴 global_write
Global write: value_demo_anim_counter
Impact: low
Show code
value_demo_anim_counter=0
L157 🔴 global_write
Global write: value_safe_loaded
Impact: low
Show code
value_safe_loaded=0
L158 🔴 global_write
Global write: value_shot_item_ammo
Impact: low
Show code
value_shot_item_ammo=-1
L159 🔴 global_write
Global write: value_webmoney_course_from
Impact: low
Show code
value_webmoney_course_from=20
L160 🔴 global_write
Global write: value_webmoney_course_before
Impact: low
Show code
value_webmoney_course_before=80
L161 🔴 global_write
Global write: value_pstor_factor
Impact: low
Show code
value_pstor_factor=0
L165 🔴 global_write
Global write: card_game_21_stage
Impact: low
Show code
card_game_21_stage="need_rate"
L166 🔴 global_write
Global write: card_game_21_take_else
Impact: low
Show code
card_game_21_take_else="empty_card"
L167 🔴 global_write
Global write: card_game_21_existing_masks
Impact: low
Show code
card_game_21_existing_masks={"kresta","pika","bubna","chirva"}
L168 🔴 global_write
Global write: card_game_21_existing_names
Impact: low
Show code
card_game_21_existing_names={"6","7","8","9","10","J","Q","K","T"}
L169 🔴 global_write
Global write: card_game_21_winner
Impact: low
Show code
card_game_21_winner="none"
L170 🔴 global_write
Global write: card_game_21_enemy_name
Impact: low
Show code
card_game_21_enemy_name=""
L171 🔴 global_write
Global write: card_game_21_info_about_your
Impact: low
Show code
card_game_21_info_about_your=""
L172 🔴 global_write
Global write: card_game_21_info_about_enemy
Impact: low
Show code
card_game_21_info_about_enemy=""
L173 🔴 global_write
Global write: card_game_21_your_points
Impact: low
Show code
card_game_21_your_points=0
L174 🔴 global_write
Global write: card_game_21_enemy_points
Impact: low
Show code
card_game_21_enemy_points=0
L175 🔴 global_write
Global write: card_game_21_rate
Impact: low
Show code
card_game_21_rate=0
L176 🔴 global_write
Global write: card_game_21_show_winner
Impact: low
Show code
card_game_21_show_winner="hide"
L177 🔴 global_write
Global write: card_game_21_difficulty
Impact: low
Show code
card_game_21_difficulty="easy"
L178 🔴 global_write
Global write: card_game_21_increasing_rate
Impact: low
Show code
card_game_21_increasing_rate=50
L192 🔴 global_write
Global write: xml
Impact: low
Show code
xml = CScriptXmlInit()
L273 🔴 global_write
Global write: card_game_21_rate
Impact: low
Show code
card_game_21_rate=0
L275 🔴 global_write
Global write: card_game_21_rate
Impact: low
Show code
card_game_21_rate=value_card_21_max_rate
L278 🔴 global_write
Global write: card_game_21_rate
Impact: low
Show code
card_game_21_rate=db.actor:money()
L448 🔴 global_write
Global write: card_game_21_show_winner
Impact: low
Show code
card_game_21_show_winner="hide"
L453 🔴 global_write
Global write: card_game_21_increasing_rate
Impact: low
Show code
card_game_21_increasing_rate=200
L455 🔴 global_write
Global write: card_game_21_increasing_rate
Impact: low
Show code
card_game_21_increasing_rate=50
L493 🔴 global_write
Global write: card_game_21_your_points
Impact: low
Show code
card_game_21_your_points=card_game_21_your_points+result
L495 🔴 global_write
Global write: card_game_21_enemy_points
Impact: low
Show code
card_game_21_enemy_points=card_game_21_enemy_points+result
L564 🔴 global_write
Global write: card_game_21_rate
Impact: low
Show code
card_game_21_rate=card_game_21_rate-card_game_21_increasing_rate
L567 🔴 global_write
Global write: card_game_21_rate
Impact: low
Show code
card_game_21_rate=card_game_21_rate+card_game_21_increasing_rate
L583 🔴 global_write
Global write: card_game_21_stage
Impact: low
Show code
card_game_21_stage="taked_rate"
L593 🔴 global_write
Global write: card_game_21_stage
Impact: low
Show code
card_game_21_stage="need_rate"
L594 🔴 global_write
Global write: card_game_21_info_about_your
Impact: low
Show code
card_game_21_info_about_your=""
L595 🔴 global_write
Global write: card_game_21_info_about_enemy
Impact: low
Show code
card_game_21_info_about_enemy=""
L596 🔴 global_write
Global write: card_game_21_enemy_name
Impact: low
Show code
card_game_21_enemy_name=""
L597 🔴 global_write
Global write: card_game_21_your_points
Impact: low
Show code
card_game_21_your_points=0
L598 🔴 global_write
Global write: card_game_21_enemy_points
Impact: low
Show code
card_game_21_enemy_points=0
L599 🔴 global_write
Global write: card_game_21_take_else
Impact: low
Show code
card_game_21_take_else="empty_card"
L600 🔴 global_write
Global write: card_game_21_winner
Impact: low
Show code
card_game_21_winner="none"
L602 🔴 global_write
Global write: card_game_21_rate
Impact: low
Show code
card_game_21_rate=0
L604 🔴 global_write
Global write: card_game_21_show_winner
Impact: low
Show code
card_game_21_show_winner="hide"
L608 🔴 global_write
Global write: card_game_21_difficulty
Impact: low
Show code
card_game_21_difficulty=get_random_line("easy,normal,hard")
L611 🔴 global_write
Global write: card_game_21_stage
Impact: low
Show code
card_game_21_stage="play_game"
L612 🔴 global_write
Global write: card_game_21_winner
Impact: low
Show code
card_game_21_winner="none"
L613 🔴 global_write
Global write: card_game_21_info_about_your
Impact: low
Show code
card_game_21_info_about_your=st_21_point_info_about_your.." "..card_game_21_rate.." "..st_21_point_money
L614 🔴 global_write
Global write: card_game_21_info_about_enemy
Impact: low
Show code
card_game_21_info_about_enemy=card_game_21_enemy_name..st_21_point_info_about_enemy.." "..card_game_21_rate.." "..st_21_point_web_money
L628 🔴 global_write
Global write: card_game_21_take_else
Impact: low
Show code
card_game_21_take_else="1st_card"
L634 🔴 global_write
Global write: card_game_21_take_else
Impact: low
Show code
card_game_21_take_else="2nd_card"
L640 🔴 global_write
Global write: card_game_21_take_else
Impact: low
Show code
card_game_21_take_else="3rd_card"
L682 🔴 global_write
Global write: card_game_21_winner
Impact: low
Show code
card_game_21_winner="your"
L684 🔴 global_write
Global write: card_game_21_winner
Impact: low
Show code
card_game_21_winner="enemy"
L687 🔴 global_write
Global write: card_game_21_winner
Impact: low
Show code
card_game_21_winner="your"
L689 🔴 global_write
Global write: card_game_21_winner
Impact: low
Show code
card_game_21_winner="enemy"
L691 🔴 global_write
Global write: card_game_21_winner
Impact: low
Show code
card_game_21_winner="equally"
L696 🔴 global_write
Global write: card_game_21_winner
Impact: low
Show code
card_game_21_winner="equally"
L698 🔴 global_write
Global write: card_game_21_winner
Impact: low
Show code
card_game_21_winner="your"
L700 🔴 global_write
Global write: card_game_21_winner
Impact: low
Show code
card_game_21_winner="enemy"
L703 🔴 global_write
Global write: card_game_21_stage
Impact: low
Show code
card_game_21_stage="end_game"
L706 🔴 global_write
Global write: card_game_21_show_winner
Impact: low
Show code
card_game_21_show_winner="begin_show"
L732 🔴 global_write
Global write: card_game_21_show_winner
Impact: low
Show code
card_game_21_show_winner="end_show"
L768 🔴 global_write
Global write: bool_travel_level_change
Impact: low
Show code
bool_travel_level_change=false
L769 🔴 global_write
Global write: bool_throw_level_change
Impact: low
Show code
bool_throw_level_change=true
L779 🔴 global_write
Global write: bool_travel_level_change
Impact: low
Show code
bool_travel_level_change=true
L789 🔴 global_write
Global write: bool_travel_level_change
Impact: low
Show code
bool_travel_level_change=false
L790 🔴 global_write
Global write: bool_throw_level_change
Impact: low
Show code
bool_throw_level_change=true
L815 🔴 global_write
Global write: bool_is_ui_disabled
Impact: low
Show code
bool_is_ui_disabled=true
L819 🔴 global_write
Global write: bool_is_ui_disabled
Impact: low
Show code
bool_is_ui_disabled=false
L835 🔴 global_write
Global write: line_table
Impact: low
Show code
line_table=parse_general_names(line)
L1009 🔴 global_write
Global write: result
Impact: low
Show code
result=false
L1011 🔴 global_write
Global write: result
Impact: low
Show code
result=true
L1015 🔴 global_write
Global write: result
Impact: low
Show code
result=true
L1017 🔴 global_write
Global write: result
Impact: low
Show code
result=false

ui_pda_encyclopedia_tab.script

L321 🟢 table_insert_append
table.insert(categories[i].articles, v) -> categories[i].articles[#categories[i].articles+1] = v
Impact: high
Show code
table.insert(categories[i].articles, section)
L353 🟢 table_insert_append
table.insert(interactivity[match_key][section], v) -> interactivity[match_key][section][#interactivity[match_key][section]+1] = v
Impact: high
Show code
table.insert(interactivity[match_key][section], values[j])
L878 🟢 uncached_globals_summary
Cache 2 globals in UpdateDescr
Impact: medium
Show code
L910: tostring L911: tostring L924: string.find L956: string.find
L376 🟢 repeated_obj_section()
obj:section() called 3x in detect_intereaction
Impact: low
Show code
Cache obj:section() result
L442 🟢 repeated_obj_section()
obj:section() called 3x in actor_on_feeling_anomaly
Impact: low
Show code
Cache obj:section() result
L950 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str = str .. "\\n " .. utils_xml.get_color("ui_gray_1") .. "• " .. game.translate_string(gr.name) .. ": " .. clr .. tostring(value)
L976 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str = str .. "\\n \\n" .. utils_xml.get_color("pda_white") .. ui_item.get_sec_name(id) .. ":"
L324 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
else printf("Encyclopedia category \"" .. categories[i].section .. "\" does not exist.") end
L332 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Encyclopedia interactivity section \"" .. plugin_section .. "\" does not exist.")
L349 🟡 unused_local_variable
Local variable 'junk1' is assigned but never used
Impact: low
Show code
local junk1, section, value = ini_ecy2:r_line(match_section, i, "", "")
L309 🟡 unused_local_variable
Local variable 'junk2' is assigned but never used
Impact: low
Show code
local junk1, section, junk2 = ini_ecy:r_line(plugin_section, i, "", "")
L884 🟡 unused_local_variable
Local variable 'con' is assigned but never used
Impact: low
Show code
local con = obj:condition()
L979 🟡 unused_local_variable
Local variable 'tool' is assigned but never used
Impact: low
Show code
local tool = tonumber(t[1]) or 1

288- ACE52 Rifle Replacer - Firebreath

8 files (🟢6 🟡3 🔴24 🔵3)

ace52_autoinject.script

L52 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update

animation_common.script

L31 🟢 table_insert_append
table.insert(anim_mutators, v) -> anim_mutators[#anim_mutators+1] = v
Impact: high
Show code
table.insert(anim_mutators, {functor=functor, priority=priority})

aol_anim_transitions.script

L28 🟢 table_insert_append
table.insert(pattern_transitions[hud_section], v) -> pattern_transitions[hud_section][#pattern_transitions[hud_section]+1] = v
Impact: high
Show code
table.insert(pattern_transitions[hud_section], {
L6 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L23 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L1 🔴 global_write
Global write: transitions
Impact: low
Show code
transitions = {
L17 🔴 global_write
Global write: pattern_transitions
Impact: low
Show code
pattern_transitions = {
L42 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_items:r_line_ex(section,i,"","")

aol_sprint_cancel.script

L18 🔴 global_write
Global write: aol_anim_transitions_actor_on_hud_animation_play
Impact: low
Show code
aol_anim_transitions_actor_on_hud_animation_play = aol_anim_transitions.actor_on_hud_animation_play

inventory_upgrades_mp.script

L4 🔴 global_write
Global write: ini_parts
Impact: low
Show code
ini_parts = itms_manager.ini_parts
L83 🔴 global_write
Global write: OnRepair
Impact: low
Show code
OnRepair = ui_inventory.UIInventory.RMode_OnRepair
L99 🔴 global_write
Global write: RepairYes
Impact: low
Show code
RepairYes = ui_inventory.UIInventory.RMode_RepairYes
L14 🟡 unused_local_variable
Local variable 'class' is assigned but never used
Impact: low
Show code
local class = ini_sys:r_string_ex(item_name, "class")

loadouts_injector.script

L131 🟢 uncached_globals_summary
Cache 1 globals in xrs_rnd_npc_loadout.create_item_on_npc
Impact: medium
Show code
L159: math.random L163: math.random
L189 🟢 uncached_globals_summary
Cache 1 globals in create_item
Impact: medium
Show code
L202: math.random L205: math.random
L222 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR: NPC Loadouts | wrong ammo_type set for [%s], missing value in ammo_class", section)
L52 🔴 global_write
Global write: tmp
Impact: low
Show code
tmp = ini_loadouts:r_string_ex("settings","scope_chance")
L54 🔴 global_write
Global write: tmp
Impact: low
Show code
tmp = str_explode(tmp,",")
L74 🔴 global_write
Global write: tmp
Impact: low
Show code
tmp = str_explode(id,":")
L92 🔴 global_write
Global write: tokens
Impact: low
Show code
tokens = str_explode(loadout, "_")
L106 🔴 global_write
Global write: faction
Impact: low
Show code
faction, rank, slot = unpack(tokens)
L106 🔴 global_write
Global write: rank
Impact: low
Show code
faction, rank, slot = unpack(tokens)
L106 🔴 global_write
Global write: slot
Impact: low
Show code
faction, rank, slot = unpack(tokens)
L107 🔴 global_write
Global write: slot
Impact: low
Show code
slot = slots[slot]
L117 🔴 global_write
Global write: l
Impact: low
Show code
l = custom_loadouts[faction][rank][slot]
L130 🔴 global_write
Global write: CreateItem
Impact: low
Show code
CreateItem = xrs_rnd_npc_loadout.create_item_on_npc
L177 🔴 global_write
Global write: id
Impact: low
Show code
id = custom_tbl[pick]
L115 🟡 unused_local_variable
Local variable 'value' is assigned but never used
Impact: low
Show code
local _, id, value = ini_wep_loadouts:r_line_ex(weapons,i)

trader_autoinject.script

L34 🟢 repeated_npc_id()
npc:id() called 3x in trade_manager.update
Impact: low
Show code
Cache npc:id() result
L182 🟢 repeated_item_section()
item:section() called 4x in itr_inv
Impact: low
Show code
Cache item:section() result
L16 🔴 global_write
Global write: find
Impact: low
Show code
find = string.find
L32 🔴 global_write
Global write: TraderUpdate
Impact: low
Show code
TraderUpdate = trade_manager.update

z_parts_inject.script

L1 🔴 global_write
Global write: cached_r_string_ex
Impact: low
Show code
cached_r_string_ex = itms_manager.ini_parts.r_string_ex
L2 🔴 global_write
Global write: cached_parse_list
Impact: low
Show code
cached_parse_list = _G.parse_list
L3 🔴 global_write
Global write: parts_custom
Impact: low
Show code
parts_custom = {}
L4 🔴 global_write
Global write: parts_custom_ini
Impact: low
Show code
parts_custom_ini = {

290- Atmospherics Shaders Weathers and Reshade - Hippobot

2 files (🟢0 🟡2 🔴7 🔵1)

fogFX.script

L65 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 0
L66 🔴 global_write
Global write: delay
Impact: low
Show code
delay = 100 -- time in milliseconds between each update. By default actor_on_update is run *every frame*.
L68 🔴 global_write
Global write: tg
Impact: low
Show code
tg = time_global()
L71 🔴 global_write
Global write: grok_delay
Impact: low
Show code
grok_delay = tg + delay
L72 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 1
L76 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 0
L80 🔴 global_write
Global write: play_leaves
Impact: low
Show code
play_leaves = leaves_maps[actor_level]
L79 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local actor_level = sim:level_name(gg:vertex(sim:actor().m_game_vertex_id):level_id())
L79 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local actor_level = sim:level_name(gg:vertex(sim:actor().m_game_vertex_id):level_id())

yawm_effects.script

L2 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("No snowfall")

290- Atmospherics Shaders Weathers and Reshade Latest - Hippobot

19 files (🟢8 🟡12 🔴19 🔵18)

ssfx_ao_mcm.script

L8 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "ao", sh=true, text="ui_mcm_ssfx_module_ao", gr = {

ssfx_florafixes_mcm.script

L8 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "florafixes", sh=true, text="ui_mcm_ssfx_module_florafixes", gr ={

ssfx_fog_mcm.script

L8 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "fog", sh=true, text="ui_mcm_ssfx_module_fog", gr ={

ssfx_il_mcm.script

L8 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "il", sh=true, text="ui_mcm_ssfx_module_il", gr = {

ssfx_il_settings.script

L8 🔴 global_write
Global write: ssfx_default_settings
Impact: low
Show code
ssfx_default_settings =

ssfx_lut.script

L140 🟢 repeated_level_name
level.name called 3x in actor_on_first_update
Impact: low
Show code
local level_name = level.name()
L141 🔴 global_write
Global write: Map_LUT
Impact: low
Show code
Map_LUT = ssfx_maps[level.name()].group or ssfx_lut_default.group
L144 🔴 global_write
Global write: Map_LUT
Impact: low
Show code
Map_LUT = ssfx_lut_default.group

ssfx_parallax_mcm.script

L9 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "parallax", sh=true, text="ui_mcm_ssfx_module_parallax", gr = {

ssfx_pp_mcm.script

L8 🔴 global_write
Global write: op
Impact: low
Show code
op = { id = "ssfx_pp", sh=false ,gr = {

ssfx_rain_mcm.script

L8 🔴 global_write
Global write: op
Impact: low
Show code
op = { id = "ssfx_rain_module", sh=false ,gr = {

ssfx_shadow_cascades_mcm.script

L8 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "shw_cascades", sh=true, text="ui_mcm_ssfx_module_shw_cascades", gr ={

ssfx_shadows_mcm.script

L8 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "shadows", sh=true, text="ui_mcm_ssfx_module_shadows", gr ={

ssfx_ssr_mcm.script

L8 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "ssr", sh=true, text="ui_mcm_ssfx_module_ssr", gr ={

ssfx_ssr_settings.script

L8 🔴 global_write
Global write: ssfx_default_settings
Impact: low
Show code
ssfx_default_settings =

ssfx_terrain_mcm.script

L9 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "terrain", sh=true, text="ui_mcm_ssfx_module_terrain", gr = {

ssfx_water_mcm.script

L8 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "water", sh=true, text="ui_mcm_ssfx_module_water", gr = {

ssfx_wetness_mcm.script

L8 🔴 global_write
Global write: op
Impact: low
Show code
op = { id = "ssfx_wetness", sh=false ,gr = {

ssfx_wetness_settings.script

L8 🔴 global_write
Global write: ssfx_default_settings
Impact: low
Show code
ssfx_default_settings =

ssfx_wind_mcm.script

L8 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "wind", sh=true, text="ui_mcm_ssfx_module_wind", gr ={

visual_memory_manager.script

L69 🟢 repeated_who_id()
who:id() called 7x in get_visible_value
Impact: low
Show code
Cache who:id() result
L69 🟢 repeated_db_actor_id()
db.actor:id() called 5x in get_visible_value
Impact: low
Show code
Cache db.actor:id() result
L106 🟢 repeated_npc_id()
npc:id() called 10x in get_visible_value
Impact: low
Show code
Cache npc:id() result
L159 🟢 repeated_obj_id()
obj:id() called 4x in get_visible_value
Impact: low
Show code
Cache obj:id() result
L240 🟢 repeated_outfit_section()
outfit:section() called 3x in slot_in_out
Impact: low
Show code
Cache outfit:section() result
L257 🟢 repeated_npc_id()
npc:id() called 2x in npc_on_before_hit
Impact: low
Show code
Cache npc:id() result
L263 🟢 repeated_member_id()
member:id() called 2x in npc_on_before_hit
Impact: low
Show code
Cache member:id() result
L167 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('---------------------------------------------------------------')
L168 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Weather is: " .. (wthrs))
L169 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("1. Luminocity ---------- %s", Luminocity)
L170 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("1.a) luminocity --------- %s", luminocity)
L171 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("1.b) lights_lum() ------- %s", lights_lum())
L172 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("1.c) who:get_lum() ---- %s", who:get_luminocity())
L173 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("2. Velocity ------------- %s", Velocity)
L174 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("3. dist_original --------- %s", distance)
L175 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("4. weight&outfit ------- %s", weight)
L176 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("5. crouch ------------- %s", crouch)
L177 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("6.a) shot_mult --------- %s", shot_mult)
L178 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("6.b) danger ------------ %s", danger_mult)
L179 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("6.c) camo ------------- %s", camo_x)
L180 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("6.d) ai scheme --------- %s", scheme_mult)
L181 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("6.e) get_camo_k ------ %s", get_camo_k)
L182 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("6.f) jacketmult --------- %s", jacketmult)
L183 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("7. memory ------------- %s", memory_factor)
L184 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("8. Step incr --- %s", step_incr)
L69 🟡 potential_nil_access
Potential nil access: 'torch' from :item_in_slot() used without nil check
Impact: low
Show code
local actor_torch_active = (who and (who:id() == db.actor:id()) and ( (torch and torch:torch_enabled()) or (flash and (flash:section() == "device_flashlight") and db.actor:active_detector()) ))
L69 🟡 potential_nil_access
Potential nil access: 'flash' from :item_in_slot() used without nil check
Impact: low
Show code
local actor_torch_active = (who and (who:id() == db.actor:id()) and ( (torch and torch:torch_enabled()) or (flash and (flash:section() == "device_flashlight") and db.actor:active_detector()) ))
L159 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
if (obj and (obj:alive()) and (who and (who:id() == db.actor:id() or who:id() == obj:id() ) and npc and (npc:id() == db.actor:id() or npc:id() == obj:id() ))) and (not obj:see(db.actor)) then
L159 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
if (obj and (obj:alive()) and (who and (who:id() == db.actor:id() or who:id() == obj:id() ) and npc and (npc:id() == db.actor:id() or npc:id() == obj:id() ))) and (not obj:see(db.actor)) then
L159 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
if (obj and (obj:alive()) and (who and (who:id() == db.actor:id() or who:id() == obj:id() ) and npc and (npc:id() == db.actor:id() or npc:id() == obj:id() ))) and (not obj:see(db.actor)) then
L159 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
if (obj and (obj:alive()) and (who and (who:id() == db.actor:id() or who:id() == obj:id() ) and npc and (npc:id() == db.actor:id() or npc:id() == obj:id() ))) and (not obj:see(db.actor)) then
L161 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
elseif obj and obj:see(db.actor) then
L216 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if not (IsWeapon(wpn)) or IsMelee(wpn) or wpn:weapon_is_silencer() then return end
L240 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local kind = outfit and ini_sys:r_string_ex(outfit:section(),"kind")
L241 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local get_camo_get_line = outfit and ini_sys:line_exist(outfit:section(), "npc_blindness_koeff")
L242 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
get_camo_k = get_camo_get_line and ini_sys:r_float(outfit:section(), "npc_blindness_koeff") or 0
L262 🟡 potential_nil_access
Potential nil access: 'member' from level.object_by_id() used without nil check
Impact: low
Show code
if member and member.alive and member:alive() then

292- Ithaca M37 Shotgun - Blackgrowl

8 files (🟢7 🟡5 🔴24 🔵4)

animation_common.script

L31 🟢 table_insert_append
table.insert(anim_mutators, v) -> anim_mutators[#anim_mutators+1] = v
Impact: high
Show code
table.insert(anim_mutators, {functor=functor, priority=priority})

aol_anim_transitions.script

L6 🟢 table_insert_append
table.insert(valid_anims, v) -> valid_anims[#valid_anims+1] = v
Impact: high
Show code
table.insert(valid_anims, anm_suffix)
L37 🟢 table_insert_append
table.insert(pattern_transitions[hud_section], v) -> pattern_transitions[hud_section][#pattern_transitions[hud_section]+1] = v
Impact: high
Show code
table.insert(pattern_transitions[hud_section], {
L99 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L128 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L15 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L32 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L3 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L10 🔴 global_write
Global write: transitions
Impact: low
Show code
transitions = {
L26 🔴 global_write
Global write: pattern_transitions
Impact: low
Show code
pattern_transitions = {
L162 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L51 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_items:r_line_ex(section,i,"","")

aol_sprint_cancel.script

L16 🔴 global_write
Global write: aol_anim_transitions_anm_transitions
Impact: low
Show code
aol_anim_transitions_anm_transitions = aol_anim_transitions.anm_transitions

loadouts_injector.script

L131 🟢 uncached_globals_summary
Cache 1 globals in xrs_rnd_npc_loadout.create_item_on_npc
Impact: medium
Show code
L159: math.random L163: math.random
L189 🟢 uncached_globals_summary
Cache 1 globals in create_item
Impact: medium
Show code
L202: math.random L205: math.random
L222 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR: NPC Loadouts | wrong ammo_type set for [%s], missing value in ammo_class", section)
L52 🔴 global_write
Global write: tmp
Impact: low
Show code
tmp = ini_loadouts:r_string_ex("settings","scope_chance")
L54 🔴 global_write
Global write: tmp
Impact: low
Show code
tmp = str_explode(tmp,",")
L74 🔴 global_write
Global write: tmp
Impact: low
Show code
tmp = str_explode(id,":")
L92 🔴 global_write
Global write: tokens
Impact: low
Show code
tokens = str_explode(loadout, "_")
L106 🔴 global_write
Global write: faction
Impact: low
Show code
faction, rank, slot = unpack(tokens)
L106 🔴 global_write
Global write: rank
Impact: low
Show code
faction, rank, slot = unpack(tokens)
L106 🔴 global_write
Global write: slot
Impact: low
Show code
faction, rank, slot = unpack(tokens)
L107 🔴 global_write
Global write: slot
Impact: low
Show code
slot = slots[slot]
L117 🔴 global_write
Global write: l
Impact: low
Show code
l = custom_loadouts[faction][rank][slot]
L130 🔴 global_write
Global write: CreateItem
Impact: low
Show code
CreateItem = xrs_rnd_npc_loadout.create_item_on_npc
L177 🔴 global_write
Global write: id
Impact: low
Show code
id = custom_tbl[pick]
L115 🟡 unused_local_variable
Local variable 'value' is assigned but never used
Impact: low
Show code
local _, id, value = ini_wep_loadouts:r_line_ex(weapons,i)

sassy_ithaca_trade_inject.script

L60 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! Trader has no supplies for this supply level [%s] - [%s]", npc_name, supply_level)
L74 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update
L41 🟡 unused_local_variable
Local variable 'format_table' is assigned but never used
Impact: low
Show code
local format_table = utils_data.print_table

shotgun_unjam_fix.script

L1 🔴 global_write
Global write: common
Impact: low
Show code
common = animation_common

trader_autoinject.script

L34 🟢 repeated_npc_id()
npc:id() called 3x in trade_manager.update
Impact: low
Show code
Cache npc:id() result
L182 🟢 repeated_item_section()
item:section() called 4x in itr_inv
Impact: low
Show code
Cache item:section() result
L16 🔴 global_write
Global write: find
Impact: low
Show code
find = string.find
L32 🔴 global_write
Global write: TraderUpdate
Impact: low
Show code
TraderUpdate = trade_manager.update

z_parts_inject.script

L1 🔴 global_write
Global write: cached_r_string_ex
Impact: low
Show code
cached_r_string_ex = itms_manager.ini_parts.r_string_ex
L2 🔴 global_write
Global write: cached_parse_list
Impact: low
Show code
cached_parse_list = _G.parse_list
L3 🔴 global_write
Global write: parts_custom
Impact: low
Show code
parts_custom = {}
L4 🔴 global_write
Global write: parts_custom_ini
Impact: low
Show code
parts_custom_ini = {

293- PDA Taskboard - iTheon

4 files (🟢7 🟡4 🔴14 🔵9)

optimized_time_events.script

L46 🟢 uncached_globals_summary
Cache 1 globals in print_table
Impact: medium
Show code
L55: type L57: type
L58 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = function",k)
L61 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s",k,utils_data.vector_to_string(v))
L63 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = userdata", k)
L68 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = true",k)
L70 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = true")
L74 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = false", k)
L76 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = false")
L81 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s", k,v)
L83 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = nil", k,v)
L222 🟡 unused_local_variable
Local variable 'tg_past' is assigned but never used
Impact: low
Show code
local tg_past = 0

pda_taskboard_mcm.script

L2 🔴 global_write
Global write: config
Impact: low
Show code
config = {
L8 🔴 global_write
Global write: op
Impact: low
Show code
op = {

ui_pda_taskboard_tab.script

L217 🟢 table_insert_append
table.insert(npc_list, v) -> npc_list[#npc_list+1] = v
Impact: high
Show code
table.insert(npc_list, obj)
L227 🟢 table_insert_append
table.insert(npc_list, v) -> npc_list[#npc_list+1] = v
Impact: high
Show code
table.insert(npc_list, npc)
L278 🟢 table_insert_append
table.insert(result[task_effect], v) -> result[task_effect][#result[task_effect]+1] = v
Impact: high
Show code
table.insert(result[task_effect], {
L424 🟢 table_insert_append
table.insert(result, v) -> result[#result+1] = v
Impact: high
Show code
table.insert(result, key)
L97 🔴 global_write
Global write: currently_processed_npc_id
Impact: low
Show code
currently_processed_npc_id = nil -- required for fetch quest override
L99 🔴 global_write
Global write: currently_processed_npc_id
Impact: low
Show code
currently_processed_npc_id = task_data.npc_id
L114 🔴 global_write
Global write: currently_processed_npc_id
Impact: low
Show code
currently_processed_npc_id = nil
L137 🔴 global_write
Global write: currently_processed_npc_id
Impact: low
Show code
currently_processed_npc_id = task_details.npc_id
L139 🔴 global_write
Global write: currently_processed_npc_id
Impact: low
Show code
currently_processed_npc_id = nil
L250 🔴 global_write
Global write: currently_processed_npc_id
Impact: low
Show code
currently_processed_npc_id = npc:id()
L256 🔴 global_write
Global write: currently_processed_npc_id
Impact: low
Show code
currently_processed_npc_id = nil
L432 🔴 global_write
Global write: normalizer
Impact: low
Show code
normalizer = {
L454 🔴 global_write
Global write: config
Impact: low
Show code
config = load_defaults()
L457 🔴 global_write
Global write: config
Impact: low
Show code
config = load_defaults()
L319 🟡 potential_nil_access
Potential nil access: 'stalker' from level.object_by_id() used without nil check
Impact: low
Show code
local stalker_comm = stalker:character_community()
L320 🟡 potential_nil_access
Potential nil access: 'stalker' from level.object_by_id() used without nil check
Impact: low
Show code
local stalker_icon = stalker:character_icon()
L321 🟡 potential_nil_access
Potential nil access: 'stalker' from level.object_by_id() used without nil check
Impact: low
Show code
local stalker_name = stalker:character_name()

z_taskboard_overrides.script

L7 🟢 table_insert_append
table.insert(tasks_info, v) -> tasks_info[#tasks_info+1] = v
Impact: high
Show code
table.insert(tasks_info, {
L60 🟢 table_insert_append
table.insert(tasks_info, v) -> tasks_info[#tasks_info+1] = v
Impact: high
Show code
table.insert(tasks_info, task_info)
L1 🔴 global_write
Global write: tasks_info
Impact: low
Show code
tasks_info = {}
L56 🔴 global_write
Global write: tasks_info
Impact: low
Show code
tasks_info = {}

294- Autolooter - iTheon

3 files (🟢12 🟡5 🔴11 🔵2)

auto_looter_mcm.script

L172 🟢 table_insert_append
table.insert(keys, v) -> keys[#keys+1] = v
Impact: high
Show code
table.insert(keys, k)
L177 🟢 table_insert_append
table.insert(result, v) -> result[#result+1] = v
Impact: high
Show code
table.insert(result, {
L226 🟢 table_insert_append
table.insert(keys, v) -> keys[#keys+1] = v
Impact: high
Show code
table.insert(keys, k)
L231 🟢 table_insert_append
table.insert(result, v) -> result[#result+1] = v
Impact: high
Show code
table.insert(result, {
L267 🟢 table_insert_append
table.insert(op.gr, v) -> op.gr[#op.gr+1] = v
Impact: high
Show code
table.insert(op.gr, v)
L264 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(_)
L266 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(v.id)
L1 🔴 global_write
Global write: disassemble_ammo_options
Impact: low
Show code
disassemble_ammo_options = {
L7 🔴 global_write
Global write: disassemble_armor_options
Impact: low
Show code
disassemble_armor_options = {
L13 🔴 global_write
Global write: disassemble_weapon_options
Impact: low
Show code
disassemble_weapon_options = {
L19 🔴 global_write
Global write: strip_weapon_options
Impact: low
Show code
strip_weapon_options = {
L25 🔴 global_write
Global write: disassemble_misc_items_defaults
Impact: low
Show code
disassemble_misc_items_defaults = {
L56 🔴 global_write
Global write: loot_misc_items_defaults
Impact: low
Show code
loot_misc_items_defaults = {
L89 🔴 global_write
Global write: loot_part_options
Impact: low
Show code
loot_part_options = {
L96 🔴 global_write
Global write: config
Impact: low
Show code
config = {
L131 🔴 global_write
Global write: op
Impact: low
Show code
op = {

z_auto_looter.script

L308 🟢 table_insert_append
table.insert(queued_weapons, v) -> queued_weapons[#queued_weapons+1] = v
Impact: high
Show code
table.insert(queued_weapons, wpn:id())
L100 🟢 repeated_actor_id()
actor:id() called 4x in auto_looter
Impact: low
Show code
Cache actor:id() result
L124 🟢 repeated_actor_id()
actor:id() called 3x in continue_looter
Impact: low
Show code
Cache actor:id() result
L280 🟢 repeated_wpn_id()
wpn:id() called 3x in handle_strip
Impact: low
Show code
Cache wpn:id() result
L21 🔴 global_write
Global write: config
Impact: low
Show code
config = load_defaults()
L24 🔴 global_write
Global write: config
Impact: low
Show code
config = load_defaults()
L73 🟡 potential_nil_access
Potential nil access: 'object_being_looted' from level.object_by_id() used without nil check
Impact: low
Show code
if object_being_looted and (not object_being_looted:alive()) and valid_modes[last_mode] then
L79 🟡 potential_nil_access
Potential nil access: 'target' from level.get_target_obj() used without nil check
Impact: low
Show code
if target and (IsStalker(target) and not target:alive() or IsInvbox(target)) then
L412 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check (auto-fixable)
Impact: low
Show code
sim:release(sim:object(actor:id()))
L412 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check (auto-fixable)
Impact: low
Show code
sim:release(sim:object(actor:id()))
L273 🟡 unused_local_variable
Local variable 'parts_not_stripped' is assigned but never used
Impact: low
Show code
local parts_not_stripped = false

zzzz_auto_looter_fix_by_kdvfirehawk.script

L40 🟢 uncached_globals_summary
Cache 1 globals in item_parts.get_suitable_dtool
Impact: medium
Show code
L51: pairs L58: pairs
L26 🟢 repeated_obj_d_section()
obj_d:section() called 4x in is_breaking_local
Impact: low
Show code
Cache obj_d:section() result
L148 🟢 repeated_v_id()
v:id() called 3x in handle_disassemble
Impact: low
Show code
Cache v:id() result

296- Atmospherics Shaders Weathers and Reshade - Hippobot

2 files (🟢0 🟡2 🔴7 🔵1)

fogFX.script

L65 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 0
L66 🔴 global_write
Global write: delay
Impact: low
Show code
delay = 100 -- time in milliseconds between each update. By default actor_on_update is run *every frame*.
L68 🔴 global_write
Global write: tg
Impact: low
Show code
tg = time_global()
L71 🔴 global_write
Global write: grok_delay
Impact: low
Show code
grok_delay = tg + delay
L72 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 1
L76 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 0
L80 🔴 global_write
Global write: play_leaves
Impact: low
Show code
play_leaves = leaves_maps[actor_level]
L79 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local actor_level = sim:level_name(gg:vertex(sim:actor().m_game_vertex_id):level_id())
L79 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local actor_level = sim:level_name(gg:vertex(sim:actor().m_game_vertex_id):level_id())

yawm_effects.script

L2 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("No snowfall")

296- Custom Companions Squad Size - CatspawMods

2 files (🟢0 🟡0 🔴10 🔵1)

catsy_customsquadsize_mcm.script

L9 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "customsquadsize", sh=true, gr={

custom_companion_squad_size.script

L21 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(logtext, ...)
L4 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "1.4"
L5 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20240907
L14 🔴 global_write
Global write: use_custom_squad_size
Impact: low
Show code
use_custom_squad_size = false -- Edit this to true to use without MCM
L15 🔴 global_write
Global write: squad_size_normal
Impact: low
Show code
squad_size_normal = 2 -- Default actor squad size
L16 🔴 global_write
Global write: squad_size_folkhero
Impact: low
Show code
squad_size_folkhero = 4 -- Actor squad size with Patriarch achievement
L17 🔴 global_write
Global write: debuglogs
Impact: low
Show code
debuglogs = false -- Enables debug logging
L37 🔴 global_write
Global write: squad_size_normal
Impact: low
Show code
squad_size_normal = ui_mcm.get("customsquadsize/maxsquadsize")
L38 🔴 global_write
Global write: squad_size_folkhero
Impact: low
Show code
squad_size_folkhero = ui_mcm.get("customsquadsize/maxsquadsize_folkhero")
L39 🔴 global_write
Global write: use_custom_squad_size
Impact: low
Show code
use_custom_squad_size = true

300- Blood pool with trails and steps - xcvb

2 files (🟢0 🟡0 🔴16 🔵10)

blood_pool.script

L35 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
_G.printf(...)
L167 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("removing pool %s, %s", npc_id, p)
L170 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("found vec to remove %s, %s", npc_id, p)
L183 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("body %s settled", npc_id)
L188 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("body %s still moving", npc_id)
L201 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("body %s is moved", npc_id)
L246 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("actor died, spawn pool")
L268 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s near blood pool", obj:name())
L297 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("heading %s", heading)
L325 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("placing bloodstep for %s", obj:name())
L13 🔴 global_write
Global write: settings
Impact: low
Show code
settings = load_defaults()
L16 🔴 global_write
Global write: settings
Impact: low
Show code
settings = load_defaults()
L39 🔴 global_write
Global write: pool_starts_in
Impact: low
Show code
pool_starts_in = 5
L40 🔴 global_write
Global write: blood_textures_amount
Impact: low
Show code
blood_textures_amount = 24
L41 🔴 global_write
Global write: pool_size_mult
Impact: low
Show code
pool_size_mult = {
L89 🔴 global_write
Global write: boneList
Impact: low
Show code
boneList = {
L108 🔴 global_write
Global write: saved_pool
Impact: low
Show code
saved_pool = {}
L109 🔴 global_write
Global write: alreadyLeakedPools
Impact: low
Show code
alreadyLeakedPools = {}
L257 🔴 global_write
Global write: stepMaxCount
Impact: low
Show code
stepMaxCount = 10
L258 🔴 global_write
Global write: size
Impact: low
Show code
size = 0.17
L259 🔴 global_write
Global write: triggerDistance
Impact: low
Show code
triggerDistance = 0.7^2
L260 🔴 global_write
Global write: texture
Impact: low
Show code
texture = "blood_step_"
L351 🔴 global_write
Global write: og_npc_on_foot_step
Impact: low
Show code
og_npc_on_foot_step = z_npc_footsteps.npc_on_foot_step
L357 🔴 global_write
Global write: net_spawn
Impact: low
Show code
net_spawn = xr_motivator.motivator_binder.net_spawn
L379 🔴 global_write
Global write: net_destroy
Impact: low
Show code
net_destroy = xr_motivator.motivator_binder.net_destroy

blood_pool_mcm.script

L1 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "blood_pool",sh=true ,gr={

301- Immersive Skinning - Utjan

1 file (🟢1 🟡1 🔴5 🔵0)

immersive_skinning.script

L302 🟢 repeated_obj_mutant_id()
obj_mutant:id() called 4x in loadBones
Impact: low
Show code
Cache obj_mutant:id() result
L1 🔴 global_write
Global write: kind_to_section
Impact: low
Show code
kind_to_section = {
L18 🔴 global_write
Global write: clsid_to_section
Impact: low
Show code
clsid_to_section = {
L39 🔴 global_write
Global write: clsdbg_to_section
Impact: low
Show code
clsdbg_to_section = {
L56 🔴 global_write
Global write: monsterTable
Impact: low
Show code
monsterTable = {
L351 🔴 global_write
Global write: Loot
Impact: low
Show code
Loot = ui_mutant_loot.UIMutantLoot.Loot
L362 🟡 unused_local_variable
Local variable 'mutantType' is assigned but never used
Impact: low
Show code
local mutantType = getMutantType(obj_mutant)

302- Minimalist companion UI moddb - Kageeskl

1 file (🟢1 🟡1 🔴5 🔵0)

immersive_skinning.script

L302 🟢 repeated_obj_mutant_id()
obj_mutant:id() called 4x in loadBones
Impact: low
Show code
Cache obj_mutant:id() result
L1 🔴 global_write
Global write: kind_to_section
Impact: low
Show code
kind_to_section = {
L18 🔴 global_write
Global write: clsid_to_section
Impact: low
Show code
clsid_to_section = {
L39 🔴 global_write
Global write: clsdbg_to_section
Impact: low
Show code
clsdbg_to_section = {
L56 🔴 global_write
Global write: monsterTable
Impact: low
Show code
monsterTable = {
L351 🔴 global_write
Global write: Loot
Impact: low
Show code
Loot = ui_mutant_loot.UIMutantLoot.Loot
L362 🟡 unused_local_variable
Local variable 'mutantType' is assigned but never used
Impact: low
Show code
local mutantType = getMutantType(obj_mutant)

307- French Rework Improved Translation & Enhanced Style - Thundard

1 file (🟢3 🟡17 🔴10 🔵19)

sim_offline_combat.script

L103 🟢 uncached_globals_summary
Cache 1 globals in smart_terrain_on_update
Impact: medium
Show code
L107: pairs L120: pairs
L235 🟢 uncached_globals_summary
Cache 1 globals in coordinator
Impact: medium
Show code
L291: pairs L301: pairs
L514 🟢 uncached_globals_summary
Cache 1 globals in send_battle_banter
Impact: medium
Show code
L523: math.random L527: math.random
L142 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("% OCS | Battle in smart [%s]", smart:name())
L143 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("------------------------------------------------------------------------")
L154 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("% OCS | Battle in smart [%s]", smart:name())
L155 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("------------------------------------------------------------------------")
L169 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!!! TRYING TO REGISTER NON-SQUAD AS SQUAD")
L208 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("------------------------------------------------------------------------")
L219 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("------------------------------------------------------------------------")
L361 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("- OCS | Combat Distance: %s - Execlude special characters: %s - Mutants included: %s", opt_dist, opt_exclude, can_fight_mutant)
L424 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("% OCS | [%s] is special, [%s] is removed", squad_1:name(), squad_2:name())
L438 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("% OCS | [%s] is special, [%s] is removed", squad_2:name(), squad_1:name())
L509 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("BANTER PAIR, banter: %s, reply: %s", banter, reply)
L515 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Attempting to send battle banter")
L524 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Attempting to send battle banter 1")
L529 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Attempting to send battle banter 2")
L574 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("OFFLINE BATTLE OCCURRED BETWEEN %s and %s", squad_1:name(), squad_2:name())
L582 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/ OCS | %s | Attacker [%s](Power: %s) vs Victim [%s](Power: %s) | Damage: %s",
L593 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! OCS | Squad gone [%s] | Moment: %s sec", squad_2:name(), math_ceil(time_global()/1000))
L612 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ OCS | Squad [%s] lost NPC [%s] | Remaining power: %s | Moment: %s sec", squad_2:name(), se_victim:name(), ocs_power[id_2], math_ceil(time_global()/1000))
L619 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! OCS | Squad gone [%s] | Moment: %s sec", squad_2:name(), math_ceil(time_global()/1000))
L53 🔴 global_write
Global write: task_squads
Impact: low
Show code
task_squads = {}
L55 🔴 global_write
Global write: story_id_communities
Impact: low
Show code
story_id_communities = {}
L56 🔴 global_write
Global write: ignore_list
Impact: low
Show code
ignore_list = {}
L59 🔴 global_write
Global write: ocs_power
Impact: low
Show code
ocs_power = {}
L60 🔴 global_write
Global write: opponents
Impact: low
Show code
opponents = {}
L61 🔴 global_write
Global write: squads_by_level
Impact: low
Show code
squads_by_level = {}
L139 🔴 global_write
Global write: in_combat
Impact: low
Show code
in_combat = validate_enemy(sim, lid_1, squad_1, id_1, id_t, community_1)
L151 🔴 global_write
Global write: in_combat
Impact: low
Show code
in_combat = validate_enemy(sim, lid_1, squad_1, id_1, id_2, community_1)
L530 🔴 global_write
Global write: npc_c
Impact: low
Show code
npc_c = npc_a
L828 🔴 global_write
Global write: task_squads
Impact: low
Show code
task_squads = m_data.offline_task_squads or {}
L121 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local squad_1 = sim:object(id_1)
L123 🟡 potential_nil_access
Potential nil access: 'squad_1' from :object() used without nil check
Impact: low
Show code
if squad_1 and (not squad_1.online) and SIMBOARD.squads[squad_1.id] and (squad_1:npc_count() > 0)
L292 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local squad = sim:object(id)
L303 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_npc = id and sim:object(id)
L304 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local squad = se_npc and se_npc.group_id and se_npc.group_id ~= 65535 and sim:object(se_npc.group_id)
L313 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local squad = sim:object(id)
L314 🟡 potential_nil_access
Potential nil access: 'squad' from :object() used without nil check
Impact: low
Show code
local section = squad and squad:section_name()
L387 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local squad_2 = id_2 and sim:object(id_2)
L731 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = k.id and sim:object(k.id)
L40 🟡 unused_local_variable
Local variable 'MONSTER_MULTI' is assigned but never used
Impact: low
Show code
local MONSTER_MULTI = 1 -- multiplier for mutants rank
L48 🟡 unused_local_variable
Local variable 'smart_battles_only' is assigned but never used
Impact: low
Show code
local smart_battles_only
L50 🟡 unused_local_variable
Local variable 'string_find' is assigned but never used
Impact: low
Show code
local is_enemy, string_find, math_random, math_ceil, math_max, math_pow = game_relations.is_factions_enemies, string.find, math.random, math.ceil, math.max, math.pow
L66 🟡 unused_local_variable
Local variable 'c_cnt' is assigned but never used
Impact: low
Show code
local c_cnt, c_tbl = 0, {} -- enemies collector
L66 🟡 unused_local_variable
Local variable 'c_tbl' is assigned but never used
Impact: low
Show code
local c_cnt, c_tbl = 0, {} -- enemies collector
L572 🟡 unused_local_variable
Local variable 'squad1_faction' is assigned but never used
Impact: low
Show code
local squad1_faction = get_faction_name(squad_1:name())
L573 🟡 unused_local_variable
Local variable 'squad2_faction' is assigned but never used
Impact: low
Show code
local squad2_faction = get_faction_name(squad_2:name())
L815 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_ocs:r_line_ex("ignore_list",i,"","")

311- NPC Stop Looting Dead Bodies - DTTheGunslinger

1 file (🟢5 🟡6 🔴5 🔵4)

death_manager.script

L42 🟢 uncached_globals_summary
Cache 3 globals in init_drop_settings
Impact: medium
Show code
L52: pairs L53: pairs L67: tonumber L83: tonumber L85: math.ceil L85: math.ceil
L507 🟢 uncached_globals_summary
Cache 1 globals in itr
Impact: medium
Show code
L513: math.random L516: math.random
L550 🟢 uncached_globals_summary
Cache 1 globals in set_weapon_drop_condition
Impact: medium
Show code
L555: math.random L557: math.random
L509 🟢 repeated_itm_section()
itm:section() called 3x in itr
Impact: low
Show code
Cache itm:section() result
L574 🟢 repeated_itm_section()
itm:section() called 3x in set_weapon_drop_condition
Impact: low
Show code
Cache itm:section() result
L886 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str = str .. " , " .. info.sec .. " (" .. info.num .. ")" .. add
L340 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR [%s] is not spawned by ItemProcessor",section)
L871 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("----------------------------------------------------------")
L888 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(str)
L890 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("----------------------------------------------------------")
L21 🔴 global_write
Global write: item_by_story_id
Impact: low
Show code
item_by_story_id = {}
L62 🔴 global_write
Global write: result
Impact: low
Show code
result, id, value = death_ini:r_line_ex(x,i,"","")
L103 🔴 global_write
Global write: item_by_story_id
Impact: low
Show code
item_by_story_id = {}
L153 🔴 global_write
Global write: items_by_npc
Impact: low
Show code
items_by_npc = {} -- table = trade, false = no trade, nil = not asked yet
L741 🔴 global_write
Global write: items_by_npc
Impact: low
Show code
items_by_npc = m_data.items_by_npc or {}
L210 🟡 potential_nil_access
Potential nil access: 'ini' from :spawn_ini() used without nil check
Impact: low
Show code
if ini and ini:section_exist("dont_spawn_loot") then
L387 🟡 potential_nil_access
Potential nil access: 'active_item' from :active_item() used without nil check
Impact: low
Show code
if active_item ~= nil and active_item:id() == item_id then
L399 🟡 potential_nil_access
Potential nil access: 'ini' from :spawn_ini() used without nil check
Impact: low
Show code
if ini and ini:section_exist("dont_keep_items") then
L26 🟡 unused_local_variable
Local variable 'visuals' is assigned but never used
Impact: low
Show code
local visuals = {}
L161 🟡 unused_local_variable
Local variable 'sim' is assigned but never used
Impact: low
Show code
local sim = alife()

315- SVU Reanimation & Remodel - BarryBogs

6 files (🟢9 🟡6 🔴11 🔵2)

animation_common.script

L31 🟢 table_insert_append
table.insert(anim_mutators, v) -> anim_mutators[#anim_mutators+1] = v
Impact: high
Show code
table.insert(anim_mutators, {functor=functor, priority=priority})
L86 🟢 repeated_item_section()
item:section() called 3x in actor_on_hud_animation_play
Impact: low
Show code
Cache item:section() result

aol_anim_transitions.script

L6 🟢 table_insert_append
table.insert(valid_anims, v) -> valid_anims[#valid_anims+1] = v
Impact: high
Show code
table.insert(valid_anims, anm_suffix)
L37 🟢 table_insert_append
table.insert(pattern_transitions[hud_section], v) -> pattern_transitions[hud_section][#pattern_transitions[hud_section]+1] = v
Impact: high
Show code
table.insert(pattern_transitions[hud_section], {
L99 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L128 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L15 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L32 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L3 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L10 🔴 global_write
Global write: transitions
Impact: low
Show code
transitions = {
L26 🔴 global_write
Global write: pattern_transitions
Impact: low
Show code
pattern_transitions = {
L162 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L51 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_items:r_line_ex(section,i,"","")

aol_sprint_cancel.script

L16 🔴 global_write
Global write: aol_anim_transitions_anm_transitions
Impact: low
Show code
aol_anim_transitions_anm_transitions = aol_anim_transitions.anm_transitions

fire_queue_cancel.script

L22 🟢 repeated_wpn_section()
wpn:section() called 4x in on_before_key_press
Impact: low
Show code
Cache wpn:section() result
L22 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
local class = wpn and wpn:section() and SYS_GetParam(0, wpn:section(), "class")
L22 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
local class = wpn and wpn:section() and SYS_GetParam(0, wpn:section(), "class")

svu_custom_inspects.script

L56 🟢 table_insert_append
table.insert(bore_anims, v) -> bore_anims[#bore_anims+1] = v
Impact: high
Show code
table.insert(bore_anims, {anm = "anm_bore"})
L57 🟢 table_insert_append
table.insert(bore_anims, v) -> bore_anims[#bore_anims+1] = v
Impact: high
Show code
table.insert(bore_anims, {anm = "anm_ammo_check", snd = "snd_ammo_check"})
L68 🟢 table_insert_append
table.insert(bore_anims, v) -> bore_anims[#bore_anims+1] = v
Impact: high
Show code
table.insert(bore_anims, {anm = "anm_bore_empty"})
L69 🟢 table_insert_append
table.insert(bore_anims, v) -> bore_anims[#bore_anims+1] = v
Impact: high
Show code
table.insert(bore_anims, {anm = "anm_ammo_check_empty", snd = "snd_ammo_check"})
L5 🔴 global_write
Global write: n
Impact: low
Show code
n = ini_sys:line_count(snd_path) or 0
L7 🔴 global_write
Global write: result
Impact: low
Show code
result, id, value = ini_sys:r_line_ex(snd_path,i,"","")
L7 🔴 global_write
Global write: id
Impact: low
Show code
result, id, value = ini_sys:r_line_ex(snd_path,i,"","")
L7 🔴 global_write
Global write: value
Impact: low
Show code
result, id, value = ini_sys:r_line_ex(snd_path,i,"","")
L29 🔴 global_write
Global write: valid_guns
Impact: low
Show code
valid_guns = {
L81 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
if key == DIK_keys.MOUSE_2 and arti_jamming and weapon and weapon:get_state() == 4 then

wpn_sway_enable.script

L4 🔴 global_write
Global write: valid_wpns
Impact: low
Show code
valid_wpns = {

316- SPAS12 Reanimation & Remodel - Firebreath

6 files (🟢4 🟡13 🔴11 🔵4)

animation_common.script

L31 🟢 table_insert_append
table.insert(anim_mutators, v) -> anim_mutators[#anim_mutators+1] = v
Impact: high
Show code
table.insert(anim_mutators, {functor=functor, priority=priority})
L86 🟢 repeated_item_section()
item:section() called 3x in actor_on_hud_animation_play
Impact: low
Show code
Cache item:section() result

aol_anim_transitions.script

L6 🟢 table_insert_append
table.insert(valid_anims, v) -> valid_anims[#valid_anims+1] = v
Impact: high
Show code
table.insert(valid_anims, anm_suffix)
L37 🟢 table_insert_append
table.insert(pattern_transitions[hud_section], v) -> pattern_transitions[hud_section][#pattern_transitions[hud_section]+1] = v
Impact: high
Show code
table.insert(pattern_transitions[hud_section], {
L99 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L128 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L15 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L32 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L3 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L10 🔴 global_write
Global write: transitions
Impact: low
Show code
transitions = {
L26 🔴 global_write
Global write: pattern_transitions
Impact: low
Show code
pattern_transitions = {
L162 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L51 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_items:r_line_ex(section,i,"","")

aol_sprint_cancel.script

L16 🔴 global_write
Global write: aol_anim_transitions_anm_transitions
Impact: low
Show code
aol_anim_transitions_anm_transitions = aol_anim_transitions.anm_transitions

jam_animations.script

L25 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
local hudSection = SYS_GetParam(0, item:section(), "hud", item:section())
L25 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
local hudSection = SYS_GetParam(0, item:section(), "hud", item:section())
L30 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
local ammo = item:get_ammo_in_magazine()
L42 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
item:play_hud_motion(animName, true, 4, 1, 0)

shotgun_unjam_fix.script

L1 🔴 global_write
Global write: common
Impact: low
Show code
common = animation_common

utjan_mag_check.script

L14 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!Old mag check script (ammo_check_mcm) detected. Remove it to get full features of mag checks")
L91 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!Old mag check script (ammo_check_mcm) detected. Remove it to get full features of mag checks")
L3 🔴 global_write
Global write: do_ammo_check_anim
Impact: low
Show code
do_ammo_check_anim = nil
L6 🔴 global_write
Global write: base_check_Ammo
Impact: low
Show code
base_check_Ammo = ammo_check_mcm.check_Ammo
L63 🔴 global_write
Global write: do_ammo_check_anim
Impact: low
Show code
do_ammo_check_anim = 1
L67 🔴 global_write
Global write: do_ammo_check_anim
Impact: low
Show code
do_ammo_check_anim = nil
L87 🔴 global_write
Global write: do_ammo_check_anim
Impact: low
Show code
do_ammo_check_anim = 2
L27 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local currentState = weapon:get_state()
L28 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
if not (currentState == 0 or weapon:weapon_in_grenade_mode()) then
L34 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local currentAmmo = weapon:get_ammo_in_magazine()
L40 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local sec = SYS_GetParam(0, weapon:section(), "parent_section") or weapon:section()
L40 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local sec = SYS_GetParam(0, weapon:section(), "parent_section") or weapon:section()
L64 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
weapon:switch_state(4)

318- BAS Saiga Reanimation v2 - Synd1cate

4 files (🟢3 🟡3 🔴6 🔵2)

animation_common.script

L31 🟢 table_insert_append
table.insert(anim_mutators, v) -> anim_mutators[#anim_mutators+1] = v
Impact: high
Show code
table.insert(anim_mutators, {functor=functor, priority=priority})

aol_anim_transitions.script

L6 🟢 table_insert_append
table.insert(valid_anims, v) -> valid_anims[#valid_anims+1] = v
Impact: high
Show code
table.insert(valid_anims, anm_suffix)
L37 🟢 table_insert_append
table.insert(pattern_transitions[hud_section], v) -> pattern_transitions[hud_section][#pattern_transitions[hud_section]+1] = v
Impact: high
Show code
table.insert(pattern_transitions[hud_section], {
L99 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L128 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L15 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L32 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L3 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L10 🔴 global_write
Global write: transitions
Impact: low
Show code
transitions = {
L26 🔴 global_write
Global write: pattern_transitions
Impact: low
Show code
pattern_transitions = {
L162 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L51 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_items:r_line_ex(section,i,"","")

aol_sprint_cancel.script

L16 🔴 global_write
Global write: aol_anim_transitions_anm_transitions
Impact: low
Show code
aol_anim_transitions_anm_transitions = aol_anim_transitions.anm_transitions

shotgun_unjam_fix.script

L1 🔴 global_write
Global write: common
Impact: low
Show code
common = animation_common

319- Vihr Reanimation - SeDzhiMol

4 files (🟢4 🟡3 🔴6 🔵4)

animation_common.script

L31 🟢 table_insert_append
table.insert(anim_mutators, v) -> anim_mutators[#anim_mutators+1] = v
Impact: high
Show code
table.insert(anim_mutators, {functor=functor, priority=priority})
L83 🟢 repeated_item_section()
item:section() called 3x in actor_on_hud_animation_play
Impact: low
Show code
Cache item:section() result
L63 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("stop_all_sound_object(sec): %s", sec)
L67 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("sec: %s| Stopping: %s", sec, path)

aol_anim_transitions.script

L6 🟢 table_insert_append
table.insert(valid_anims, v) -> valid_anims[#valid_anims+1] = v
Impact: high
Show code
table.insert(valid_anims, anm_suffix)
L37 🟢 table_insert_append
table.insert(pattern_transitions[hud_section], v) -> pattern_transitions[hud_section][#pattern_transitions[hud_section]+1] = v
Impact: high
Show code
table.insert(pattern_transitions[hud_section], {
L99 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L128 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L15 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L32 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L3 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L10 🔴 global_write
Global write: transitions
Impact: low
Show code
transitions = {
L26 🔴 global_write
Global write: pattern_transitions
Impact: low
Show code
pattern_transitions = {
L162 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L51 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_items:r_line_ex(section,i,"","")

aol_sprint_cancel.script

L16 🔴 global_write
Global write: aol_anim_transitions_anm_transitions
Impact: low
Show code
aol_anim_transitions_anm_transitions = aol_anim_transitions.anm_transitions

shotgun_unjam_fix.script

L1 🔴 global_write
Global write: common
Impact: low
Show code
common = animation_common

320- PP2000 Remodel & Reanimation - SeDzhiMol

4 files (🟢4 🟡3 🔴6 🔵2)

animation_common.script

L31 🟢 table_insert_append
table.insert(anim_mutators, v) -> anim_mutators[#anim_mutators+1] = v
Impact: high
Show code
table.insert(anim_mutators, {functor=functor, priority=priority})
L86 🟢 repeated_item_section()
item:section() called 3x in actor_on_hud_animation_play
Impact: low
Show code
Cache item:section() result

aol_anim_transitions.script

L6 🟢 table_insert_append
table.insert(valid_anims, v) -> valid_anims[#valid_anims+1] = v
Impact: high
Show code
table.insert(valid_anims, anm_suffix)
L37 🟢 table_insert_append
table.insert(pattern_transitions[hud_section], v) -> pattern_transitions[hud_section][#pattern_transitions[hud_section]+1] = v
Impact: high
Show code
table.insert(pattern_transitions[hud_section], {
L99 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L128 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L15 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L32 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L3 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L10 🔴 global_write
Global write: transitions
Impact: low
Show code
transitions = {
L26 🔴 global_write
Global write: pattern_transitions
Impact: low
Show code
pattern_transitions = {
L162 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L51 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_items:r_line_ex(section,i,"","")

aol_sprint_cancel.script

L16 🔴 global_write
Global write: aol_anim_transitions_anm_transitions
Impact: low
Show code
aol_anim_transitions_anm_transitions = aol_anim_transitions.anm_transitions

shotgun_unjam_fix.script

L1 🔴 global_write
Global write: common
Impact: low
Show code
common = animation_common

321- 9a91 Reanimation - SeDzhiMol

4 files (🟢4 🟡3 🔴6 🔵4)

animation_common.script

L31 🟢 table_insert_append
table.insert(anim_mutators, v) -> anim_mutators[#anim_mutators+1] = v
Impact: high
Show code
table.insert(anim_mutators, {functor=functor, priority=priority})
L83 🟢 repeated_item_section()
item:section() called 3x in actor_on_hud_animation_play
Impact: low
Show code
Cache item:section() result
L63 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("stop_all_sound_object(sec): %s", sec)
L67 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("sec: %s| Stopping: %s", sec, path)

aol_anim_transitions.script

L6 🟢 table_insert_append
table.insert(valid_anims, v) -> valid_anims[#valid_anims+1] = v
Impact: high
Show code
table.insert(valid_anims, anm_suffix)
L37 🟢 table_insert_append
table.insert(pattern_transitions[hud_section], v) -> pattern_transitions[hud_section][#pattern_transitions[hud_section]+1] = v
Impact: high
Show code
table.insert(pattern_transitions[hud_section], {
L99 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L128 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L15 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L32 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L3 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L10 🔴 global_write
Global write: transitions
Impact: low
Show code
transitions = {
L26 🔴 global_write
Global write: pattern_transitions
Impact: low
Show code
pattern_transitions = {
L162 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L51 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_items:r_line_ex(section,i,"","")

aol_sprint_cancel.script

L16 🔴 global_write
Global write: aol_anim_transitions_anm_transitions
Impact: low
Show code
aol_anim_transitions_anm_transitions = aol_anim_transitions.anm_transitions

shotgun_unjam_fix.script

L1 🔴 global_write
Global write: common
Impact: low
Show code
common = animation_common

327- Semi Radiant AI - xcvb

2 files (🟢1 🟡0 🔴1 🔵0)

semiradiant_ai_mcm.script

L15 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "rad_ai",sh=true ,gr={

xr_cond_snipers_add.script

L25 🟢 repeated_wpn_section()
wpn:section() called 4x in <global>
Impact: low
Show code
Cache wpn:section() result

328- Higher Rank NPCs Headlight Disabled - KraizerX

1 file (🟢0 🟡1 🔴1 🔵0)

tmp9.script

L5 🔴 global_write
Global write: some_sr_light_patch
Impact: low
Show code
some_sr_light_patch = sr_light.check_light
L27 🟡 potential_nil_access
Potential nil access: 'torch' from :object() used without nil check
Impact: low
Show code
if (torch and torch:attachable_item_enabled()) then

329- Fair Fast Travel - Catspaw

1 file (🟢7 🟡9 🔴68 🔵2)

game_fast_travel.script

L961 🟢 math_pow_simple
math.pow(warfare.distance_to_xz_sqr(global_position.from(alife_object(smart.id)), global_position.from(target)), 0.5) -> math.sqrt(warfare.distance_to_xz_sqr(global_position.from(alife_object(smart.id)), global_position.from(target)))
Impact: high
Show code
return math.pow(warfare.distance_to_xz_sqr(global_position.from(alife_object(smart.id)),global_position.from(target)), 0.5)
L661 🟢 uncached_globals_summary
Cache 1 globals in fftd_generate_mapspot_text
Impact: medium
Show code
L707: math.floor L708: math.floor
L737 🟢 uncached_globals_summary
Cache 2 globals in map_spot_menu_add_property
Impact: medium
Show code
L757: math.floor L758: math.floor L770: tostring L771: tostring
L862 🟢 uncached_globals_summary
Cache 1 globals in nearest_guidespot
Impact: medium
Show code
L879: pairs L912: pairs
L1001 🟢 uncached_globals_summary
Cache 1 globals in distance_to_duration
Impact: medium
Show code
L1019: math.random L1023: math.random
L1247 🟢 uncached_globals_summary
Cache 1 globals in mcm_oldver_import
Impact: medium
Show code
L1252: pairs L1254: pairs
L1281 🟢 uncached_globals_summary
Cache 2 globals in update_mcm
Impact: medium
Show code
L1297: tonumber L1298: tonumber L1303: pairs L1305: pairs
L376 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("<FFT> "..logtext,...)
L1251 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("<FFT> Performing one-time import of pre-1.8 Fair Fast Travel settings\nYou may see MCM complain about a bunch of nil values; this is harmless and expected")
L21 🔴 global_write
Global write: longnames
Impact: low
Show code
longnames = false
L22 🔴 global_write
Global write: markermessage
Impact: low
Show code
markermessage = false
L23 🔴 global_write
Global write: basecfg
Impact: low
Show code
basecfg = {
L50 🔴 global_write
Global write: tsmarts
Impact: low
Show code
tsmarts = nil
L54 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "2.3.2"
L66 🔴 global_write
Global write: skillsystem_exists
Impact: low
Show code
skillsystem_exists = (haru_skills ~= nil)
L67 🔴 global_write
Global write: skillsystem_enabled
Impact: low
Show code
skillsystem_enabled = false
L68 🔴 global_write
Global write: skillsystem_started
Impact: low
Show code
skillsystem_started = false
L69 🔴 global_write
Global write: tick_int
Impact: low
Show code
tick_int = 1080
L71 🔴 global_write
Global write: stored_satiety
Impact: low
Show code
stored_satiety = 1
L72 🔴 global_write
Global write: survival_paused
Impact: low
Show code
survival_paused = false
L73 🔴 global_write
Global write: skillspeed_coef
Impact: low
Show code
skillspeed_coef = 1.0
L74 🔴 global_write
Global write: dist_cost_coef
Impact: low
Show code
dist_cost_coef = 5
L75 🔴 global_write
Global write: enc_damage_mult
Impact: low
Show code
enc_damage_mult = 0.2
L76 🔴 global_write
Global write: npc_combat_timeout
Impact: low
Show code
npc_combat_timeout = 10000
L77 🔴 global_write
Global write: npc_combat_distance
Impact: low
Show code
npc_combat_distance = 100
L79 🔴 global_write
Global write: combat_npcs
Impact: low
Show code
combat_npcs = {}
L80 🔴 global_write
Global write: flags
Impact: low
Show code
flags = {}
L81 🔴 global_write
Global write: trip_in_progress
Impact: low
Show code
trip_in_progress = false
L82 🔴 global_write
Global write: guide_travel
Impact: low
Show code
guide_travel = true -- Enable hiring guides from the PDA - configurable in MCM
L83 🔴 global_write
Global write: guide_travel_time
Impact: low
Show code
guide_travel_time = true -- If true, guide travel includes the time it takes the guide to reach you
L84 🔴 global_write
Global write: guides_local_only
Impact: low
Show code
guides_local_only = false -- If true, guides will only come meet you if you're on the same map
L85 🔴 global_write
Global write: guide_max_dist
Impact: low
Show code
guide_max_dist = nil -- The max distance a guide will travel to meet you, or nil if no limit
L87 🔴 global_write
Global write: guides_ignore_status
Impact: low
Show code
guides_ignore_status = true -- If enabled, guides ignore wounded and overweight status for fast travel
L89 🔴 global_write
Global write: ftdisguisefix
Impact: low
Show code
ftdisguisefix = true -- Whether to use FFTD's fix for disguises getting exposed when you fast travel
L90 🔴 global_write
Global write: allow_debug_travel
Impact: low
Show code
allow_debug_travel = false
L91 🔴 global_write
Global write: shared_ft_cooldown
Impact: low
Show code
shared_ft_cooldown = false
L92 🔴 global_write
Global write: allow_open_bp
Impact: low
Show code
allow_open_bp = false -- Re-enables vanilla feature of opening backpacks from anywhere on the map
L93 🔴 global_write
Global write: use_warfare_fix
Impact: low
Show code
use_warfare_fix = false -- Fix for WAO compatibility, skips adding fast travel icons to map
L94 🔴 global_write
Global write: cond_damage_mode
Impact: low
Show code
cond_damage_mode = 1
L95 🔴 global_write
Global write: disable_gear_damage
Impact: low
Show code
disable_gear_damage = false -- Killswitch for gear damage feature
L96 🔴 global_write
Global write: minimum_health
Impact: low
Show code
minimum_health = 0
L97 🔴 global_write
Global write: minimum_satiety
Impact: low
Show code
minimum_satiety = 0
L113 🔴 global_write
Global write: travel_data
Impact: low
Show code
travel_data = {
L217 🔴 global_write
Global write: guide_ignored_levels
Impact: low
Show code
guide_ignored_levels = {
L238 🔴 global_write
Global write: faction_guides
Impact: low
Show code
faction_guides = {
L283 🔴 global_write
Global write: guides_by_level_name
Impact: low
Show code
guides_by_level_name = {}
L287 🔴 global_write
Global write: guidespots_by_level_name
Impact: low
Show code
guidespots_by_level_name = {
L422 🔴 global_write
Global write: flags
Impact: low
Show code
flags = {}
L1044 🔴 global_write
Global write: trip_in_progress
Impact: low
Show code
trip_in_progress = false
L1123 🔴 global_write
Global write: survival_paused
Impact: low
Show code
survival_paused = false
L1128 🔴 global_write
Global write: stored_satiety
Impact: low
Show code
stored_satiety = cond:GetSatiety()
L1138 🔴 global_write
Global write: survival_paused
Impact: low
Show code
survival_paused = false
L1159 🔴 global_write
Global write: using_guide
Impact: low
Show code
using_guide = tt == "gt"
L1171 🔴 global_write
Global write: trip_in_progress
Impact: low
Show code
trip_in_progress= true
L1210 🔴 global_write
Global write: survival_paused
Impact: low
Show code
if pause_survival then survival_paused = true end
L1242 🔴 global_write
Global write: trip_in_progress
Impact: low
Show code
trip_in_progress = false
L1286 🔴 global_write
Global write: skillsystem_enabled
Impact: low
Show code
skillsystem_enabled = ui_mcm.get("fftd/gen/skillsystem_enabled")
L1287 🔴 global_write
Global write: shared_ft_cooldown
Impact: low
Show code
shared_ft_cooldown = ui_mcm.get("fftd/gen/shared_cooldown")
L1288 🔴 global_write
Global write: npc_combat_dist
Impact: low
Show code
npc_combat_dist = ui_mcm.get("fftd/gen/combat_dist") or npc_combat_dist
L1289 🔴 global_write
Global write: npc_combat_timeout
Impact: low
Show code
npc_combat_timeout = ui_mcm.get("fftd/gen/combat_timeout") or npc_combat_timeout
L1290 🔴 global_write
Global write: allow_debug_travel
Impact: low
Show code
allow_debug_travel = ui_mcm.get("fftd/gen/allow_debug_travel")
L1291 🔴 global_write
Global write: allow_open_bp
Impact: low
Show code
allow_open_bp = ui_mcm.get("fftd/gen/allow_open_bp")
L1292 🔴 global_write
Global write: use_warfare_fix
Impact: low
Show code
use_warfare_fix = ui_mcm.get("fftd/gen/use_warfare_fix")
L1295 🔴 global_write
Global write: tick_int
Impact: low
Show code
tick_int = ti
L1297 🔴 global_write
Global write: cond_damage_mode
Impact: low
Show code
cond_damage_mode = tonumber(ui_mcm.get("fftd/gen/cond_dmg_mode")) or 0
L1298 🔴 global_write
Global write: minimum_health
Impact: low
Show code
minimum_health = clamp(tonumber(ui_mcm.get("fftd/gen/minimum_health") or minimum_health),0,1)
L1299 🔴 global_write
Global write: minimum_satiety
Impact: low
Show code
minimum_satiety = clamp(tonumber(ui_mcm.get("fftd/gen/minimum_satiety") or minimum_satiety),0,1)
L1327 🔴 global_write
Global write: guide_travel_time
Impact: low
Show code
guide_travel_time = gtcfg.add_travel_time
L1328 🔴 global_write
Global write: guides_local_only
Impact: low
Show code
guides_local_only = gtcfg.local_only
L1334 🔴 global_write
Global write: skillspeed_coef
Impact: low
Show code
skillspeed_coef = dec2(1 / haru_skills.skills_stats["endurance"].speed_modifier)
L1400 🔴 global_write
Global write: longnames
Impact: low
Show code
longnames = ui_options.get("gameplay/fast_travel/long_names")
L1401 🔴 global_write
Global write: markermessage
Impact: low
Show code
markermessage = ui_options.get("gameplay/fast_travel/visit_message")
L1405 🔴 global_write
Global write: tsmarts
Impact: low
Show code
tsmarts = utils_data.collect_section(pini,faction,true)
L1465 🔴 global_write
Global write: skillsystem_started
Impact: low
Show code
skillsystem_started = end_lvl ~= nil
L1476 🔴 global_write
Global write: survival_paused
Impact: low
Show code
survival_paused = fts.survival_paused
L1483 🔴 global_write
Global write: stored_satiety
Impact: low
Show code
stored_satiety = fts.stored_satiety
L1534 🔴 global_write
Global write: guide_max_dist
Impact: low
Show code
guide_max_dist = guide_max_dist or 50000
L438 🟡 potential_nil_access
Potential nil access: 'bkpk' from :item_in_slot() used without nil check (auto-fixable)
Impact: low
Show code
w = w + (bkpk and ini_sys:r_float_ex(bkpk:section(),"additional_inventory_weight") or 0)
L502 🟡 potential_nil_access
Potential nil access: 'suit' from :item_in_slot() used without nil check (auto-fixable)
Impact: low
Show code
overweight = (db.actor:get_total_weight() - db.actor:get_actor_max_walk_weight() - (suit and suit:get_additional_max_weight() or 0) - bbp_extra_weight()) > 0
L529 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local cond = actor:cast_Actor():conditions()
L1152 🟡 potential_nil_access
Potential nil access: 'b' from level.object_by_id() used without nil check
Impact: low
Show code
b:use(db.actor)
L1412 🟡 potential_nil_access
Potential nil access: 'smart' from :object() used without nil check
Impact: low
Show code
if (smart and smart:clsid() == clsid.smart_terrain and tsmarts[smart:name()]) then
L1412 🟡 potential_nil_access
Potential nil access: 'smart' from :object() used without nil check
Impact: low
Show code
if (smart and smart:clsid() == clsid.smart_terrain and tsmarts[smart:name()]) then
L88 🟡 unused_local_variable
Local variable 'ftuseoldcalcs' is assigned but never used
Impact: low
Show code
local ftuseoldcalcs = false -- Whether to use vanilla Anomaly distance formula instead of FFTD's
L901 🟡 unused_local_variable
Local variable 'ct' is assigned but never used
Impact: low
Show code
local ct = 0
L920 🟡 unused_local_variable
Local variable 'refused' is assigned but never used
Impact: low
Show code
local refused = 0

329- Fair Fast Travel 2.7+ - Catspaw

7 files (🟢13 🟡22 🔴150 🔵15)

catsy_fftd_mcm.script

L64 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "fftd", gr={
L318 🟡 unused_local_variable
Local variable 'head' is assigned but never used
Impact: low
Show code
local head = xml:InitStatic("box",anchor)

game_backpack_travel.script

L22 🔴 global_write
Global write: bp_travel
Impact: low
Show code
bp_travel = nil
L23 🔴 global_write
Global write: bp_combat
Impact: low
Show code
bp_combat = nil
L24 🔴 global_write
Global write: bp_damage
Impact: low
Show code
bp_damage = nil
L25 🔴 global_write
Global write: bp_notime
Impact: low
Show code
bp_notime = nil
L26 🔴 global_write
Global write: bp_storm
Impact: low
Show code
bp_storm = nil
L27 🔴 global_write
Global write: bp_weight
Impact: low
Show code
bp_weight = nil
L30 🔴 global_write
Global write: bp_travel
Impact: low
Show code
bp_travel = ui_options.get("gameplay/backpack_travel/state")
L31 🔴 global_write
Global write: bp_combat
Impact: low
Show code
bp_combat = ui_options.get("gameplay/backpack_travel/on_combat")
L32 🔴 global_write
Global write: bp_damage
Impact: low
Show code
bp_damage = ui_options.get("gameplay/backpack_travel/on_damage")
L33 🔴 global_write
Global write: bp_notime
Impact: low
Show code
bp_notime = ui_options.get("gameplay/backpack_travel/time")
L34 🔴 global_write
Global write: bp_storm
Impact: low
Show code
bp_storm = ui_options.get("gameplay/backpack_travel/on_emission")
L35 🔴 global_write
Global write: bp_weight
Impact: low
Show code
bp_weight = ui_options.get("gameplay/backpack_travel/on_overweight")

game_fast_travel.script

L977 🟢 math_pow_simple
math.pow(warfare.distance_to_xz_sqr(global_position.from(obj_or_pos1, lvid1), global_position.from(obj_or_pos2, lvid2)), 0.5) -> math.sqrt(warfare.distance_to_xz_sqr(global_position.from(obj_or_pos1, lvid1), global_position.from(obj_or_pos2, lvid2)))
Impact: high
Show code
return math.pow(
L855 🟢 uncached_globals_summary
Cache 1 globals in map_spot_menu_add_property
Impact: medium
Show code
L909: tostring L928: tostring
L1029 🟢 uncached_globals_summary
Cache 1 globals in distance_to_duration
Impact: medium
Show code
L1048: math.random L1052: math.random
L1416 🟢 uncached_globals_summary
Cache 2 globals in update_mcm
Impact: medium
Show code
L1424: tonumber L1425: tonumber L1459: pairs L1461: pairs
L1628 🟢 uncached_globals_summary
Cache 2 globals in load_file_data
Impact: medium
Show code
L1633: pairs L1659: pairs L1635: tonumber L1706: tonumber
L707 🟢 repeated_level_name
level.name called 3x in parse_trip_tokens
Impact: low
Show code
local level_name = level.name()
L261 🟡 string_concat_in_loop
String concat in loop: dump = dump .. x
Impact: critical
Show code
dump = dump.."\n"..k.." = "..(v or "")
L33 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Fair Fast Travel v%s (rel %s) began initialization at %s", script_version, release_date, time_global())
L264 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(logprefix..dump)
L1419 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FFT] Loading settings from MCM - warnings about invalid paths are harmless and expected, ignore")
L4 🔴 global_write
Global write: script_name
Impact: low
Show code
script_name = "game_fast_travel"
L5 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "2.18.1"
L6 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20250718.1
L39 🔴 global_write
Global write: logprefix
Impact: low
Show code
logprefix = "[FFT] "
L40 🔴 global_write
Global write: debuglogs
Impact: low
Show code
debuglogs = false
L41 🔴 global_write
Global write: verbose
Impact: low
Show code
verbose = false
L42 🔴 global_write
Global write: debug_dump
Impact: low
Show code
debug_dump = false
L56 🔴 global_write
Global write: debuglogs
Impact: low
Show code
if (debug_en ~= nil) then debuglogs = debug_en end
L57 🔴 global_write
Global write: verbose
Impact: low
Show code
if (verbose_en ~= nil) then verbose = verbose_en end
L58 🔴 global_write
Global write: debug_dump
Impact: low
Show code
if (dump_en ~= nil) then debug_dump = dump_en end
L76 🔴 global_write
Global write: skillsystem_exists
Impact: low
Show code
skillsystem_exists = (haru_skills ~= nil)
L77 🔴 global_write
Global write: stored_satiety
Impact: low
Show code
stored_satiety = 1
L78 🔴 global_write
Global write: locations_found
Impact: low
Show code
locations_found = 0
L79 🔴 global_write
Global write: campfire_dest_adj
Impact: low
Show code
campfire_dest_adj = {x = -1.5, y = 0, z = 0} -- to avoid depositing the player inside a lit campfire
L80 🔴 global_write
Global write: npe_shown
Impact: low
Show code
npe_shown = {}
L89 🔴 global_write
Global write: longnames
Impact: low
Show code
longnames = false
L90 🔴 global_write
Global write: markermessage
Impact: low
Show code
markermessage = false
L91 🔴 global_write
Global write: tsmarts
Impact: low
Show code
tsmarts = nil
L92 🔴 global_write
Global write: basecfg
Impact: low
Show code
basecfg = {
L131 🔴 global_write
Global write: distdur_string
Impact: low
Show code
distdur_string = def_distdur
L132 🔴 global_write
Global write: fare_string
Impact: low
Show code
fare_string = def_st_fare
L133 🔴 global_write
Global write: context_string
Impact: low
Show code
context_string = def_context
L134 🔴 global_write
Global write: guide_menu_text
Impact: low
Show code
guide_menu_text = "$dest. $clr_gld[$fareval $rubles] $clr_wht$distdur"
L135 🔴 global_write
Global write: vanilla_menu_text
Impact: low
Show code
vanilla_menu_text = "$dest. $clr_orn[$fareval $rubles]" -- vanilla style
L136 🔴 global_write
Global write: gated_menu_text
Impact: low
Show code
gated_menu_text = "$clr_ui2$dest. $clr_red$gated"
L162 🔴 global_write
Global write: td
Impact: low
Show code
td = {}
L163 🔴 global_write
Global write: all_travel_types
Impact: low
Show code
all_travel_types = {} -- public iterable quick string lookup for travel type name
L164 🔴 global_write
Global write: spawned_travel_zones
Impact: low
Show code
spawned_travel_zones = {}
L165 🔴 global_write
Global write: fast_travel_restrictors
Impact: low
Show code
fast_travel_restrictors = {}
L166 🔴 global_write
Global write: level_ids
Impact: low
Show code
level_ids = {}
L167 🔴 global_write
Global write: northern_maps
Impact: low
Show code
northern_maps = {}
L168 🔴 global_write
Global write: guide_ignored_levels
Impact: low
Show code
guide_ignored_levels = {} -- Levels in which guides will refuse to come meet you
L249 🔴 global_write
Global write: trip
Impact: low
Show code
trip = {}
L252 🔴 global_write
Global write: trip
Impact: low
Show code
trip = dup_table(default_trip_data)
L691 🔴 global_write
Global write: distance
Impact: low
Show code
distance = tostring(floor(dist * .01) * 0.1)..gts("st_fftd_mapspot_kilometers")
L693 🔴 global_write
Global write: distance
Impact: low
Show code
distance = tostring(floor(dist))..gts("st_fftd_mapspot_meters")
L1152 🔴 global_write
Global write: survival_paused
Impact: low
Show code
survival_paused = false
L1157 🔴 global_write
Global write: survival_paused
Impact: low
Show code
survival_paused = true
L1158 🔴 global_write
Global write: stored_satiety
Impact: low
Show code
stored_satiety = cond:GetSatiety()
L1168 🔴 global_write
Global write: survival_paused
Impact: low
Show code
survival_paused = false
L1227 🔴 global_write
Global write: trip
Impact: low
Show code
trip = trip or reset_trip_data()
L1344 🔴 global_write
Global write: using_guide
Impact: low
Show code
using_guide = trip.tt == "gt"
L1423 🔴 global_write
Global write: progressive_cost
Impact: low
Show code
progressive_cost = get_mcm("fftd/gen/progressive_cost", progressive_cost)
L1424 🔴 global_write
Global write: prog_coef_max
Impact: low
Show code
prog_coef_max = tonumber(get_mcm("fftd/gen/prog_coef_max", prog_coef_max))
L1425 🔴 global_write
Global write: prog_rank_cap
Impact: low
Show code
prog_rank_cap = tonumber(get_mcm("fftd/gen/prog_rank_cap", prog_rank_cap))
L1426 🔴 global_write
Global write: nice_round_numbers
Impact: low
Show code
nice_round_numbers = get_mcm("fftd/gen/nice_round_numbers", nice_round_numbers)
L1427 🔴 global_write
Global write: show_dist_and_dur
Impact: low
Show code
show_dist_and_dur = get_mcm("fftd/gen/show_distdur", show_dist_and_dur)
L1428 🔴 global_write
Global write: gate_northern_travel
Impact: low
Show code
gate_northern_travel= get_mcm("fftd/gen/northgate", gate_northern_travel)
L1429 🔴 global_write
Global write: force_vanilla_fares
Impact: low
Show code
force_vanilla_fares = get_mcm("fftd/gen/force_vanilla_fares", force_vanilla_fares)
L1430 🔴 global_write
Global write: skillsystem_enabled
Impact: low
Show code
skillsystem_enabled = get_mcm("fftd/gen/skillsystem_enabled", skillsystem_enabled)
L1431 🔴 global_write
Global write: shared_ft_cooldown
Impact: low
Show code
shared_ft_cooldown = get_mcm("fftd/gen/shared_cooldown", shared_ft_cooldown)
L1432 🔴 global_write
Global write: npc_combat_dist
Impact: low
Show code
npc_combat_dist = tonumber(get_mcm("fftd/gen/combat_dist", npc_combat_dist))
L1433 🔴 global_write
Global write: npc_combat_timeout
Impact: low
Show code
npc_combat_timeout = tonumber(get_mcm("fftd/gen/combat_timeout", npc_combat_timeout))
L1434 🔴 global_write
Global write: allow_debug_travel
Impact: low
Show code
allow_debug_travel = get_mcm("fftd/gen/allow_debug_travel", allow_debug_travel)
L1435 🔴 global_write
Global write: allow_open_bp
Impact: low
Show code
allow_open_bp = get_mcm("fftd/gen/allow_open_bp", allow_open_bp)
L1436 🔴 global_write
Global write: use_warfare_fix
Impact: low
Show code
use_warfare_fix = get_mcm("fftd/gen/use_warfare_fix", use_warfare_fix)
L1437 🔴 global_write
Global write: use_disguise_fix
Impact: low
Show code
use_disguise_fix = get_mcm("fftd/gen/use_disguise_fix", use_disguise_fix)
L1438 🔴 global_write
Global write: use_vanilla_calcs
Impact: low
Show code
use_vanilla_calcs = get_mcm("fftd/gen/use_vanilla_calcs", use_vanilla_calcs)
L1439 🔴 global_write
Global write: zones_use_disguises
Impact: low
Show code
zones_use_disguises = get_mcm("fftd/gen/zones_use_disguises", zones_use_disguises)
L1440 🔴 global_write
Global write: squad_local_travel
Impact: low
Show code
squad_local_travel = get_mcm("fftd/gen/squad_local_travel", squad_local_travel)
L1441 🔴 global_write
Global write: squad_tp_bind
Impact: low
Show code
squad_tp_bind = get_mcm("fftd/gen/squad_tp_bind", squad_tp_bind)
L1442 🔴 global_write
Global write: squad_tp_mod
Impact: low
Show code
squad_tp_mod = get_mcm("fftd/gen/squad_tp_mod", squad_tp_mod)
L1443 🔴 global_write
Global write: psyblock_mapspots
Impact: low
Show code
psyblock_mapspots = get_mcm("fftd/gen/psyblock_mapspots", psyblock_mapspots)
L1444 🔴 global_write
Global write: use_map_hazard_coef
Impact: low
Show code
use_map_hazard_coef = get_mcm("fftd/gen/use_map_hazard_coef", use_map_hazard_coef)
L1447 🔴 global_write
Global write: tick_int
Impact: low
Show code
tick_int = ti
L1449 🔴 global_write
Global write: cond_damage_mode
Impact: low
Show code
cond_damage_mode = tonumber(get_mcm("fftd/gen/cond_dmg_mode", cond_damage_mode))
L1450 🔴 global_write
Global write: minimum_health
Impact: low
Show code
minimum_health = clamp(tonumber(get_mcm("fftd/gen/minimum_health", minimum_health)), 0, 1)
L1451 🔴 global_write
Global write: minimum_satiety
Impact: low
Show code
minimum_satiety = clamp(tonumber(get_mcm("fftd/gen/minimum_satiety", minimum_satiety)), 0, 1)
L1452 🔴 global_write
Global write: debuglogs
Impact: low
Show code
debuglogs = get_mcm("fftd/gen/debuglogs_enabled", debuglogs)
L1453 🔴 global_write
Global write: verbose
Impact: low
Show code
verbose = get_mcm("fftd/gen/verbose_enabled", verbose)
L1485 🔴 global_write
Global write: guide_npc_cost_coef
Impact: low
Show code
guide_npc_cost_coef = ui_mcm.get("fftd/gtcfg/npc_cost_coef") or guide_npc_cost_coef
L1488 🔴 global_write
Global write: skillspeed_coef
Impact: low
Show code
skillspeed_coef = dec2(1 / haru_skills.skills_stats["endurance"].speed_modifier)
L1493 🔴 global_write
Global write: td
Impact: low
Show code
td = travel_data
L1520 🔴 global_write
Global write: locations_found
Impact: low
Show code
locations_found = (locations_found or 0) + 1
L1568 🔴 global_write
Global write: tsmarts
Impact: low
Show code
tsmarts = utils_data.collect_section(pini,faction,true)
L1569 🔴 global_write
Global write: locations_found
Impact: low
Show code
locations_found = 0
L1589 🔴 global_write
Global write: locations_found
Impact: low
Show code
locations_found = locations_found + 1
L1613 🔴 global_write
Global write: longnames
Impact: low
Show code
longnames = ui_options.get("gameplay/fast_travel/long_names")
L1614 🔴 global_write
Global write: markermessage
Impact: low
Show code
markermessage = ui_options.get("gameplay/fast_travel/visit_message")
L1645 🔴 global_write
Global write: all_travel_types
Impact: low
Show code
all_travel_types = ftcfg_ini:collect_section("travel_types")
L1665 🔴 global_write
Global write: td
Impact: low
Show code
td = travel_data
L1676 🔴 global_write
Global write: travel_zone_section
Impact: low
Show code
travel_zone_section = using_modded_exes and travel_zone_section or "space_restrictor"
L1689 🔴 global_write
Global write: northern_maps
Impact: low
Show code
northern_maps = dest_ini:collect_section("northern_maps") or {}
L1697 🔴 global_write
Global write: guide_ignored_levels
Impact: low
Show code
if not guide_ignored_levels then guide_ignored_levels = {} end
L1704 🔴 global_write
Global write: map_hazard_coefs
Impact: low
Show code
if not map_hazard_coefs then map_hazard_coefs = {} end
L1741 🔴 global_write
Global write: spawned_travel_zones
Impact: low
Show code
spawned_travel_zones = {}
L1821 🔴 global_write
Global write: skillsystem_started
Impact: low
Show code
skillsystem_started = end_lvl ~= nil
L1833 🔴 global_write
Global write: spawned_travel_zones
Impact: low
Show code
spawned_travel_zones = fts.spawned_travel_zones or spawned_travel_zones
L1835 🔴 global_write
Global write: survival_paused
Impact: low
Show code
survival_paused = fts.survival_paused
L1836 🔴 global_write
Global write: locations_found
Impact: low
Show code
locations_found = fts.locations_found
L1843 🔴 global_write
Global write: stored_satiety
Impact: low
Show code
stored_satiety = fts.stored_satiety
L340 🟡 potential_nil_access
Potential nil access: 'bkpk' from :item_in_slot() used without nil check (auto-fixable)
Impact: low
Show code
w = w + (bkpk and ini_sys:r_float_ex(bkpk:section(),"additional_inventory_weight") or 0)
L490 🟡 potential_nil_access
Potential nil access: 'suit' from :item_in_slot() used without nil check (auto-fixable)
Impact: low
Show code
overweight = (db.actor:get_total_weight() - db.actor:get_actor_max_walk_weight() - (suit and suit:get_additional_max_weight() or 0) - bbp_extra_weight()) > 0
L518 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local cond = actor:cast_Actor():conditions()
L1286 🟡 potential_nil_access
Potential nil access: 'b' from level.object_by_id() used without nil check
Impact: low
Show code
b:use(db.actor)
L1577 🟡 potential_nil_access
Potential nil access: 'smart' from :object() used without nil check
Impact: low
Show code
local smartname = smart and smart:name()
L582 🟡 unused_local_variable
Local variable 'old' is assigned but never used
Impact: low
Show code
local old = cost
L702 🟡 unused_local_variable
Local variable 'mtrs' is assigned but never used
Impact: low
Show code
local mtrs = gts("st_fftd_mapspot_meters")
L703 🟡 unused_local_variable
Local variable 'kmtrs' is assigned but never used
Impact: low
Show code
local kmtrs = gts("st_fftd_mapspot_kilometers")
L1021 🟡 unused_local_variable
Local variable 'get_nearest' is assigned but never used
Impact: low
Show code
local get_nearest = nearest_smart(actor_lvl,actor_pos)

npe_fair_fast_travel_tutorials_mcm.script

L306 🟡 string_concat_in_loop
String concat in loop: warning = warning .. x
Impact: critical
Show code
warning = warning .. string.format(bullet, "$clr_def", "$ui_gray_1", text)
L26 🔴 global_write
Global write: start_delay
Impact: low
Show code
start_delay = 10000 -- don't allow FFT tutorial to trigger until this long after first update
L27 🔴 global_write
Global write: unsquish_ratio
Impact: low
Show code
unsquish_ratio = 1
L28 🔴 global_write
Global write: token_handler
Impact: low
Show code
token_handler = parse_colors or parse_vanilla
L40 🔴 global_write
Global write: unsquish_ratio
Impact: low
Show code
unsquish_ratio = (device().height / device().width) / (768 / 1024)
L145 🔴 global_write
Global write: cfg
Impact: low
Show code
cfg = {
L338 🔴 global_write
Global write: op
Impact: low
Show code
op = npe_mcm and {
L20 🟡 unused_local_variable
Local variable 'get_config' is assigned but never used
Impact: low
Show code
local get_config = utils_catspaw_common.get_main_config
L31 🟡 unused_local_variable
Local variable 'dl' is assigned but never used
Impact: low
Show code
local dl = function(logtext, ...) utils_catspaw_common.dlog(game_fast_travel, logtext, ...) end

utils_catspaw_common.script

L197 🟢 uncached_globals_summary
Cache 1 globals in to_bool
Impact: medium
Show code
L198: type L200: type
L278 🟢 uncached_globals_summary
Cache 1 globals in get_next_tg_interval
Impact: medium
Show code
L281: tonumber L282: tonumber
L592 🟢 uncached_globals_summary
Cache 1 globals in import_metatable
Impact: medium
Show code
L603: type L612: type
L47 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf((caller.logprefix or logprefix) .. logtext, ...)
L56 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf((caller.logprefix or logprefix) .. (caller.vprefix or vprefix) .. logtext, ...)
L66 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf((raw_prefix or "") .. logtext, ...)
L133 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( "! Modded exes not detected! No extra features available.\n" ..
L139 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(logdiv .. "@ Modded exes %s feature support (GAMMA: %s)", exes_version, using_gamma_modpack)
L141 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s %s (added %s): %s", v.enabled and "-" or "!", v.name, v.ver, v.func())
L143 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(logdiv)
L497 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! ERROR: no INI filename passed to %s.load_file_data%s, cannot continue!", script_name, args.called_by and (" by " ..args.called_by) or "")
L502 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
local function dl(s, ...) return log and printf(s, ...) end
L627 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Loaded %s v%s (rel %s)", script_name, script_version, release_date)
L4 🔴 global_write
Global write: script_name
Impact: low
Show code
script_name = "utils_catspaw_common"
L5 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "1.15"
L6 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20250530
L73 🔴 global_write
Global write: debuglogs
Impact: low
Show code
debuglogs = false
L74 🔴 global_write
Global write: verbose
Impact: low
Show code
verbose = false
L75 🔴 global_write
Global write: logprefix
Impact: low
Show code
logprefix = "[CatsyUtils] " -- gets prefixed, optional
L76 🔴 global_write
Global write: vprefix
Impact: low
Show code
vprefix = "[V] " -- gets added to verbose log entries, optional
L94 🔴 global_write
Global write: debuglogs
Impact: low
Show code
if (debug_en ~= nil) then debuglogs = debug_en end
L95 🔴 global_write
Global write: verbose
Impact: low
Show code
if (verbose_en ~= nil) then verbose = verbose_en end
L101 🔴 global_write
Global write: logdiv
Impact: low
Show code
logdiv = "~ ------------------------------------------------------------------------\n"
L107 🔴 global_write
Global write: engine_features
Impact: low
Show code
engine_features = {
L119 🔴 global_write
Global write: using_gamma_modpack
Impact: low
Show code
using_gamma_modpack = game_version:find("G.A.M.M.A.") and true or false
L121 🔴 global_write
Global write: using_modded_exes
Impact: low
Show code
using_modded_exes = using_gamma_modpack or exes_version and true or false
L245 🔴 global_write
Global write: easing
Impact: low
Show code
easing = {
L401 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
max_weight = max_weight + (outfit and outfit:get_additional_max_weight() or 0)
L404 🟡 potential_nil_access
Potential nil access: 'backpack' from :item_in_slot() used without nil check
Impact: low
Show code
max_weight = max_weight + (backpack and backpack:get_additional_max_weight() or 0)
L572 🟡 unused_local_variable
Local variable 'def_ltx' is assigned but never used
Impact: low
Show code
local def_ltx = def_ini and def_ini:get_sections(true)

utils_catspaw_mapspots.script

L154 🟢 uncached_globals_summary
Cache 1 globals in get_argb
Impact: medium
Show code
L158: tonumber L159: tonumber
L217 🟢 uncached_globals_summary
Cache 1 globals in get_mapspot_texture_data
Impact: medium
Show code
L267: tonumber L268: tonumber
L279 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Loaded %s v%s (rel %s)", script_name, script_version, release_date)
L4 🔴 global_write
Global write: script_name
Impact: low
Show code
script_name = "utils_catspaw_mapspots"
L5 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "1.1"
L6 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20250406
L35 🔴 global_write
Global write: logprefix
Impact: low
Show code
logprefix = "[Catsy:Mapspots] "
L36 🔴 global_write
Global write: debuglogs
Impact: low
Show code
debuglogs = false
L37 🔴 global_write
Global write: verbose
Impact: low
Show code
verbose = false
L38 🔴 global_write
Global write: vprefix
Impact: low
Show code
vprefix = ""
L54 🔴 global_write
Global write: debuglogs
Impact: low
Show code
if (debug_en ~= nil) then debuglogs = debug_en end
L55 🔴 global_write
Global write: verbose
Impact: low
Show code
if (verbose_en ~= nil) then verbose = verbose_en end
L66 🔴 global_write
Global write: task_mapspot_whitelist
Impact: low
Show code
task_mapspot_whitelist = {
L73 🔴 global_write
Global write: mapspot_data_cache
Impact: low
Show code
mapspot_data_cache = {}
L219 🔴 global_write
Global write: mapspot_data_cache
Impact: low
Show code
mapspot_data_cache = {}

utils_catspaw_text.script

L221 🟢 uncached_globals_summary
Cache 1 globals in csv_argb_to_tbl
Impact: medium
Show code
L230: tonumber L231: tonumber
L330 🟢 uncached_globals_summary
Cache 2 globals in int_to_rgba
Impact: medium
Show code
L338: bit.band L339: bit.band L338: bit.rshift L339: bit.rshift
L794 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Loaded %s v%s (rel %s)", script_name, script_version, release_date)
L4 🔴 global_write
Global write: script_name
Impact: low
Show code
script_name = "utils_catspaw_text"
L5 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "1.11"
L6 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20250717
L37 🔴 global_write
Global write: debuglogs
Impact: low
Show code
debuglogs = false
L38 🔴 global_write
Global write: verbose
Impact: low
Show code
verbose = false
L39 🔴 global_write
Global write: logprefix
Impact: low
Show code
logprefix = "[CatsyText] "
L40 🔴 global_write
Global write: vprefix
Impact: low
Show code
vprefix = ""
L56 🔴 global_write
Global write: debuglogs
Impact: low
Show code
if (debug_en ~= nil) then debuglogs = debug_en end
L57 🔴 global_write
Global write: verbose
Impact: low
Show code
if (verbose_en ~= nil) then verbose = verbose_en end
L82 🔴 global_write
Global write: tokens_generated
Impact: low
Show code
tokens_generated = false
L296 🔴 global_write
Global write: state_tokens
Impact: low
Show code
state_tokens = {}
L297 🔴 global_write
Global write: state_colors
Impact: low
Show code
state_colors = {
L420 🔴 global_write
Global write: wpo_thresholds
Impact: low
Show code
wpo_thresholds = {
L768 🔴 global_write
Global write: safename
Impact: low
Show code
safename = bestname -- alias for backwards compatibility
L75 🟡 unused_local_variable
Local variable 'sfind' is assigned but never used
Impact: low
Show code
local sfind = string.find
L138 🟡 unused_local_variable
Local variable 'custom_tokens' is assigned but never used
Impact: low
Show code
local custom_tokens = args and args.tokens or {}
L195 🟡 unused_local_variable
Local variable 'nfirst' is assigned but never used
Impact: low
Show code
local nfirst, nlast = get_firstname_lastname(npcname)
L195 🟡 unused_local_variable
Local variable 'nlast' is assigned but never used
Impact: low
Show code
local nfirst, nlast = get_firstname_lastname(npcname)
L686 🟡 unused_local_variable
Local variable 'st_id' is assigned but never used
Impact: low
Show code
local st_id = tostring(id)

330- Personal Adjustable Waypoint - Catspaw

8 files (🟢46 🟡68 🔴340 🔵38)

catsy_paw_mcm.script

L204 🟢 table_insert_append
table.insert(content, v) -> content[#content+1] = v
Impact: high
Show code
table.insert(content,entry)
L255 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr,divider)
L256 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr,load_error_text1)
L257 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr,load_error_text2)
L258 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr,divider)
L282 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr,menu_opt)
L283 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr,enable_opt)
L285 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr,divider)
L308 🟢 table_insert_append
table.insert(recfaves, v) -> recfaves[#recfaves+1] = v
Impact: high
Show code
for i = 1,10 do table.insert(recfaves,{i,"paw_last_"..tostring(i)}) end
L319 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr,divider)
L320 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr,load_error_text1)
L321 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr,load_error_text2)
L322 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr,divider)
L335 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr,newentry)
L350 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr,newentry)
L353 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr,{id = "divider", type= "line"})
L354 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr,{id = "header", type= "slide", link= "ui_paw_menuslide_badges", size= {512,50}, spacing= 20})
L356 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr,{id = "patch_res", type= "list", val = 0, def = "badge",
L363 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr,{id = "milpda_body_icon", type= "list", val = 0, def = "bodyoff",
L370 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr,{id = "use_custom_backpack_icon", type= "check", val = 1, def = false})
L371 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr,{
L380 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr,{id = "use_custom_pin_icon", type= "check", val = 1, def = false})
L381 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr,{id = "custom_pin_icon", type= "input", val = 0, def = "user_defined"})
L117 🟢 string_len
string.len(iconset_ltx_prefix) -> #iconset_ltx_prefix
Impact: low
Show code
local group = string.sub(w,icons_pos+string.len(iconset_ltx_prefix))
L112 🟢 uncached_globals_summary
Cache 2 globals in load_ltx_data
Impact: medium
Show code
L113: pairs L142: pairs L166: table.sort L167: table.sort
L303 🟢 uncached_globals_summary
Cache 1 globals in populate_set_menus
Impact: medium
Show code
L336: pairs L384: pairs
L292 🟡 string_concat_in_loop
String concat in loop: st = st .. x
Impact: critical
Show code
st = st..m.."="..tostring(o)..","
L294 🟡 string_concat_in_loop
String concat in loop: st = st .. x
Impact: critical
Show code
st = st.."}"
L387 🟡 string_concat_in_loop
String concat in loop: st = st .. x
Impact: critical
Show code
st = st..m.."="..tostring(o)..","
L389 🟡 string_concat_in_loop
String concat in loop: st = st .. x
Impact: critical
Show code
st = st.."}"
L399 🟡 string_concat_in_loop
String concat in loop: st = st .. x
Impact: critical
Show code
st = st..k.."="..tostring(v)..","
L23 🔴 global_write
Global write: debuglogs
Impact: low
Show code
debuglogs = false -- Controls debug logging if you don't have MCM
L24 🔴 global_write
Global write: verbose
Impact: low
Show code
verbose = true
L25 🔴 global_write
Global write: logprefix
Impact: low
Show code
logprefix = "[PAW_MCM] "
L57 🔴 global_write
Global write: unsquish_ratio
Impact: low
Show code
unsquish_ratio = 1
L58 🔴 global_write
Global write: aspect_ratio
Impact: low
Show code
aspect_ratio = "16_9"
L59 🔴 global_write
Global write: aspects
Impact: low
Show code
aspects = {
L264 🔴 global_write
Global write: enable_opt
Impact: low
Show code
enable_opt = {
L273 🔴 global_write
Global write: menu_opt
Impact: low
Show code
menu_opt = {
L399 🔴 global_write
Global write: st
Impact: low
Show code
st = st..k.."="..tostring(v)..","
L401 🔴 global_write
Global write: st
Impact: low
Show code
st = st.."}"
L420 🔴 global_write
Global write: aspect_ratio
Impact: low
Show code
aspect_ratio = get_current_aspect_ratio()
L497 🔴 global_write
Global write: op
Impact: low
Show code
op = { id = "pawsys", gr={
L899 🔴 global_write
Global write: icoset
Impact: low
Show code
icoset = {}
L971 🔴 global_write
Global write: x
Impact: low
Show code
x = (pws.use_custom and pws.cust_x) or pws.curr_theme.pos.x
L976 🔴 global_write
Global write: y
Impact: low
Show code
y = (pws.use_custom and pws.cust_y) or pws.curr_theme.pos.y
L981 🔴 global_write
Global write: effx
Impact: low
Show code
effx = pws.eff_x()
L982 🔴 global_write
Global write: x
Impact: low
Show code
x, _ = asp_scale(effx, 1)
L987 🔴 global_write
Global write: effy
Impact: low
Show code
effy = pws.eff_y()
L988 🔴 global_write
Global write: y
Impact: low
Show code
_, y = asp_scale(1, effy)
L1036 🔴 global_write
Global write: box_wnd
Impact: low
Show code
box_wnd = xml:InitStatic(xmlroot,anchor)
L1038 🔴 global_write
Global write: box_img
Impact: low
Show code
box_img = xml:InitStatic(xmlroot..":curr",box_wnd)
L1042 🔴 global_write
Global write: box_head
Impact: low
Show code
box_head = xml:InitTextWnd(xmlroot..":head",box_wnd)
L1044 🔴 global_write
Global write: box_desc
Impact: low
Show code
box_desc = xml:InitTextWnd(xmlroot..":desc",box_wnd)
L1184 🔴 global_write
Global write: unsquish_ratio
Impact: low
Show code
unsquish_ratio = (device().height / device().width) / (768 / 1024)
L1208 🔴 global_write
Global write: setdata
Impact: low
Show code
setdata = paw.icon_sets[set_curr]
L1293 🔴 global_write
Global write: theme_frame
Impact: low
Show code
theme_frame = xml:InitStatic(xmlroot,theme_box)
L1398 🔴 global_write
Global write: line
Impact: low
Show code
line = xml:InitStatic(xmlroot,anchor)
L1477 🔴 global_write
Global write: tex
Impact: low
Show code
tex = tdata and tdata[icoset.ico_curr] and tdata[icoset.ico_curr].t
L904 🟡 unused_local_variable
Local variable 'theme_curr_i' is assigned but never used
Impact: low
Show code
local box_pname, ui_img, theme_box, theme_preview, theme_curr_i, theme_next_i, theme_prev_i
L904 🟡 unused_local_variable
Local variable 'theme_next_i' is assigned but never used
Impact: low
Show code
local box_pname, ui_img, theme_box, theme_preview, theme_curr_i, theme_next_i, theme_prev_i
L904 🟡 unused_local_variable
Local variable 'theme_prev_i' is assigned but never used
Impact: low
Show code
local box_pname, ui_img, theme_box, theme_preview, theme_curr_i, theme_next_i, theme_prev_i
L1083 🟡 unused_local_variable
Local variable 'rs' is assigned but never used
Impact: low
Show code
local rs = 16/9/5

modxml_map_spots_paw.script

L17 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("DXML is patching mapspots for PAW in %s",xml_file_name)

tasks_placeable_waypoints.script

L5157 🟢 string_len
string.len(iconset_ltx_prefix) -> #iconset_ltx_prefix
Impact: low
Show code
local group = string.sub(w,icons_pos+string.len(iconset_ltx_prefix))
L4487 🟢 math_pow_simple
math.pow(dist_prog, 2) -> dist_prog*dist_prog
Impact: high
Show code
dist_coef = math.abs(math.sqrt(math.pow(dist_prog, 2)))
L860 🟢 uncached_globals_summary
Cache 1 globals in get_argb_from_str
Impact: medium
Show code
L864: tonumber L865: tonumber
L1411 🟢 uncached_globals_summary
Cache 1 globals in init_mapspot_label_wnd
Impact: medium
Show code
L1432: string.format L1433: string.format
L2454 🟢 uncached_globals_summary
Cache 1 globals in mcm_reload_general_settings
Impact: medium
Show code
L2471: tonumber L2480: tonumber
L2682 🟢 uncached_globals_summary
Cache 1 globals in on_option_change
Impact: medium
Show code
L2697: pairs L2701: pairs
L3644 🟢 uncached_globals_summary
Cache 1 globals in Update
Impact: medium
Show code
L3692: tonumber L3693: tonumber
L3712 🟢 uncached_globals_summary
Cache 1 globals in OnAccept
Impact: medium
Show code
L3744: tonumber L3745: tonumber
L5088 🟢 uncached_globals_summary
Cache 3 globals in load_file_data
Impact: medium
Show code
L5096: pairs L5148: pairs L5201: tonumber L5201: tonumber L5228: table.sort L5229: table.sort
L4430 🟢 repeated_se_obj_clsid()
se_obj:clsid() called 3x in get_screen_coords
Impact: low
Show code
Cache se_obj:clsid() result
L1173 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(logdiv .. "~ [PAW] Active script_zones: %s", zones)
L1183 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s%s Script Zone %s%s\n%s %s%s%s%s", logdiv, pre, k, per, pre, clean, t, wp, ping)
L2466 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(logprefix.."Personal Adjustable Waypoint has been disabled, aborting all further action!")
L2711 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(logprefix.."Personal Adjustable Waypoint has been disabled, aborting all further action!")
L3150 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(logprefix.."Initializing settings window for pin %s:\nName: %s\nLocked: %s | Show on HUD %s | Show Label %s | Custom ARGB: %s",
L4812 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ ========================================================================")
L4813 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("UIPAWHUDPin:Update")
L4814 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("HUD Pin %s (%s | %s) - online: %s\n* Level: %s | Coords: %s | Same map: %s\n* text: %s\n* icon: %s\nlocked %s | hud %s | label %s",self.pin_id,se_obj:name(),safename(id),se_obj.online,level_name,coords,same_map,pin.text,pin.icon,pin.locked,pin.hud,pin.label)
L4815 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ ========================================================================")
L4902 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(logprefix.."ERROR: Unable to load ui_paw_reticle.script or initialize its HUD class")
L5238 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(logprefix.."Personal Adjustable Waypoint %s (rel %s) started at %s", script_version, release_date, time_global())
L5351 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ ========================================================================")
L5353 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ ------------------------------------------------------------------------")
L5358 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Pin %s (%s | %s)\n* Coords: %s\n* name: %s\n* text: %s\nicon: %s\nlocked %s | hud %s | label %s",id,se_obj:name(),safename(id),v.text,v.icon,v.locked,v.hud,v.label)
L5360 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("* ID %s stored as pin but is an INVALID OBJECT!")
L5362 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ ------------------------------------------------------------------------")
L5364 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ ========================================================================")
L12 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "2.4.1"
L13 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20250718
L56 🔴 global_write
Global write: logprefix
Impact: low
Show code
logprefix = "[PAW] "
L57 🔴 global_write
Global write: language
Impact: low
Show code
language = "eng"
L58 🔴 global_write
Global write: debuglogs
Impact: low
Show code
debuglogs = false -- Controls debug logging if you don't have MCM
L59 🔴 global_write
Global write: verbose
Impact: low
Show code
verbose = true -- Does nothing if debuglogs is not also enabled, leave on
L60 🔴 global_write
Global write: debug_dump
Impact: low
Show code
debug_dump = false -- Dumps extremely noisy logging of player data like stored pins
L78 🔴 global_write
Global write: paw_enabled
Impact: low
Show code
paw_enabled = true -- setting false will killswitch the entire addon
L79 🔴 global_write
Global write: uninstall_paw
Impact: low
Show code
uninstall_paw = false -- will skip saving anything to mdata on game save
L80 🔴 global_write
Global write: mcm_killswitch
Impact: low
Show code
mcm_killswitch = false
L83 🔴 global_write
Global write: indicator_killswitch
Impact: low
Show code
indicator_killswitch = false
L85 🔴 global_write
Global write: pinsettings_killswitch
Impact: low
Show code
pinsettings_killswitch = false
L87 🔴 global_write
Global write: hud_waypoint_killswitch
Impact: low
Show code
hud_waypoint_killswitch = false
L89 🔴 global_write
Global write: hud_pin_killswitch
Impact: low
Show code
hud_pin_killswitch = false
L91 🔴 global_write
Global write: disable_mcm_updates
Impact: low
Show code
disable_mcm_updates = false
L97 🔴 global_write
Global write: started
Impact: low
Show code
started = false -- runtime flag
L98 🔴 global_write
Global write: waypoint_active
Impact: low
Show code
waypoint_active = false -- runtime flag
L99 🔴 global_write
Global write: waypoint_canceling
Impact: low
Show code
waypoint_canceling = false -- runtime flag
L100 🔴 global_write
Global write: first_mcm_load
Impact: low
Show code
first_mcm_load = true -- runtime flag
L101 🔴 global_write
Global write: disable_load_warning
Impact: low
Show code
disable_load_warning = false
L103 🔴 global_write
Global write: welcome_msg_shown
Impact: low
Show code
welcome_msg_shown = false -- if you don't have MCM, setting this true will disable the welcome message
L104 🔴 global_write
Global write: remove_all_mapspots
Impact: low
Show code
remove_all_mapspots = level.map_remove_all_object_spots
L105 🔴 global_write
Global write: get_mapspot_static
Impact: low
Show code
get_mapspot_static = level.map_get_object_spot_static
L106 🔴 global_write
Global write: get_minimap_static
Impact: low
Show code
get_minimap_static = level.map_get_object_minimap_spot_static
L115 🔴 global_write
Global write: mousewheel_override
Impact: low
Show code
mousewheel_override = false
L125 🔴 global_write
Global write: right_click_override
Impact: low
Show code
right_click_override = false
L127 🔴 global_write
Global write: mwheel_enabled
Impact: low
Show code
mwheel_enabled = false -- managed at runtime
L128 🔴 global_write
Global write: mwheel_notify
Impact: low
Show code
mwheel_notify = true -- news tip on state change
L129 🔴 global_write
Global write: mwheel_poll_interval
Impact: low
Show code
mwheel_poll_interval = 50 -- interval between checks for mouse wheel input
L130 🔴 global_write
Global write: mwheel_next_poll
Impact: low
Show code
mwheel_next_poll = script_load_time
L132 🔴 global_write
Global write: mwheel_avail
Impact: low
Show code
mwheel_avail = mousewheel_override or utils_catspaw_common.exe_mwheel_support()
L133 🔴 global_write
Global write: right_click_avail
Impact: low
Show code
right_click_avail = right_click_override or utils_catspaw_common.exe_rclick_support()
L134 🔴 global_write
Global write: last_clicked_id
Impact: low
Show code
last_clicked_id = nil
L136 🔴 global_write
Global write: unsquish_ratio
Impact: low
Show code
unsquish_ratio = 1
L157 🔴 global_write
Global write: placed_waypoint
Impact: low
Show code
placed_waypoint = nil
L158 🔴 global_write
Global write: last_waypoint
Impact: low
Show code
last_waypoint = nil
L167 🔴 global_write
Global write: cart_mode
Impact: low
Show code
cart_mode = false
L168 🔴 global_write
Global write: cartography_must_hold
Impact: low
Show code
cartography_must_hold = false
L169 🔴 global_write
Global write: cart_shows_smarts
Impact: low
Show code
cart_shows_smarts = true
L170 🔴 global_write
Global write: cartmode_unfade
Impact: low
Show code
cartmode_unfade = true
L171 🔴 global_write
Global write: tip_on_icoset_change
Impact: low
Show code
tip_on_icoset_change = false
L172 🔴 global_write
Global write: raytrace_wp_targets
Impact: low
Show code
raytrace_wp_targets = true
L173 🔴 global_write
Global write: waypoint_is_scriptzone
Impact: low
Show code
waypoint_is_scriptzone = false
L176 🔴 global_write
Global write: enable_wp_proxcheck
Impact: low
Show code
enable_wp_proxcheck = true
L177 🔴 global_write
Global write: show_pins
Impact: low
Show code
show_pins = true
L183 🔴 global_write
Global write: widget_enabled
Impact: low
Show code
widget_enabled = true
L184 🔴 global_write
Global write: widget_active
Impact: low
Show code
widget_active = true
L185 🔴 global_write
Global write: hide_widget
Impact: low
Show code
hide_widget = true
L186 🔴 global_write
Global write: widget_use_custom_pos
Impact: low
Show code
widget_use_custom_pos = false
L187 🔴 global_write
Global write: widget_custom_pos
Impact: low
Show code
widget_custom_pos = {x=491,y=670}
L188 🔴 global_write
Global write: widget_last_used
Impact: low
Show code
widget_last_used = script_load_time
L189 🔴 global_write
Global write: wp_hud_icon_enabled
Impact: low
Show code
wp_hud_icon_enabled = true
L190 🔴 global_write
Global write: pin_hud_icon_default
Impact: low
Show code
pin_hud_icon_default = true
L191 🔴 global_write
Global write: notify_pin_target
Impact: low
Show code
notify_pin_target = false
L192 🔴 global_write
Global write: manual_smart_pins
Impact: low
Show code
manual_smart_pins = false
L193 🔴 global_write
Global write: mark_on_positive_id
Impact: low
Show code
mark_on_positive_id = true
L194 🔴 global_write
Global write: reticle_mustzoom
Impact: low
Show code
reticle_mustzoom = true
L195 🔴 global_write
Global write: reticle_mode
Impact: low
Show code
reticle_mode = 2
L196 🔴 global_write
Global write: autotag_mode
Impact: low
Show code
autotag_mode = 0
L197 🔴 global_write
Global write: autotag_persistence
Impact: low
Show code
autotag_persistence = false -- if enabled, autotags are cleared on map change or the below timeout value
L198 🔴 global_write
Global write: autotag_lifetime
Impact: low
Show code
autotag_lifetime = 120 * 6 -- time in ms before autotags are cleared (def 2 minutes)
L199 🔴 global_write
Global write: autotags_time_out
Impact: low
Show code
autotags_time_out = autotag_lifetime > 0
L200 🔴 global_write
Global write: clear_pin_on_death
Impact: low
Show code
clear_pin_on_death = true -- when set on a living thing, pin will be cleared if it dies
L201 🔴 global_write
Global write: pin_near_fade_dist
Impact: low
Show code
pin_near_fade_dist = 5 -- min distance within which pins will begin to fade out, set to 0 to disable
L202 🔴 global_write
Global write: pin_far_fade_dist
Impact: low
Show code
pin_far_fade_dist = 100 -- distance beyond which pins will begin to fade out, set to 0 to disable
L203 🔴 global_write
Global write: pin_far_hide_dist
Impact: low
Show code
pin_far_hide_dist = 150 -- max distance after far_fade at which pins will hide, set to 0 to disable
L204 🔴 global_write
Global write: wp_near_fade_dist
Impact: low
Show code
wp_near_fade_dist = 5 -- same but for waypoints
L205 🔴 global_write
Global write: wp_far_fade_dist
Impact: low
Show code
wp_far_fade_dist = 100 -- same but for waypoints
L206 🔴 global_write
Global write: wp_far_hide_dist
Impact: low
Show code
wp_far_hide_dist = 150 -- same but for waypoints
L207 🔴 global_write
Global write: ret_fade_attack_time
Impact: low
Show code
ret_fade_attack_time = 400
L208 🔴 global_write
Global write: ret_fade_decay_time
Impact: low
Show code
ret_fade_decay_time = 600
L209 🔴 global_write
Global write: pin_clear_radius
Impact: low
Show code
pin_clear_radius = 20
L210 🔴 global_write
Global write: clear_around_actor
Impact: low
Show code
clear_around_actor = true
L212 🔴 global_write
Global write: reticle_color
Impact: low
Show code
reticle_color = {
L219 🔴 global_write
Global write: show_marker_dist
Impact: low
Show code
show_marker_dist = {
L224 🔴 global_write
Global write: show_marker_hint
Impact: low
Show code
show_marker_hint = {
L248 🔴 global_write
Global write: current_body_icon
Impact: low
Show code
current_body_icon = nil
L249 🔴 global_write
Global write: body_icon_mode
Impact: low
Show code
body_icon_mode = "off"
L250 🔴 global_write
Global write: patch_res
Impact: low
Show code
patch_res = "badge"
L252 🔴 global_write
Global write: use_custom_backpack_icon
Impact: low
Show code
use_custom_backpack_icon = false -- Customize the icon for player stashes
L253 🔴 global_write
Global write: init_backpack_as_pin
Impact: low
Show code
init_backpack_as_pin = true -- Player stash icons are created as pins
L259 🔴 global_write
Global write: waypoint_mapspot
Impact: low
Show code
waypoint_mapspot = "paw_task_default"
L260 🔴 global_write
Global write: map_pin_icon
Impact: low
Show code
map_pin_icon = default_mapspot
L261 🔴 global_write
Global write: force_icon_override
Impact: low
Show code
force_icon_override = nil -- don't use
L263 🔴 global_write
Global write: icons_ini
Impact: low
Show code
icons_ini = ini_file_ex("scripts\\paw\\icons.ltx")
L264 🔴 global_write
Global write: icon_sets_ini
Impact: low
Show code
icon_sets_ini = ini_file_ex("scripts\\paw\\icon_sets.ltx")
L265 🔴 global_write
Global write: actions_ini
Impact: low
Show code
actions_ini = ini_file_ex("scripts\\paw\\menu_actions.ltx")
L266 🔴 global_write
Global write: task_ini
Impact: low
Show code
task_ini = ini_file_ex("scripts\\paw\\task_config.ltx")
L267 🔴 global_write
Global write: clsids_ini
Impact: low
Show code
clsids_ini = ini_file_ex("scripts\\paw\\valid_clsids.ltx")
L268 🔴 global_write
Global write: icon_ltx
Impact: low
Show code
icon_ltx = icons_ini:collect_section("icons")
L269 🔴 global_write
Global write: iconset_ltx
Impact: low
Show code
iconset_ltx = icon_sets_ini:get_sections(true)
L270 🔴 global_write
Global write: actions_ltx
Impact: low
Show code
actions_ltx = actions_ini:get_sections(true)
L271 🔴 global_write
Global write: clsids_ltx
Impact: low
Show code
clsids_ltx = clsids_ini:collect_section("valid_clsids")
L272 🔴 global_write
Global write: task_cfg
Impact: low
Show code
task_cfg = task_ini:collect_section("task_config")
L273 🔴 global_write
Global write: custom_name
Impact: low
Show code
custom_name = (task_cfg and task_cfg.name)
L274 🔴 global_write
Global write: custom_desc
Impact: low
Show code
custom_desc = (task_cfg and task_cfg.desc)
L275 🔴 global_write
Global write: icons
Impact: low
Show code
icons = icon_ltx
L276 🔴 global_write
Global write: curr_menu_options
Impact: low
Show code
curr_menu_options = {}
L277 🔴 global_write
Global write: icon_sets
Impact: low
Show code
icon_sets = {}
L278 🔴 global_write
Global write: action_codes
Impact: low
Show code
action_codes = {}
L279 🔴 global_write
Global write: action
Impact: low
Show code
action = {}
L280 🔴 global_write
Global write: texture_data
Impact: low
Show code
texture_data = {}
L281 🔴 global_write
Global write: icon_index
Impact: low
Show code
icon_index = {}
L282 🔴 global_write
Global write: set_index
Impact: low
Show code
set_index = {}
L283 🔴 global_write
Global write: valid_clsids
Impact: low
Show code
valid_clsids = {}
L284 🔴 global_write
Global write: map_labels
Impact: low
Show code
map_labels = {}
L328 🔴 global_write
Global write: npc_ident
Impact: low
Show code
npc_ident = pawdata.npc_ident
L329 🔴 global_write
Global write: smart_pins
Impact: low
Show code
smart_pins = pawdata.smart_pins
L330 🔴 global_write
Global write: pins
Impact: low
Show code
pins = pawdata.pins
L331 🔴 global_write
Global write: dynamic_faves
Impact: low
Show code
dynamic_faves = pawdata.dynamic_faves -- not implemented yet
L334 🔴 global_write
Global write: pda_defs
Impact: low
Show code
pda_defs = {
L367 🔴 global_write
Global write: stash_icons
Impact: low
Show code
stash_icons = {
L374 🔴 global_write
Global write: managed_factions
Impact: low
Show code
managed_factions = {
L390 🔴 global_write
Global write: managed_options
Impact: low
Show code
managed_options = {
L413 🔴 global_write
Global write: hud_themes
Impact: low
Show code
hud_themes = {
L528 🔴 global_write
Global write: state_colors
Impact: low
Show code
state_colors = {
L541 🔴 global_write
Global write: tf
Impact: low
Show code
tf = not cart_mode
L1010 🔴 global_write
Global write: waypoint_active
Impact: low
Show code
waypoint_active = false
L1011 🔴 global_write
Global write: placed_waypoint
Impact: low
Show code
placed_waypoint = nil
L1013 🔴 global_write
Global write: waypoint_canceling
Impact: low
Show code
waypoint_canceling = false
L1018 🔴 global_write
Global write: waypoint_canceling
Impact: low
Show code
waypoint_canceling = true
L1040 🔴 global_write
Global write: last_waypoint
Impact: low
Show code
last_waypoint = placed_waypoint
L1042 🔴 global_write
Global write: placed_waypoint
Impact: low
Show code
placed_waypoint = {
L1046 🔴 global_write
Global write: waypoint_active
Impact: low
Show code
waypoint_active = true
L1047 🔴 global_write
Global write: waypoint_canceling
Impact: low
Show code
waypoint_canceling = false
L1406 🔴 global_write
Global write: coords
Impact: low
Show code
coords = string.format("XYZ %s, %s, %s",coord_x,coord_y,coord_z)
L1448 🔴 global_write
Global write: plaintext
Impact: low
Show code
plaintext = parse_colors(mapspot_text, false)
L1453 🔴 global_write
Global write: nlcnt
Impact: low
Show code
_, nlcnt = mapspot_text:gsub("\\n", "\\n")
L1524 🔴 global_write
Global write: waypoint_active
Impact: low
Show code
waypoint_active = true
L1551 🔴 global_write
Global write: waypoint_active
Impact: low
Show code
waypoint_active = true
L1557 🔴 global_write
Global write: last_waypoint
Impact: low
Show code
last_waypoint = nil
L1868 🔴 global_write
Global write: last_clicked_id
Impact: low
Show code
last_clicked_id = nil
L1905 🔴 global_write
Global write: cart_mode
Impact: low
Show code
cart_mode = not cart_mode
L1907 🔴 global_write
Global write: cart_mode
Impact: low
Show code
cart_mode = onoff or false
L1981 🔴 global_write
Global write: waypoint_is_scriptzone
Impact: low
Show code
waypoint_is_scriptzone = is_scriptzone and true or false
L1994 🔴 global_write
Global write: waypoint_active
Impact: low
Show code
waypoint_active = not force
L1998 🔴 global_write
Global write: placed_waypoint
Impact: low
Show code
placed_waypoint = last_waypoint
L2006 🔴 global_write
Global write: last_waypoint
Impact: low
Show code
last_waypoint = placed_waypoint
L2180 🔴 global_write
Global write: th
Impact: low
Show code
th = xml:ReadAttribute(spot,0,"height")
L2181 🔴 global_write
Global write: tw
Impact: low
Show code
tw = xml:ReadAttribute(spot,0,"width")
L2185 🔴 global_write
Global write: tex
Impact: low
Show code
tex = xml:ReadValue(attr_tex,0)
L2200 🔴 global_write
Global write: th
Impact: low
Show code
th = xml:ReadAttribute(spotnode,0,"height")
L2201 🔴 global_write
Global write: tw
Impact: low
Show code
tw = xml:ReadAttribute(spotnode,0,"width")
L2204 🔴 global_write
Global write: tex
Impact: low
Show code
tex = xml:ReadValue(attr_tex,0)
L2308 🔴 global_write
Global write: map_pin_icon
Impact: low
Show code
map_pin_icon = pawdata.curr_ico_name
L2331 🔴 global_write
Global write: map_pin_icon
Impact: low
Show code
map_pin_icon = pawdata.curr_ico_name
L2421 🔴 global_write
Global write: show_pins
Impact: low
Show code
show_pins = onoff
L2457 🔴 global_write
Global write: paw_enabled
Impact: low
Show code
paw_enabled = load_mcm("pawgen/enabled",paw_enabled)
L2469 🔴 global_write
Global write: disable_load_warning
Impact: low
Show code
disable_load_warning = load_mcm("pawgen/disable_load_warning",disable_load_warning)
L2470 🔴 global_write
Global write: wp_hud_icon_enabled
Impact: low
Show code
wp_hud_icon_enabled = load_mcm("pawgen/wp_hud_icon_enabled",wp_hud_icon_enabled)
L2482 🔴 global_write
Global write: pin_near_fade_dist
Impact: low
Show code
pin_near_fade_dist = tonumber(load_mcm("pawgen/pin_near_fade_dist",pin_near_fade_dist))
L2483 🔴 global_write
Global write: pin_far_fade_dist
Impact: low
Show code
pin_far_fade_dist = tonumber(load_mcm("pawgen/pin_far_fade_dist",pin_far_fade_dist))
L2484 🔴 global_write
Global write: pin_far_hide_dist
Impact: low
Show code
pin_far_hide_dist = tonumber(load_mcm("pawgen/pin_far_hide_dist",pin_far_hide_dist))
L2485 🔴 global_write
Global write: wp_near_fade_dist
Impact: low
Show code
wp_near_fade_dist = tonumber(load_mcm("pawgen/wp_near_fade_dist",wp_near_fade_dist))
L2486 🔴 global_write
Global write: wp_far_fade_dist
Impact: low
Show code
wp_far_fade_dist = tonumber(load_mcm("pawgen/wp_far_fade_dist",wp_far_fade_dist))
L2487 🔴 global_write
Global write: wp_far_hide_dist
Impact: low
Show code
wp_far_hide_dist = tonumber(load_mcm("pawgen/wp_far_hide_dist",wp_far_hide_dist))
L2489 🔴 global_write
Global write: tip_on_icoset_change
Impact: low
Show code
tip_on_icoset_change = load_mcm("pawgen/tip_on_icoset_change",tip_on_icoset_change)
L2490 🔴 global_write
Global write: welcome_msg_shown
Impact: low
Show code
welcome_msg_shown = load_mcm("pawgen/welcome_msg_shown",welcome_msg_shown)
L2491 🔴 global_write
Global write: enable_wp_proxcheck
Impact: low
Show code
enable_wp_proxcheck = wp_clear_dist and wp_clear_dist > 0
L2493 🔴 global_write
Global write: mwheel_poll_interval
Impact: low
Show code
mwheel_poll_interval = load_mcm("pawgen/mwheel_poll_interval",mwheel_poll_interval)
L2516 🔴 global_write
Global write: cartography_must_hold
Impact: low
Show code
cartography_must_hold = not load_mcm("pawbinds/cartmode_toggle", cartography_must_hold)
L2518 🔴 global_write
Global write: cart_shows_smarts
Impact: low
Show code
cart_shows_smarts = load_mcm("pawbinds/cart_shows_smarts", cart_shows_smarts)
L2519 🔴 global_write
Global write: mwheel_notify
Impact: low
Show code
mwheel_notify = load_mcm("pawbinds/mwheel_notify")
L2520 🔴 global_write
Global write: cartmode_unfade
Impact: low
Show code
cartmode_unfade = load_mcm("pawbinds/cartmode_unfade", cartmode_unfade)
L2521 🔴 global_write
Global write: raytrace_wp_targets
Impact: low
Show code
raytrace_wp_targets = load_mcm("pawbinds/raytrace_wp_targets", raytrace_wp_targets)
L2527 🔴 global_write
Global write: mwheel_override
Impact: low
Show code
mwheel_override = tmp
L2529 🔴 global_write
Global write: mwheel_avail
Impact: low
Show code
mwheel_avail = true
L2537 🔴 global_write
Global write: mwheel_enabled
Impact: low
Show code
mwheel_enabled = tmp and mwheel_avail
L2543 🔴 global_write
Global write: right_click_override
Impact: low
Show code
right_click_override = tmp
L2545 🔴 global_write
Global write: right_click_avail
Impact: low
Show code
right_click_avail = true
L2553 🔴 global_write
Global write: disable_mcm_updates
Impact: low
Show code
disable_mcm_updates = tmp
L2563 🔴 global_write
Global write: patch_res
Impact: low
Show code
patch_res = ui_mcm.get("pawsys/pawpins/patch_res") or "badge"
L2581 🔴 global_write
Global write: map_pin_icon
Impact: low
Show code
map_pin_icon = icon
L2586 🔴 global_write
Global write: use_custom_backpack_icon
Impact: low
Show code
use_custom_backpack_icon = load_mcm("pawpins/use_custom_backpack_icon",use_custom_backpack_icon)
L2599 🔴 global_write
Global write: map_pin_icon
Impact: low
Show code
map_pin_icon = ui_mcm.get("pawsys/pawpins/custom_pin_icon") or map_pin_icon
L2606 🔴 global_write
Global write: map_pin_icon
Impact: low
Show code
map_pin_icon = force_icon_override
L2611 🔴 global_write
Global write: body_icon_mode
Impact: low
Show code
body_icon_mode = bi
L2612 🔴 global_write
Global write: current_body_icon
Impact: low
Show code
current_body_icon = icons[cbi] or default_mapspot
L2615 🔴 global_write
Global write: widget_enabled
Impact: low
Show code
widget_enabled = load_mcm("pawhud/widget_enable",widget_enabled)
L2618 🔴 global_write
Global write: widget_custom_pos
Impact: low
Show code
widget_custom_pos = {
L2622 🔴 global_write
Global write: widget_use_custom_pos
Impact: low
Show code
widget_use_custom_pos = load_mcm("pawhud/custompos")
L2649 🔴 global_write
Global write: mark_on_positive_id
Impact: low
Show code
mark_on_positive_id = load_mcm("pawret/enable_autotag",mark_on_positive_id)
L2650 🔴 global_write
Global write: autotag_persistence
Impact: low
Show code
autotag_persistence = load_mcm("pawret/autotag_persistence",autotag_persistence)
L2651 🔴 global_write
Global write: autotag_lifetime
Impact: low
Show code
autotag_lifetime = load_mcm("pawret/autotag_lifetime",(autotag_lifetime / 6)) * 6
L2652 🔴 global_write
Global write: autotags_time_out
Impact: low
Show code
autotags_time_out = (autotag_lifetime or 0) > 0
L2653 🔴 global_write
Global write: pin_hud_icon_default
Impact: low
Show code
pin_hud_icon_default = load_mcm("pawret/pin_auto_visible",pin_hud_icon_default)
L2654 🔴 global_write
Global write: manual_smart_pins
Impact: low
Show code
manual_smart_pins = load_mcm("pawret/manual_smart_pins",manual_smart_pins)
L2655 🔴 global_write
Global write: reticle_mode
Impact: low
Show code
reticle_mode = load_mcm("pawret/reticle_mode",reticle_mode)
L2656 🔴 global_write
Global write: autotag_mode
Impact: low
Show code
autotag_mode = load_mcm("pawret/reticle_mode",autotag_mode)
L2657 🔴 global_write
Global write: reticle_mustzoom
Impact: low
Show code
reticle_mustzoom = load_mcm("pawret/reticle_mustzoom",reticle_mustzoom)
L2659 🔴 global_write
Global write: ret_fade_attack_time
Impact: low
Show code
ret_fade_attack_time = load_mcm("pawret/ret_fade_attack_time",ret_fade_attack_time)
L2660 🔴 global_write
Global write: ret_fade_decay_time
Impact: low
Show code
ret_fade_decay_time = load_mcm("pawret/ret_fade_decay_time",ret_fade_decay_time)
L2661 🔴 global_write
Global write: notify_pin_target
Impact: low
Show code
notify_pin_target = load_mcm("pawret/notify_pin_target",notify_pin_target)
L2685 🔴 global_write
Global write: language
Impact: low
Show code
language = ui_options.curr_localization()
L2687 🔴 global_write
Global write: debuglogs
Impact: low
Show code
debuglogs = load_mcm("pawgen/debuglogs", debuglogs)
L2688 🔴 global_write
Global write: verbose
Impact: low
Show code
verbose = load_mcm("pawgen/verbose", verbose)
L2700 🔴 global_write
Global write: hud_pin_objs
Impact: low
Show code
hud_pin_objs = {}
L2704 🔴 global_write
Global write: map_labels
Impact: low
Show code
map_labels = {}
L2728 🔴 global_write
Global write: pin_clear_radius
Impact: low
Show code
pin_clear_radius = load_mcm("pawmenu/clear_radius", pin_clear_radius)
L2735 🔴 global_write
Global write: unsquish_ratio
Impact: low
Show code
unsquish_ratio = (device().height / device().width) / (768 / 1024)
L2738 🔴 global_write
Global write: first_mcm_load
Impact: low
Show code
first_mcm_load = false
L2813 🔴 global_write
Global write: welcome_msg_shown
Impact: low
Show code
welcome_msg_shown = true
L2848 🔴 global_write
Global write: tex
Impact: low
Show code
tex = texdef or tex_defs
L2849 🔴 global_write
Global write: args
Impact: low
Show code
args = args or {}
L3032 🔴 global_write
Global write: custom_name
Impact: low
Show code
custom_name = nil
L3033 🔴 global_write
Global write: custom_desc
Impact: low
Show code
custom_desc = nil
L3037 🔴 global_write
Global write: wp_hud_icon_enabled
Impact: low
Show code
wp_hud_icon_enabled = true
L3060 🔴 global_write
Global write: custom_name
Impact: low
Show code
custom_name = new_wpname
L3065 🔴 global_write
Global write: custom_desc
Impact: low
Show code
custom_desc = new_wpdesc
L3075 🔴 global_write
Global write: wp_hud_icon_enabled
Impact: low
Show code
wp_hud_icon_enabled = true
L3078 🔴 global_write
Global write: wp_hud_icon_enabled
Impact: low
Show code
wp_hud_icon_enabled = false
L3112 🔴 global_write
Global write: GUI_PinOpts
Impact: low
Show code
GUI_PinOpts = nil
L3126 🔴 global_write
Global write: GUI_PinOpts
Impact: low
Show code
GUI_PinOpts = UIPinSettingsWnd(id,args)
L3138 🔴 global_write
Global write: GUI_PinOpts
Impact: low
Show code
GUI_PinOpts = nil
L3183 🔴 global_write
Global write: widget_enabled
Impact: low
Show code
widget_enabled = self.backups.enable
L3186 🔴 global_write
Global write: widget_use_custom_pos
Impact: low
Show code
widget_use_custom_pos = self.backups.use_cust_pos or widget_use_custom_pos
L3187 🔴 global_write
Global write: widget_custom_pos
Impact: low
Show code
widget_custom_pos = self.backups.cust_pos or widget_custom_pos
L3201 🔴 global_write
Global write: widget_use_custom_pos
Impact: low
Show code
widget_use_custom_pos = true
L3468 🔴 global_write
Global write: widget_custom_pos
Impact: low
Show code
widget_custom_pos = { x= 141, y= 46 }
L3826 🔴 global_write
Global write: GUI_PinInd
Impact: low
Show code
GUI_PinInd = nil
L3875 🔴 global_write
Global write: widget_enabled
Impact: low
Show code
widget_enabled = self.backups.enabled
L3878 🔴 global_write
Global write: widget_use_custom_pos
Impact: low
Show code
widget_use_custom_pos = self.backups.use_cust_pos
L3879 🔴 global_write
Global write: widget_custom_pos
Impact: low
Show code
widget_custom_pos = self.backups.cust_pos
L3902 🔴 global_write
Global write: widget_use_custom_pos
Impact: low
Show code
widget_use_custom_pos = true
L3903 🔴 global_write
Global write: widget_enabled
Impact: low
Show code
widget_enabled = true
L4120 🔴 global_write
Global write: widget_active
Impact: low
Show code
widget_active = psw_sidebar_state
L4147 🔴 global_write
Global write: widget_last_used
Impact: low
Show code
widget_last_used = time_global()
L4148 🔴 global_write
Global write: widget_active
Impact: low
Show code
widget_active = true
L4151 🔴 global_write
Global write: widget_active
Impact: low
Show code
if time_global() > widget_last_used + widget_hide_delay then widget_active = false end
L4173 🔴 global_write
Global write: GUI_PinInd
Impact: low
Show code
GUI_PinInd = UIPAWIndicator(force,anchor)
L4181 🔴 global_write
Global write: widget_active
Impact: low
Show code
widget_active = not widget_active
L4183 🔴 global_write
Global write: widget_active
Impact: low
Show code
widget_active = (tf == true) or false
L4382 🔴 global_write
Global write: zoom_delay
Impact: low
Show code
local function zoom_delay_over() zoom_delay = false end
L4645 🔴 global_write
Global write: hud_pin_objs
Impact: low
Show code
hud_pin_objs = {}
L5060 🔴 global_write
Global write: last_clicked_id
Impact: low
Show code
last_clicked_id = se_obj.id
L5066 🔴 global_write
Global write: last_clicked_id
Impact: low
Show code
last_clicked_id = id
L5094 🔴 global_write
Global write: xml
Impact: low
Show code
xml = CScriptXmlInit()
L5234 🔴 global_write
Global write: started
Impact: low
Show code
started = true
L5250 🔴 global_write
Global write: placed_waypoint
Impact: low
Show code
placed_waypoint = ps.current_waypoint
L5251 🔴 global_write
Global write: last_waypoint
Impact: low
Show code
last_waypoint = ps.last_waypoint
L5252 🔴 global_write
Global write: waypoint_is_scriptzone
Impact: low
Show code
waypoint_is_scriptzone = ps.is_scriptzone
L5253 🔴 global_write
Global write: custom_name
Impact: low
Show code
custom_name = ps.custom_name
L5254 🔴 global_write
Global write: custom_desc
Impact: low
Show code
custom_desc = ps.custom_desc
L5255 🔴 global_write
Global write: pins
Impact: low
Show code
pins = ps.pins
L5256 🔴 global_write
Global write: waypoint_active
Impact: low
Show code
if placed_waypoint then waypoint_active = true end
L5257 🔴 global_write
Global write: welcome_msg_shown
Impact: low
Show code
welcome_msg_shown = ps.welcome_msg_shown
L5263 🔴 global_write
Global write: pins
Impact: low
Show code
pins = pawdata.pins
L5331 🔴 global_write
Global write: last_waypoint
Impact: low
Show code
last_waypoint = savelast
L5383 🔴 global_write
Global write: mwheel_next_poll
Impact: low
Show code
mwheel_next_poll = get_next_check(mwheel_poll_interval)
L5516 🔴 global_write
Global write: disable_mcm_updates
Impact: low
Show code
disable_mcm_updates = true
L5518 🔴 global_write
Global write: paw_enabled
Impact: low
Show code
paw_enabled = false
L5519 🔴 global_write
Global write: started
Impact: low
Show code
started = false
L2053 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
local id = obj and obj:id()
L4392 🟡 potential_nil_access
Potential nil access: 'obj' from :active_item() used without nil check
Impact: low
Show code
local wpn = obj:cast_Weapon()
L71 🟡 unused_local_variable
Local variable 'round2' is assigned but never used
Impact: low
Show code
local round2 = utils_catspaw_common.dec2
L166 🟡 unused_local_variable
Local variable 'mcm_keybinds' is assigned but never used
Impact: low
Show code
local mcm_keybinds = ui_mcm and ui_mcm.key_hold
L179 🟡 unused_local_variable
Local variable 'custom_task_info' is assigned but never used
Impact: low
Show code
local custom_task_info = false
L239 🟡 unused_local_variable
Local variable 'snd_note' is assigned but never used
Impact: low
Show code
local snd_note = "device\\pda\\pda_note"
L243 🟡 unused_local_variable
Local variable 'pawmenu_path' is assigned but never used
Impact: low
Show code
local pawmenu_path = "ui_mcm_pawsys_pawmenu_"
L1342 🟡 unused_local_variable
Local variable 'anch_id' is assigned but never used
Impact: low
Show code
local anch_id = obj.id
L1427 🟡 unused_local_variable
Local variable 'levelname' is assigned but never used
Impact: low
Show code
local levelname = ts(level.name())
L1885 🟡 unused_local_variable
Local variable 'levelid' is assigned but never used
Impact: low
Show code
local levelid = alife():level_id()
L1886 🟡 unused_local_variable
Local variable 'smart_nearest' is assigned but never used
Impact: low
Show code
local smart_nearest,dist_nearest,name_nearest,result
L1886 🟡 unused_local_variable
Local variable 'dist_nearest' is assigned but never used
Impact: low
Show code
local smart_nearest,dist_nearest,name_nearest,result
L1886 🟡 unused_local_variable
Local variable 'name_nearest' is assigned but never used
Impact: low
Show code
local smart_nearest,dist_nearest,name_nearest,result
L1886 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local smart_nearest,dist_nearest,name_nearest,result
L2588 🟡 unused_local_variable
Local variable 'psicon' is assigned but never used
Impact: low
Show code
local psicon = stash_icons["player"]
L2918 🟡 unused_local_variable
Local variable 'bg_top' is assigned but never used
Impact: low
Show code
local bg_top = xml:InitStatic(rootand.."bg_top",self.dialog)
L2919 🟡 unused_local_variable
Local variable 'bg_btm' is assigned but never used
Impact: low
Show code
local bg_btm = xml:InitStatic(rootand.."bg_btm",self.dialog)
L3234 🟡 unused_local_variable
Local variable 'clrtxt' is assigned but never used
Impact: low
Show code
local clrtxt ={
L3252 🟡 unused_local_variable
Local variable 'bg' is assigned but never used
Impact: low
Show code
local bg = root.."bg_settings"
L3264 🟡 unused_local_variable
Local variable 'listbox' is assigned but never used
Impact: low
Show code
local listbox = root.."listbox"
L3266 🟡 unused_local_variable
Local variable 'opt_cap' is assigned but never used
Impact: low
Show code
local opt_cap = opt_icon..":caption"
L3267 🟡 unused_local_variable
Local variable 'sidebar' is assigned but never used
Impact: low
Show code
local sidebar = root.."sidebar"
L3276 🟡 unused_local_variable
Local variable 'mstt_txt' is assigned but never used
Impact: low
Show code
local mstt_txt = ts("ui_paw_mapspot_tooltip_mode")
L3278 🟡 unused_local_variable
Local variable 'ico_curr' is assigned but never used
Impact: low
Show code
local ico_curr = ts("ui_mcm_lst_"..pawdata.curr_ico_name)
L3342 🟡 unused_local_variable
Local variable 'xsh' is assigned but never used
Impact: low
Show code
local xsh = color.."_sh"
L3343 🟡 unused_local_variable
Local variable 'xtx' is assigned but never used
Impact: low
Show code
local xtx = color.."_tx"
L3968 🟡 unused_local_variable
Local variable 'btn_iprev' is assigned but never used
Impact: low
Show code
local btn_iprev = icoset.."btn_ico_prev"
L3969 🟡 unused_local_variable
Local variable 'btn_inext' is assigned but never used
Impact: low
Show code
local btn_inext = icoset.."btn_ico_next"
L3970 🟡 unused_local_variable
Local variable 'btn_sprev' is assigned but never used
Impact: low
Show code
local btn_sprev = icoset.."btn_set_prev"
L3971 🟡 unused_local_variable
Local variable 'btn_snext' is assigned but never used
Impact: low
Show code
local btn_snext = icoset.."btn_set_next"
L4242 🟡 unused_local_variable
Local variable 'size_x' is assigned but never used
Impact: low
Show code
local size_x = lerp(start_size.x, end_size.x, x)
L4243 🟡 unused_local_variable
Local variable 'size_y' is assigned but never used
Impact: low
Show code
local size_y = lerp(start_size.y, end_size.y, x)
L4852 🟡 unused_local_variable
Local variable 'dx' is assigned but never used
Impact: low
Show code
local nx,ny,dx,dy,tw
L4852 🟡 unused_local_variable
Local variable 'dy' is assigned but never used
Impact: low
Show code
local nx,ny,dx,dy,tw
L4945 🟡 unused_local_variable
Local variable 'mod_key_codes' is assigned but never used
Impact: low
Show code
local mod_key_codes = {
L4997 🟡 unused_local_variable
Local variable 'do_action' is assigned but never used
Impact: low
Show code
local do_action = false
L5236 🟡 unused_local_variable
Local variable 'load_pin_curr' is assigned but never used
Impact: low
Show code
local load_pin_curr = axr_main.config:r_value("mcm", "pawsys/pawpins/poi_icon_"..load_set_curr, {val=0})

ui_paw_reticle.script

L27 🔴 global_write
Global write: reticle_color
Impact: low
Show code
reticle_color = paw.reticle_color
L28 🔴 global_write
Global write: autotag_milpda
Impact: low
Show code
autotag_milpda = paw.autotag_milpda_feature
L29 🔴 global_write
Global write: pda_feature_en
Impact: low
Show code
pda_feature_en = item_milpda and item_milpda.pda_feature_enabled
L199 🔴 global_write
Global write: progress
Impact: low
Show code
progress = 0
L205 🔴 global_write
Global write: progress
Impact: low
Show code
progress = self:OnTarget(obj,name,id)
L207 🔴 global_write
Global write: progress
Impact: low
Show code
progress = self:UpdateIDProgress(obj,name)
L210 🔴 global_write
Global write: progress
Impact: low
Show code
progress = self:OnTarget(obj,name,id)
L242 🔴 global_write
Global write: progress
Impact: low
Show code
progress = self:UpdateIDProgress(self.last_target)
L348 🟡 potential_nil_access
Potential nil access: 'dev' from :item_in_slot() used without nil check (auto-fixable)
Impact: low
Show code
enabled = dev and pda_feature_en(dev:section(),"autotag")
L366 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
local id = obj and obj:id()
L21 🟡 unused_local_variable
Local variable 'dl' is assigned but never used
Impact: low
Show code
local dl = function(logtext, ...) utils_catspaw_common.dlog(tasks_placeable_waypoints, logtext, ...) end
L343 🟡 unused_local_variable
Local variable 'tag_mode' is assigned but never used
Impact: low
Show code
local tag_mode = paw.autotag_mode

utils_catspaw_common.script

L197 🟢 uncached_globals_summary
Cache 1 globals in to_bool
Impact: medium
Show code
L198: type L200: type
L278 🟢 uncached_globals_summary
Cache 1 globals in get_next_tg_interval
Impact: medium
Show code
L281: tonumber L282: tonumber
L592 🟢 uncached_globals_summary
Cache 1 globals in import_metatable
Impact: medium
Show code
L603: type L612: type
L47 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf((caller.logprefix or logprefix) .. logtext, ...)
L56 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf((caller.logprefix or logprefix) .. (caller.vprefix or vprefix) .. logtext, ...)
L66 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf((raw_prefix or "") .. logtext, ...)
L133 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( "! Modded exes not detected! No extra features available.\n" ..
L139 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(logdiv .. "@ Modded exes %s feature support (GAMMA: %s)", exes_version, using_gamma_modpack)
L141 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s %s (added %s): %s", v.enabled and "-" or "!", v.name, v.ver, v.func())
L143 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(logdiv)
L497 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! ERROR: no INI filename passed to %s.load_file_data%s, cannot continue!", script_name, args.called_by and (" by " ..args.called_by) or "")
L502 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
local function dl(s, ...) return log and printf(s, ...) end
L627 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Loaded %s v%s (rel %s)", script_name, script_version, release_date)
L4 🔴 global_write
Global write: script_name
Impact: low
Show code
script_name = "utils_catspaw_common"
L5 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "1.15"
L6 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20250530
L73 🔴 global_write
Global write: debuglogs
Impact: low
Show code
debuglogs = false
L74 🔴 global_write
Global write: verbose
Impact: low
Show code
verbose = false
L75 🔴 global_write
Global write: logprefix
Impact: low
Show code
logprefix = "[CatsyUtils] " -- gets prefixed, optional
L76 🔴 global_write
Global write: vprefix
Impact: low
Show code
vprefix = "[V] " -- gets added to verbose log entries, optional
L94 🔴 global_write
Global write: debuglogs
Impact: low
Show code
if (debug_en ~= nil) then debuglogs = debug_en end
L95 🔴 global_write
Global write: verbose
Impact: low
Show code
if (verbose_en ~= nil) then verbose = verbose_en end
L101 🔴 global_write
Global write: logdiv
Impact: low
Show code
logdiv = "~ ------------------------------------------------------------------------\n"
L107 🔴 global_write
Global write: engine_features
Impact: low
Show code
engine_features = {
L119 🔴 global_write
Global write: using_gamma_modpack
Impact: low
Show code
using_gamma_modpack = game_version:find("G.A.M.M.A.") and true or false
L121 🔴 global_write
Global write: using_modded_exes
Impact: low
Show code
using_modded_exes = using_gamma_modpack or exes_version and true or false
L245 🔴 global_write
Global write: easing
Impact: low
Show code
easing = {
L401 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
max_weight = max_weight + (outfit and outfit:get_additional_max_weight() or 0)
L404 🟡 potential_nil_access
Potential nil access: 'backpack' from :item_in_slot() used without nil check
Impact: low
Show code
max_weight = max_weight + (backpack and backpack:get_additional_max_weight() or 0)
L572 🟡 unused_local_variable
Local variable 'def_ltx' is assigned but never used
Impact: low
Show code
local def_ltx = def_ini and def_ini:get_sections(true)

utils_catspaw_hudmarks.script

L405 🟢 math_pow_simple
math.pow(dist_prog, 2) -> dist_prog*dist_prog
Impact: high
Show code
dist_coef = math.abs(math.sqrt(math.pow(dist_prog, 2)))
L345 🟢 repeated_se_obj_clsid()
se_obj:clsid() called 3x in get_screen_coords
Impact: low
Show code
Cache se_obj:clsid() result
L465 🟢 repeated_obj_id()
obj:id() called 2x in actor_on_update
Impact: low
Show code
Cache obj:id() result
L281 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[utils_catspaw_hudmarks.fade_by_dist] Fading elements by dist %s:\n"..
L1427 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
local _ = debug_dump and printf("[UIHUDMarker:Update][%s][%s] Killswitch checks passed", self.mark_id, time_global())
L1529 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ ========================================================================")
L1530 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[UIHUDMarker:Update][First update for ID %s]%s", self.mark_id, typedata)
L1531 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
_ = self.custom_argb and printf("Found custom_argb: %s,%s,%s,%s", self.custom_argb.a, self.custom_argb.r, self.custom_argb.g, self.custom_argb.b)
L1532 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("HUD Marker %s (%s) | obj %s - online: %s\n* Level: %s | Dist: %sm%s",
L1535 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ ========================================================================")
L1695 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Loaded %s v%s (rel %s)", script_name, script_version, release_date)
L4 🔴 global_write
Global write: script_name
Impact: low
Show code
script_name = "utils_catspaw_hudmarks"
L5 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "1.3"
L6 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20250717
L54 🔴 global_write
Global write: debug_dump
Impact: low
Show code
debug_dump = false -- flag used to dump one-time detailed info for certain things
L55 🔴 global_write
Global write: debuglogs
Impact: low
Show code
debuglogs = false
L56 🔴 global_write
Global write: verbose
Impact: low
Show code
verbose = false
L57 🔴 global_write
Global write: logprefix
Impact: low
Show code
logprefix = ""
L58 🔴 global_write
Global write: vprefix
Impact: low
Show code
vprefix = ""
L74 🔴 global_write
Global write: debuglogs
Impact: low
Show code
if (debug_en ~= nil) then debuglogs = debug_en end
L75 🔴 global_write
Global write: verbose
Impact: low
Show code
if (verbose_en ~= nil) then verbose = verbose_en end
L76 🔴 global_write
Global write: debug_dump
Impact: low
Show code
if (debug_dump ~= nil) then debug_dump = dump_en end
L118 🔴 global_write
Global write: marker_presets
Impact: low
Show code
marker_presets = {
L465 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
self.current_crosshair = obj and obj:id() or nil
L96 🟡 unused_local_variable
Local variable 'gts' is assigned but never used
Impact: low
Show code
local gts = game.translate_string
L932 🟡 unused_local_variable
Local variable 'preset_args' is assigned but never used
Impact: low
Show code
local preset_args = nil
L1591 🟡 unused_local_variable
Local variable 'szx' is assigned but never used
Impact: low
Show code
local szx, szy = self:ScaleMarkerByDistance()
L1603 🟡 unused_local_variable
Local variable 'd_nhide' is assigned but never used
Impact: low
Show code
local d_nhide = self.d_near_hide_dist or self.near_hide_dist
L1604 🟡 unused_local_variable
Local variable 'd_near' is assigned but never used
Impact: low
Show code
local d_near = self.d_near_fade_dist or self.near_fade_dist
L1605 🟡 unused_local_variable
Local variable 'd_far' is assigned but never used
Impact: low
Show code
local d_far = self.d_far_fade_dist or self.far_fade_dist
L1606 🟡 unused_local_variable
Local variable 'd_fhide' is assigned but never used
Impact: low
Show code
local d_fhide = self.d_far_hide_dist or self.far_hide_dist
L1636 🟡 unused_local_variable
Local variable 'dx' is assigned but never used
Impact: low
Show code
local nx,ny,dx,dy,tw
L1636 🟡 unused_local_variable
Local variable 'dy' is assigned but never used
Impact: low
Show code
local nx,ny,dx,dy,tw

utils_catspaw_mapspots.script

L154 🟢 uncached_globals_summary
Cache 1 globals in get_argb
Impact: medium
Show code
L158: tonumber L159: tonumber
L217 🟢 uncached_globals_summary
Cache 1 globals in get_mapspot_texture_data
Impact: medium
Show code
L267: tonumber L268: tonumber
L279 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Loaded %s v%s (rel %s)", script_name, script_version, release_date)
L4 🔴 global_write
Global write: script_name
Impact: low
Show code
script_name = "utils_catspaw_mapspots"
L5 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "1.1"
L6 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20250406
L35 🔴 global_write
Global write: logprefix
Impact: low
Show code
logprefix = "[Catsy:Mapspots] "
L36 🔴 global_write
Global write: debuglogs
Impact: low
Show code
debuglogs = false
L37 🔴 global_write
Global write: verbose
Impact: low
Show code
verbose = false
L38 🔴 global_write
Global write: vprefix
Impact: low
Show code
vprefix = ""
L54 🔴 global_write
Global write: debuglogs
Impact: low
Show code
if (debug_en ~= nil) then debuglogs = debug_en end
L55 🔴 global_write
Global write: verbose
Impact: low
Show code
if (verbose_en ~= nil) then verbose = verbose_en end
L66 🔴 global_write
Global write: task_mapspot_whitelist
Impact: low
Show code
task_mapspot_whitelist = {
L73 🔴 global_write
Global write: mapspot_data_cache
Impact: low
Show code
mapspot_data_cache = {}
L219 🔴 global_write
Global write: mapspot_data_cache
Impact: low
Show code
mapspot_data_cache = {}

utils_catspaw_text.script

L221 🟢 uncached_globals_summary
Cache 1 globals in csv_argb_to_tbl
Impact: medium
Show code
L230: tonumber L231: tonumber
L330 🟢 uncached_globals_summary
Cache 2 globals in int_to_rgba
Impact: medium
Show code
L338: bit.band L339: bit.band L338: bit.rshift L339: bit.rshift
L794 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Loaded %s v%s (rel %s)", script_name, script_version, release_date)
L4 🔴 global_write
Global write: script_name
Impact: low
Show code
script_name = "utils_catspaw_text"
L5 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "1.11"
L6 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20250717
L37 🔴 global_write
Global write: debuglogs
Impact: low
Show code
debuglogs = false
L38 🔴 global_write
Global write: verbose
Impact: low
Show code
verbose = false
L39 🔴 global_write
Global write: logprefix
Impact: low
Show code
logprefix = "[CatsyText] "
L40 🔴 global_write
Global write: vprefix
Impact: low
Show code
vprefix = ""
L56 🔴 global_write
Global write: debuglogs
Impact: low
Show code
if (debug_en ~= nil) then debuglogs = debug_en end
L57 🔴 global_write
Global write: verbose
Impact: low
Show code
if (verbose_en ~= nil) then verbose = verbose_en end
L82 🔴 global_write
Global write: tokens_generated
Impact: low
Show code
tokens_generated = false
L296 🔴 global_write
Global write: state_tokens
Impact: low
Show code
state_tokens = {}
L297 🔴 global_write
Global write: state_colors
Impact: low
Show code
state_colors = {
L420 🔴 global_write
Global write: wpo_thresholds
Impact: low
Show code
wpo_thresholds = {
L768 🔴 global_write
Global write: safename
Impact: low
Show code
safename = bestname -- alias for backwards compatibility
L75 🟡 unused_local_variable
Local variable 'sfind' is assigned but never used
Impact: low
Show code
local sfind = string.find
L138 🟡 unused_local_variable
Local variable 'custom_tokens' is assigned but never used
Impact: low
Show code
local custom_tokens = args and args.tokens or {}
L195 🟡 unused_local_variable
Local variable 'nfirst' is assigned but never used
Impact: low
Show code
local nfirst, nlast = get_firstname_lastname(npcname)
L195 🟡 unused_local_variable
Local variable 'nlast' is assigned but never used
Impact: low
Show code
local nfirst, nlast = get_firstname_lastname(npcname)
L686 🟡 unused_local_variable
Local variable 'st_id' is assigned but never used
Impact: low
Show code
local st_id = tostring(id)

331- Barrier Defense Task Emission Fix - Catspaw

1 file (🟢0 🟡0 🔴2 🔵3)

z_barrier_defense_emission_fix.script

L26 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Barrier defense task fix: re-enabling emissions")
L49 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('barrier_defense_news: first argument must be "start", "end" or "escape"')
L51 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('barrier_defense_news: missing or wrong arguments, must be ([start,end,escape]:[zombie,monolith])')
L19 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "1.1"
L20 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20240806

332- QoL Patch to Tweak_Breeki's RF Receiver Hidden Packages - Cookbook

3 files (🟢15 🟡5 🔴120 🔵23)

CB_RF_patch_mcm.script

L5 🔴 global_write
Global write: op
Impact: low
Show code
op = {

TB_RF_Receiver_Packages.script

L974 🟢 table_insert_append
table.insert(tb_new_queue, v) -> tb_new_queue[#tb_new_queue+1] = v
Impact: high
Show code
local tb_map_names = {}
L1117 🟢 table_insert_append
table.insert(tb_package_queue, v) -> tb_package_queue[#tb_package_queue+1] = v
Impact: high
Show code
end
L1120 🟢 table_insert_append
table.insert(tb_package_queue, v) -> tb_package_queue[#tb_package_queue+1] = v
Impact: high
Show code
local m_data = alife_storage_manager.get_state()
L1255 🟢 table_insert_append
table.insert(notfriends, v) -> notfriends[#notfriends+1] = v
Impact: high
Show code
local bg_array = {}
L1265 🟢 table_insert_append
table.insert(bg_array, v) -> bg_array[#bg_array+1] = v
Impact: high
Show code
local abadguy = tb_maybe_badguys[badguygroup][math.random(#tb_maybe_badguys[badguygroup])]
L892 🟢 uncached_globals_summary
Cache 2 globals in give_bonus_items
Impact: medium
Show code
L909: math.random L910: math.random L911: tostring L914: tostring
L1001 🟢 uncached_globals_summary
Cache 2 globals in failsafepackagespawn
Impact: medium
Show code
L1026: math.random L1032: math.random L1037: tostring L1045: tostring
L1168 🟢 uncached_globals_summary
Cache 2 globals in tb_radio_thing
Impact: medium
Show code
L1194: math.random L1213: math.random L1225: tostring L1233: tostring
L1247 🟢 uncached_globals_summary
Cache 1 globals in spawn_some_badguys
Impact: medium
Show code
L1248: math.random L1258: math.random
L1341 🟢 uncached_globals_summary
Cache 1 globals in actor_on_item_take
Impact: medium
Show code
L1365: tostring L1366: tostring
L1261 🟢 repeated_alife
alife called 3x in spawn_some_badguys
Impact: low
Show code
local sim = alife()
L947 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
--[TB] SET tb_radio_has_run_once FLAG WHEN ADDING ADDON MID-GAME
L978 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
tb_map_names[tb_package_queue[i][2]] = true
L44 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
tb_target_item = 0
L45 🔴 global_write
Global write: tb_sufficient_passed
Impact: low
Show code
tb_sufficient_passed = false
L46 🔴 global_write
Global write: tb_package_active
Impact: low
Show code
tb_package_active = false
L47 🔴 global_write
Global write: tb_reminder
Impact: low
Show code
tb_reminder = "empty"
L48 🔴 global_write
Global write: tb_package_in_level
Impact: low
Show code
tb_package_in_level = "empty"
L49 🔴 global_write
Global write: tb_freq
Impact: low
Show code
tb_freq = 0
L50 🔴 global_write
Global write: tb_sender_icon
Impact: low
Show code
tb_sender_icon = "empty"
L51 🔴 global_write
Global write: tb_scan_time
Impact: low
Show code
tb_scan_time = 4000
L52 🔴 global_write
Global write: tb_tg_scan
Impact: low
Show code
tb_tg_scan = 0
L53 🔴 global_write
Global write: tb_device
Impact: low
Show code
tb_device = "detector_radio"
L54 🔴 global_write
Global write: tb_relation_diff
Impact: low
Show code
tb_relation_diff = 250
L56 🔴 global_write
Global write: tb_target_lvid
Impact: low
Show code
tb_target_lvid = 0
L57 🔴 global_write
Global write: tb_target_gvid
Impact: low
Show code
tb_target_gvid = 0
L58 🔴 global_write
Global write: tb_bonus_items
Impact: low
Show code
tb_bonus_items = 0
L59 🔴 global_write
Global write: tb_badguy_spawned
Impact: low
Show code
tb_badguy_spawned = false
L60 🔴 global_write
Global write: tb_tg_badguys
Impact: low
Show code
tb_tg_badguys = 0
L62 🔴 global_write
Global write: tb_previous_level
Impact: low
Show code
tb_previous_level = "empty"
L64 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
tb_making_package = false
L66 🔴 global_write
Global write: cb_note_given
Impact: low
Show code
cb_note_given = false
L74 🔴 global_write
Global write: cb_reminders
Impact: low
Show code
cb_reminders = "transitions"
L79 🔴 global_write
Global write: cb_upgrades
Impact: low
Show code
-- "never" stops all reminders except for when the package first spawns | "never" сообщение присылается 1 раз при появлении посылки
L83 🔴 global_write
Global write: cb_unpack
Impact: low
Show code
будут наборы улучшений из Anomaly
L93 🔴 global_write
Global write: cb_reminders
Impact: low
Show code
----------------------------------------------------------------------------------------------------------------------------------------------
L94 🔴 global_write
Global write: cb_upgrades
Impact: low
Show code
----------------------------------------------------------------------------------------------------------------------------------------------
L128 🔴 global_write
Global write: tb_package_active
Impact: low
Show code
end
L129 🔴 global_write
Global write: tb_badguy_spawned
Impact: low
L130 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
local function package_cancel(obj, actor_equ, inventory)
L131 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
item_radio.clear_target(tb_target_item)
L132 🔴 global_write
Global write: tb_reminder
Impact: low
Show code
RemoveTimeEvent(tb_target_item,"remind_about_radio_package")
L133 🔴 global_write
Global write: tb_package_in_level
Impact: low
Show code
tb_package_active = false
L134 🔴 global_write
Global write: tb_scan_time
Impact: low
Show code
tb_badguy_spawned = false
L143 🔴 global_write
Global write: tb_relations
Impact: low
Show code
db.actor:give_game_news(game.translate_string("tb_anon_sender"), game.translate_string("cb_cancel_package_success"), tb_sender_icon, 0, 20000, 0)
L159 🔴 global_write
Global write: tb_maybe_badguys
Impact: low
Show code
["renegade"] = {0,"ui_tb_package_icon_renegade"},
L175 🔴 global_write
Global write: tb_factions
Impact: low
Show code
["renegade"] = {"sim_default_renegade_0","sim_default_renegade_1","sim_default_renegade_2"},
L177 🔴 global_write
Global write: tb_cut_factions
Impact: low
Show code
}
L179 🔴 global_write
Global write: tb_homebases
Impact: low
Show code
--[TB] LIST OF FACTION NAMES
L182 🔴 global_write
Global write: tb_package_queue
Impact: low
Show code
tb_cut_factions = {"army", "bandit", "csky", "dolg", "ecolog", "freedom", "killer", "renegade", "stalker"}
L185 🔴 global_write
Global write: tb_allmaps
Impact: low
L223 🔴 global_write
Global write: tb_package_coords
Impact: low
Show code
["l13u_warlab"] = {"l13_generators", "l12_stancia_2"},
L711 🔴 global_write
Global write: tb_extraloot
Impact: low
Show code
{-7.923800945282, 0.018068969249725, 0.52995783090591, 94, 5303, "tb_loc_w_r", "tb_loc_dbg"}
L728 🔴 global_write
Global write: tb_extraupgrades
Impact: low
Show code
{"batteries_dead","st_batteries"},
L818 🔴 global_write
Global write: CB_streamlined_extraupgrades
Impact: low
Show code
{"upgr_w_3_scope_mount","st_upgr_w_scope_mount"},
L839 🔴 global_write
Global write: tb_junks
Impact: low
Show code
{"upgr_w_3_internal", "st_upgr_w_internal"},
L874 🔴 global_write
Global write: tb_copy_of_itms_manager
Impact: low
Show code
{"af_tapeworm","st_af_tapeworm_name"},
L887 🔴 global_write
Global write: tb_bonus_items
Impact: low
Show code
return true
L900 🔴 global_write
Global write: cb_upgrades
Impact: low
Show code
local extrabonus = false
L977 🔴 global_write
Global write: tb_package_queue
Impact: low
Show code
if not tb_map_names[tb_package_queue[i][2]] then
L1002 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
end
L1006 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
function failsafepackagespawn()
L1010 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
if (surge_state) or (psi_storm_state) then
L1016 🔴 global_write
Global write: tb_package_active
Impact: low
Show code
return false
L1017 🔴 global_write
Global write: tb_badguy_spawned
Impact: low
Show code
end
L1018 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
if tb_making_package == true then
L1019 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
item_radio.clear_target(tb_target_item)
L1020 🔴 global_write
Global write: tb_reminder
Impact: low
Show code
RemoveTimeEvent(tb_target_item,"remind_about_radio_package")
L1021 🔴 global_write
Global write: tb_package_in_level
Impact: low
Show code
tb_package_active = false
L1022 🔴 global_write
Global write: tb_scan_time
Impact: low
Show code
tb_badguy_spawned = false
L1025 🔴 global_write
Global write: tb_package_in_level
Impact: low
Show code
tb_reminder = "empty"
L1033 🔴 global_write
Global write: tb_freq
Impact: low
Show code
local rpos = vector():set(packagespot[1],packagespot[2],packagespot[3])
L1039 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
local rlocat = packagespot[6]
L1040 🔴 global_write
Global write: tb_target_lvid
Impact: low
Show code
local rplace = packagespot[7]
L1041 🔴 global_write
Global write: tb_target_gvid
Impact: low
Show code
local se_obj
L1044 🔴 global_write
Global write: tb_package_active
Impact: low
Show code
tb_target_item = se_obj.id
L1046 🔴 global_write
Global write: tb_reminder
Impact: low
Show code
tb_target_gvid = rgvid
L1050 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
local anonpdamessage = game.translate_string("cb_package_lost") .. " " .. game.translate_string(rlocat) .. " " .. game.translate_string(rplace) .. game.translate_string("tb_use_rf_on_freq") .. " " .. tostring(rfreq) .. game.translate_string("tb_mhz_to_search")
L1054 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
CreateTimeEvent(tb_target_item, "remind_about_radio_package", math.random(900,1800), remindaboutpackage)
L1064 🔴 global_write
Global write: tb_tg_badguys
Impact: low
Show code
function actor_on_update()
L1069 🔴 global_write
Global write: tb_badguy_spawned
Impact: low
Show code
tb_tg_badguys = tg + 2000
L1091 🔴 global_write
Global write: tb_tg_scan
Impact: low
L1108 🔴 global_write
Global write: tb_sender_icon
Impact: low
Show code
if (not tb_making_package) then
L1113 🔴 global_write
Global write: tb_sufficient_passed
Impact: low
Show code
tb_sender_icon = tb_relations[tb_factions[i]][2]
L1131 🔴 global_write
Global write: tb_sender_icon
Impact: low
Show code
tb_radio_thing()
L1132 🔴 global_write
Global write: tb_reminder
Impact: low
Show code
end
L1135 🔴 global_write
Global write: tb_sufficient_passed
Impact: low
Show code
if newrelation >= oldrelation+50 then
L1149 🔴 global_write
Global write: cb_reminders
Impact: low
L1169 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
end
L1173 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
function tb_radio_thing()
L1177 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
if (surge_state) or (psi_storm_state) then
L1187 🔴 global_write
Global write: tb_sender_icon
Impact: low
Show code
local actor_faction = get_actor_true_community()
L1201 🔴 global_write
Global write: tb_package_in_level
Impact: low
Show code
if chosenmap == tb_previous_level then
L1212 🔴 global_write
Global write: tb_previous_level
Impact: low
Show code
else
L1221 🔴 global_write
Global write: tb_freq
Impact: low
Show code
local rpos = vector():set(packagespot[1],packagespot[2],packagespot[3])
L1227 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
local rlocat = packagespot[6]
L1228 🔴 global_write
Global write: tb_target_lvid
Impact: low
Show code
local rplace = packagespot[7]
L1229 🔴 global_write
Global write: tb_target_gvid
Impact: low
Show code
local se_obj
L1232 🔴 global_write
Global write: tb_package_active
Impact: low
Show code
tb_target_item = se_obj.id
L1234 🔴 global_write
Global write: tb_reminder
Impact: low
Show code
tb_target_gvid = rgvid
L1238 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
local anonpdamessage = game.translate_string("tb_package_can_be_found") .. " " .. game.translate_string(rlocat) .. " " .. game.translate_string(rplace) .. game.translate_string("tb_use_rf_on_freq") .. " " .. tostring(rfreq) .. game.translate_string("tb_mhz_to_search")
L1241 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
utils_obj.play_sound("device\\pda\\pda_sos")
L1298 🔴 global_write
Global write: tb_scan_time
Impact: low
Show code
if dist_pos < 10 then
L1309 🔴 global_write
Global write: tb_scan_time
Impact: low
Show code
if (dist_pos >= 10) and (dist_pos < 50) then
L1320 🔴 global_write
Global write: tb_scan_time
Impact: low
Show code
if (dist_pos >= 50) and (dist_pos < 75) then
L1330 🔴 global_write
Global write: tb_scan_time
Impact: low
Show code
end
L1346 🔴 global_write
Global write: cb_unpack
Impact: low
Show code
function actor_on_item_take(item)
L1351 🔴 global_write
Global write: tb_package_active
Impact: low
Show code
cb_unpack = ui_mcm.get ("RF_package_patch/unpacking")
L1352 🔴 global_write
Global write: tb_badguy_spawned
Impact: low
Show code
end
L1353 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
if (itemid == tb_target_item) and tb_package_active == true then
L1354 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
item_radio.clear_target(tb_target_item)
L1355 🔴 global_write
Global write: tb_reminder
Impact: low
Show code
RemoveTimeEvent(tb_target_item,"remind_about_radio_package")
L1356 🔴 global_write
Global write: tb_package_in_level
Impact: low
Show code
tb_package_active = false
L1357 🔴 global_write
Global write: tb_scan_time
Impact: low
Show code
tb_badguy_spawned = false
L1369 🔴 global_write
Global write: tb_bonus_items
Impact: low
Show code
for i=1, 8 do
L1371 🔴 global_write
Global write: tb_bonus_items
Impact: low
Show code
local givename = "quest_package_" .. tostring(i)
L1389 🔴 global_write
Global write: note_given
Impact: low
L1418 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
--[TB] USING tb_radio_has_run_once FLAG FOR ADDING ADDON MID-GAME ELSE NIL DATA IS SET ON GAME LOAD
L1419 🔴 global_write
Global write: tb_sufficient_passed
Impact: low
Show code
--[TB] ADDED tb_radio_1_3_has_run_once FLAG
L1420 🔴 global_write
Global write: tb_package_active
Impact: low
Show code
function load_state(m_data)
L1421 🔴 global_write
Global write: tb_reminder
Impact: low
Show code
local m_data = alife_storage_manager.get_state()
L1422 🔴 global_write
Global write: tb_package_in_level
Impact: low
Show code
if m_data.tb_radio_has_run_once then
L1423 🔴 global_write
Global write: tb_freq
Impact: low
Show code
tb_target_item = m_data.tb_target_item
L1424 🔴 global_write
Global write: tb_sender_icon
Impact: low
Show code
tb_sufficient_passed = m_data.tb_sufficient_passed
L1425 🔴 global_write
Global write: tb_relations
Impact: low
Show code
tb_package_active = m_data.tb_package_active
L1426 🔴 global_write
Global write: tb_package_queue
Impact: low
Show code
tb_reminder = m_data.tb_reminder
L1429 🔴 global_write
Global write: tb_target_lvid
Impact: low
Show code
tb_sender_icon = m_data.tb_sender_icon
L1430 🔴 global_write
Global write: tb_target_gvid
Impact: low
Show code
tb_relations = m_data.tb_relations
L1431 🔴 global_write
Global write: tb_bonus_items
Impact: low
Show code
tb_package_queue = m_data.tb_package_queue
L1432 🔴 global_write
Global write: tb_badguy_spawned
Impact: low
Show code
end
L1435 🔴 global_write
Global write: tb_previous_level
Impact: low
Show code
tb_target_gvid = m_data.tb_target_gvid
L1438 🔴 global_write
Global write: cb_note_given
Impact: low
Show code
end
L1087 🟡 potential_nil_access
Potential nil access: 'obj_det' from :active_detector() used without nil check
Impact: low
Show code
else
L1087 🟡 potential_nil_access
Potential nil access: 'obj_det' from :active_detector() used without nil check
Impact: low
Show code
else
L1087 🟡 potential_nil_access
Potential nil access: 'obj_det' from :active_detector() used without nil check
Impact: low
Show code
else
L1277 🟡 unused_local_variable
Local variable 'tb_highbeep_flash_time' is assigned but never used
Impact: low
Show code
local midbeep = sound_object("detectors\\tb_midbeep")

custom_functor_autoinject.script

L114 🟢 string_len
string.len(pos) -> #pos
Impact: low
Show code
sub_print_r(val,indent..string.rep(" ",string.len(pos)+8))
L115 🟢 string_len
string.len(pos) -> #pos
Impact: low
Show code
printf(indent..string.rep(" ",string.len(pos)+6).."}")
L105 🟢 uncached_globals_summary
Cache 1 globals in sub_print_r
Impact: medium
Show code
L106: tostring L107: tostring
L128 🟢 uncached_globals_summary
Cache 1 globals in print_table
Impact: medium
Show code
L137: type L139: type
L107 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."*"..tostring(t))
L113 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."["..pos.."] => "..tostring(t).." {")
L115 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent..string.rep(" ",string.len(pos)+6).."}")
L117 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."["..pos.."] => "..tostring(val))
L121 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent..tostring(t))
L140 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = function",k)
L143 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s",k,utils_data.vector_to_string(v))
L145 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = userdata", k)
L150 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = true",k)
L152 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = true")
L156 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = false", k)
L158 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = false")
L163 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s", k,v)
L165 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = nil", k,v)
L319 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s, %s", k, v.index)
L322 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s, %s, max custom_functor reached", k, v.index)
L424 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Custom functors, processing queue")
L427 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Custom functors, type %s", v.type)
L464 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("functor slot is not valid, min 1, max 10, your slot: %s", slot)
L479 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("functor slot is not valid min 1, max 10, your slot: %s", slot)
L515 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[" .. k .. "] => ")
L98 🟡 unused_local_variable
Local variable 'table_remove' is assigned but never used
Impact: low
Show code
local table_remove = table.remove

335- Auto-Stacking Items - Zatura

1 file (🟢0 🟡8 🔴0 🔵16)

zatura_autostack.script

L11 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sec.." "..id.." is multiuse, trying stacking")
L13 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("type "..sec.." already processes, skipping")
L15 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("type "..sec.." not processed yet, adding")
L20 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sec.." is not multiuse, skipping")
L24 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("#Starting to try autostacking!")
L42 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Starting autostacking with "..sentsec.." ID "..obj)
L71 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("item parent is undefined %s, %s", actor:name(), actor:section())
L76 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Combiner, all items are filled")
L130 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("item parent is undefined %s, %s", actor:name(), actor:section())
L133 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("old uses %s, new uses %s, diff %s", old_total_uses, total_uses, total_uses - old_total_uses)
L157 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("#actor took "..tostring(itm:section()))
L162 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("#actor took"..tostring(itm:section()).." from box "..tostring(box:section()))
L167 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("#actor put"..tostring(itm:section()).." in box "..tostring(box:section()))
L172 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("#actor used "..tostring(itm:section()))
L177 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("#actor dropped "..tostring(itm:section()))
L188 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("# Zatura's Auto-Stacking items Enabled!")
L67 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:iterate_ruck(iterate, actor)
L69 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:iterate_inventory_box(iterate, actor)
L71 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
printf("item parent is undefined %s, %s", actor:name(), actor:section())
L71 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
printf("item parent is undefined %s, %s", actor:name(), actor:section())
L126 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:iterate_ruck(iterate, actor)
L128 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:iterate_inventory_box(iterate, actor)
L130 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
printf("item parent is undefined %s, %s", actor:name(), actor:section())
L130 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
printf("item parent is undefined %s, %s", actor:name(), actor:section())

336- Item UI Improvements - Utjan

6 files (🟢5 🟡5 🔴42 🔵0)

dynamic_eq_icon.script

L1 🔴 global_write
Global write: ini_icons
Impact: low
Show code
ini_icons = nil
L2 🔴 global_write
Global write: x_offset
Impact: low
Show code
x_offset, y_offset, seperator = 0
L2 🔴 global_write
Global write: y_offset
Impact: low
Show code
x_offset, y_offset, seperator = 0
L2 🔴 global_write
Global write: seperator
Impact: low
Show code
x_offset, y_offset, seperator = 0
L7 🔴 global_write
Global write: ini_icons
Impact: low
Show code
ini_icons = ini_file("plugins\\eq_icons_settings.ltx")
L8 🔴 global_write
Global write: x_offset
Impact: low
Show code
x_offset = ini_icons:r_float("positioning", "x_offset")
L9 🔴 global_write
Global write: y_offset
Impact: low
Show code
y_offset = ini_icons:r_float("positioning", "y_offset")
L10 🔴 global_write
Global write: seperator
Impact: low
Show code
seperator = ini_icons:r_float("positioning", "seperator")
L13 🔴 global_write
Global write: armor_kinds
Impact: low
Show code
armor_kinds = {
L39 🔴 global_write
Global write: repair_type_h
Impact: low
Show code
repair_type_h = 0
L43 🔴 global_write
Global write: repair_type_h
Impact: low
Show code
repair_type_h = repair_table[3] + seperator

item_icon_info_mcm.script

L2 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "item_icon_info" ,gr={

rax_icon_layers.script

L28 🟢 table_insert_append
table.insert(icon_layers[name], v) -> icon_layers[name][#icon_layers[name]+1] = v
Impact: high
Show code
table.insert(icon_layers[name], functor)

z_item_icon_info.script

L496 🟢 uncached_globals_summary
Cache 1 globals in Add_Ammo_Short_Name_Text
Impact: medium
Show code
L498: pairs L503: pairs
L613 🟢 uncached_globals_summary
Cache 1 globals in change_alpha
Impact: medium
Show code
L616: bit.band L617: bit.band
L724 🟢 uncached_globals_summary
Cache 1 globals in Add_Mag_Icon_Text
Impact: medium
Show code
L734: pairs L739: pairs
L543 🟡 string_concat_in_loop
String concat in loop: name_cutoff = name_cutoff .. x
Impact: critical
Show code
name_cutoff = name_cutoff .. " " .. str_table[1]
L548 🟡 string_concat_in_loop
String concat in loop: gc_name = gc_name .. x
Impact: critical
Show code
gc_name = gc_name .. str_table[i]
L821 🟡 string_concat_in_loop
String concat in loop: name_cutoff = name_cutoff .. x
Impact: critical
Show code
name_cutoff = name_cutoff .. " " .. str_table[1]
L826 🟡 string_concat_in_loop
String concat in loop: gc_name = gc_name .. x
Impact: critical
Show code
gc_name = gc_name .. str_table[i]
L1 🔴 global_write
Global write: bar_list
Impact: low
Show code
bar_list = {
L9 🔴 global_write
Global write: utjan_xml
Impact: low
Show code
utjan_xml = nil
L11 🔴 global_write
Global write: base_init
Impact: low
Show code
base_init = utils_ui.UICellItem.InitControls
L17 🔴 global_write
Global write: base_pbar
Impact: low
Show code
base_pbar = utils_ui.UICellItem.Add_ProgressBar
L36 🔴 global_write
Global write: base_counter
Impact: low
Show code
base_counter = utils_ui.UICellItem.Add_Counter
L51 🔴 global_write
Global write: base_reset
Impact: low
Show code
base_reset = utils_ui.UICellItem.Reset
L76 🔴 global_write
Global write: valid_wpn_kinds
Impact: low
Show code
valid_wpn_kinds = {
L86 🔴 global_write
Global write: grenade_classes
Impact: low
Show code
grenade_classes = {
L92 🔴 global_write
Global write: main_slot_indexes
Impact: low
Show code
main_slot_indexes = {
L216 🔴 global_write
Global write: arty_table
Impact: low
Show code
arty_table = {
L325 🔴 global_write
Global write: clr_r
Impact: low
Show code
clr_r = GetARGB(255,196,18,18)
L326 🔴 global_write
Global write: clr_o
Impact: low
Show code
clr_o = utils_xml.get_color("d_orange", true)
L327 🔴 global_write
Global write: clr_y
Impact: low
Show code
clr_y = GetARGB(255,255,255,118)
L328 🔴 global_write
Global write: clr_g
Impact: low
Show code
clr_g = GetARGB(255,107,207,119)
L329 🔴 global_write
Global write: clr_missing
Impact: low
Show code
clr_missing = GetARGB(255,70,60,60) -- Missing part color
L428 🔴 global_write
Global write: unique_mapping
Impact: low
Show code
unique_mapping = {
L439 🔴 global_write
Global write: name_mapping
Impact: low
Show code
name_mapping = {
L485 🔴 global_write
Global write: valid_ammo_class
Impact: low
Show code
valid_ammo_class = {
L490 🔴 global_write
Global write: valid_exlosive_ammo
Impact: low
Show code
valid_exlosive_ammo = {
L625 🔴 global_write
Global write: one_use_recipes
Impact: low
Show code
one_use_recipes = {
L629 🔴 global_write
Global write: workshop_autoinject_known_recipes
Impact: low
Show code
workshop_autoinject_known_recipes = {}
L631 🔴 global_write
Global write: functor_table_readable
Impact: low
Show code
functor_table_readable = {
L674 🔴 global_write
Global write: workshop_autoinject_known_recipes
Impact: low
Show code
workshop_autoinject_known_recipes = workshop_autoinject and workshop_autoinject.known_recipe or workshop_autoinject_known_recipes
L715 🔴 global_write
Global write: base_wai_load
Impact: low
Show code
base_wai_load = workshop_autoinject.load_state
L718 🔴 global_write
Global write: workshop_autoinject_known_recipes
Impact: low
Show code
workshop_autoinject_known_recipes = mdata.known_recipe or {}
L882 🔴 global_write
Global write: repair_type_texture_tbl
Impact: low
Show code
repair_type_texture_tbl = {
L908 🔴 global_write
Global write: settings
Impact: low
Show code
settings = load_defaults()
L911 🔴 global_write
Global write: settings
Impact: low
Show code
settings = load_defaults()
L930 🔴 global_write
Global write: utjan_xml
Impact: low
Show code
utjan_xml = CScriptXmlInit()

z_scale_equipped_guns.script

L140 🟢 repeated_obj_id()
obj:id() called 4x in Action_Detach_Silencer
Impact: low
Show code
Cache obj:id() result
L2 🔴 global_write
Global write: ini_scaling
Impact: low
Show code
ini_scaling = ini_file("plugins\\utjan_gun_scaling.ltx")

z_z_item_icon_info.script

L1 🟡 unused_local_variable
Local variable 'old_z_item_icon_info_parts_sort' is assigned but never used
Impact: low
Show code
local old_z_item_icon_info_parts_sort = z_item_icon_info.parts_sort

337- QoL Bundle - Utjan

5 files (🟢3 🟡1 🔴12 🔵0)

craft_use_low_cond.script

L2 🔴 global_write
Global write: base_craft
Impact: low
Show code
base_craft = ui_workshop.UIWorkshopCraft.Craft

fetch_item_icon.script

L5 🟢 uncached_globals_summary
Cache 1 globals in fetch_item_icon
Impact: medium
Show code
L15: pairs L37: pairs
L27 🔴 global_write
Global write: delivery_table
Impact: low
Show code
delivery_table = load_var(actor, task_id)

quick_use_prio.script

L59 🟢 repeated_obj_section()
obj:section() called 3x in ui_inventory.UIInventory.Action_Use
Impact: low
Show code
Cache obj:section() result
L45 🔴 global_write
Global write: last_bag
Impact: low
Show code
last_bag = nil
L47 🔴 global_write
Global write: base_action_use
Impact: low
Show code
base_action_use = ui_inventory.UIInventory.Action_Use
L50 🔴 global_write
Global write: last_bag
Impact: low
Show code
last_bag = nil
L60 🔴 global_write
Global write: last_bag
Impact: low
Show code
last_bag = nil
L86 🔴 global_write
Global write: last_bag
Impact: low
Show code
last_bag = nil
L90 🔴 global_write
Global write: base_on_mouse1_db
Impact: low
Show code
base_on_mouse1_db = ui_inventory.UIInventory.On_CC_Mouse1_DB
L92 🔴 global_write
Global write: last_bag
Impact: low
Show code
last_bag = bag
L96 🔴 global_write
Global write: base_on_mouse2_db
Impact: low
Show code
base_on_mouse2_db = ui_inventory.UIInventory.On_CC_Mouse2
L98 🔴 global_write
Global write: last_bag
Impact: low
Show code
last_bag = bag
L59 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
if not (obj and obj:section()) then

rax_icon_layers.script

L28 🟢 table_insert_append
table.insert(icon_layers[name], v) -> icon_layers[name][#icon_layers[name]+1] = v
Impact: high
Show code
table.insert(icon_layers[name], functor)

stacks_to_uses.script

L2 🔴 global_write
Global write: Base_Add_Counter
Impact: low
Show code
Base_Add_Counter = utils_ui.UICellItem.Add_Counter

338- Soulslike Gamemode - Jabbers

7 files (🟢53 🟡12 🔴3 🔵8)

soulslike.script

L571 🟢 table_insert_append
table.insert(item_names, v) -> item_names[#item_names+1] = v
Impact: high
Show code
table.insert(item_names, tostring(group.count).." x "..inv_name)
L573 🟢 table_insert_append
table.insert(item_names, v) -> item_names[#item_names+1] = v
Impact: high
Show code
table.insert(item_names, inv_name)
L649 🟢 string_len
string.len(file:NameFull()) -> #file:NameFull()
Impact: low
Show code
local file_name = string.sub(file:NameFull(), 0, (string.len(file:NameFull()) - string.len(".scoc")))
L649 🟢 string_len
string.len(".scoc") -> #".scoc"
Impact: low
Show code
local file_name = string.sub(file:NameFull(), 0, (string.len(file:NameFull()) - string.len(".scoc")))
L98 🟢 uncached_globals_summary
Cache 2 globals in print_table
Impact: medium
Show code
L103: string.rep L111: string.rep L107: type L113: type
L690 🟢 uncached_globals_summary
Cache 1 globals in physic_object_on_use_callback
Impact: medium
Show code
L704: tostring L705: tostring
L795 🟢 uncached_globals_summary
Cache 2 globals in on_game_load
Impact: medium
Show code
L812: tostring L814: tostring L845: math.random L845: math.random
L413 🟢 repeated_device
device called 3x in force_save
Impact: low
Show code
local dev = device()
L916 🟢 repeated_npc_id()
npc:id() called 5x in npc_on_net_spawn
Impact: low
Show code
Cache npc:id() result
L114 🟡 string_concat_in_loop
String concat in loop: toprint = toprint .. x
Impact: critical
Show code
toprint = toprint .. "[" .. k .. "] = "
L147 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("DEBUG", output)
L151 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("INFO ", output)
L155 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("WARN ", output)
L159 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("ERROR", output)
L35 🔴 global_write
Global write: hit_type_to_str
Impact: low
Show code
hit_type_to_str = {
L48 🔴 global_write
Global write: entity_type
Impact: low
Show code
entity_type = {

soulslike_classes.script

L55 🟢 table_insert_append
table.insert(values, v) -> values[#values+1] = v
Impact: high
Show code
table.insert(values, v)

soulslike_mcm.script

L42 🟢 table_insert_append
table.insert(op.gr, v) -> op.gr[#op.gr+1] = v
Impact: high
Show code
table.insert(op.gr, general)
L107 🟢 table_insert_append
table.insert(op.gr, v) -> op.gr[#op.gr+1] = v
Impact: high
Show code
table.insert(op.gr, character)
L408 🟢 table_insert_append
table.insert(op.gr, v) -> op.gr[#op.gr+1] = v
Impact: high
Show code
table.insert(op.gr, items)
L580 🟢 table_insert_append
table.insert(op.gr, v) -> op.gr[#op.gr+1] = v
Impact: high
Show code
table.insert(op.gr, ignored_items)
L628 🟢 table_insert_append
table.insert(op.gr, v) -> op.gr[#op.gr+1] = v
Impact: high
Show code
table.insert(op.gr, scenarios)
L748 🟢 table_insert_append
table.insert(op.gr, v) -> op.gr[#op.gr+1] = v
Impact: high
Show code
table.insert(op.gr, ambush)
L797 🟢 table_insert_append
table.insert(op.gr, v) -> op.gr[#op.gr+1] = v
Impact: high
Show code
table.insert(op.gr, hardcore)
L881 🟢 table_insert_append
table.insert(op.gr, v) -> op.gr[#op.gr+1] = v
Impact: high
Show code
table.insert(op.gr, debug)

soulslike_note.script

L3 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end

soulslike_scenario_logic_factory.script

L150 🟢 table_insert_append
table.insert(available_scenarios, v) -> available_scenarios[#available_scenarios+1] = v
Impact: high
Show code
table.insert(available_scenarios, {id = soulslike.SCENARIOS.NoLoss, min = 0, max = 0, weight = 1.0})
L157 🟢 table_insert_append
table.insert(available_scenarios, v) -> available_scenarios[#available_scenarios+1] = v
Impact: high
Show code
table.insert(available_scenarios, {id = soulslike.SCENARIOS.Default, min = 0, max = 0, weight = 1.0})
L165 🟢 table_insert_append
table.insert(available_scenarios, v) -> available_scenarios[#available_scenarios+1] = v
Impact: high
Show code
table.insert(available_scenarios, {id = soulslike.SCENARIOS.RFDetectorStash, min = 0, max = 0, weight = 1.0})
L173 🟢 table_insert_append
table.insert(available_scenarios, v) -> available_scenarios[#available_scenarios+1] = v
Impact: high
Show code
table.insert(available_scenarios, {id = soulslike.SCENARIOS.HiddenStash, min = 0, max = 0, weight = 1.0})
L180 🟢 table_insert_append
table.insert(available_scenarios, v) -> available_scenarios[#available_scenarios+1] = v
Impact: high
Show code
table.insert(available_scenarios, {id = soulslike.SCENARIOS.NoLoss, min = 0, max = 0, weight = 1.0})
L188 🟢 table_insert_append
table.insert(available_scenarios, v) -> available_scenarios[#available_scenarios+1] = v
Impact: high
Show code
table.insert(available_scenarios, {id = soulslike.SCENARIOS.NoLoss, min = 0, max = 0, weight = 1.0})
L189 🟢 table_insert_append
table.insert(available_scenarios, v) -> available_scenarios[#available_scenarios+1] = v
Impact: high
Show code
table.insert(available_scenarios, {id = soulslike.SCENARIOS.Default, min = 0, max = 0, weight = scenario_loot_scalar})
L195 🟢 table_insert_append
table.insert(available_scenarios, v) -> available_scenarios[#available_scenarios+1] = v
Impact: high
Show code
table.insert(available_scenarios, {id = soulslike.SCENARIOS.NoLoss, min = 0, max = 0, weight = 1.0})
L203 🟢 table_insert_append
table.insert(available_scenarios, v) -> available_scenarios[#available_scenarios+1] = v
Impact: high
Show code
table.insert(available_scenarios, {id = soulslike.SCENARIOS.NoLoss, min = 0, max = 0, weight = 0.05})
L206 🟢 table_insert_append
table.insert(available_scenarios, v) -> available_scenarios[#available_scenarios+1] = v
Impact: high
Show code
table.insert(available_scenarios, {id = soulslike.SCENARIOS.Default, min = 0, max = 0, weight = 1.0})
L221 🟢 table_insert_append
table.insert(available_scenarios, v) -> available_scenarios[#available_scenarios+1] = v
Impact: high
Show code
table.insert(available_scenarios, {id = soulslike.SCENARIOS.NoLoss, min = 0, max = 0, weight = 1.0})
L230 🟢 table_insert_append
table.insert(available_scenarios, v) -> available_scenarios[#available_scenarios+1] = v
Impact: high
Show code
table.insert(available_scenarios, {id = soulslike.SCENARIOS.NoLoss, min = 0, max = 0, weight = 0.05})
L233 🟢 table_insert_append
table.insert(available_scenarios, v) -> available_scenarios[#available_scenarios+1] = v
Impact: high
Show code
table.insert(available_scenarios, {id = soulslike.SCENARIOS.Default, min = 0, max = 0, weight = 1.0})
L246 🟢 table_insert_append
table.insert(available_scenarios, v) -> available_scenarios[#available_scenarios+1] = v
Impact: high
Show code
table.insert(available_scenarios, {id = soulslike.SCENARIOS.NoLoss, min = 0, max = 0, weight = 0.05})
L249 🟢 table_insert_append
table.insert(available_scenarios, v) -> available_scenarios[#available_scenarios+1] = v
Impact: high
Show code
table.insert(available_scenarios, {id = soulslike.SCENARIOS.Default, min = 0, max = 0, weight = 1.0})
L262 🟢 table_insert_append
table.insert(available_scenarios, v) -> available_scenarios[#available_scenarios+1] = v
Impact: high
Show code
table.insert(available_scenarios, {id = soulslike.SCENARIOS.NoLoss, min = 0, max = 0, weight = 0.05})
L265 🟢 table_insert_append
table.insert(available_scenarios, v) -> available_scenarios[#available_scenarios+1] = v
Impact: high
Show code
table.insert(available_scenarios, {id = soulslike.SCENARIOS.Default, min = 0, max = 0, weight = 1.0})
L278 🟢 table_insert_append
table.insert(available_scenarios, v) -> available_scenarios[#available_scenarios+1] = v
Impact: high
Show code
table.insert(available_scenarios, {id = soulslike.SCENARIOS.NoLoss, min = 0, max = 0, weight = 0.05})
L281 🟢 table_insert_append
table.insert(available_scenarios, v) -> available_scenarios[#available_scenarios+1] = v
Impact: high
Show code
table.insert(available_scenarios, {id = soulslike.SCENARIOS.Default, min = 0, max = 0, weight = 1.0})
L293 🟢 table_insert_append
table.insert(available_scenarios, v) -> available_scenarios[#available_scenarios+1] = v
Impact: high
Show code
table.insert(available_scenarios, {id = soulslike.SCENARIOS.NoLoss, min = 0, max = 0, weight = 0.05})
L296 🟢 table_insert_append
table.insert(available_scenarios, v) -> available_scenarios[#available_scenarios+1] = v
Impact: high
Show code
table.insert(available_scenarios, {id = soulslike.SCENARIOS.Default, min = 0, max = 0, weight = 1.0})
L3 🟢 uncached_globals_summary
Cache 1 globals in compute_fatal_hit_info
Impact: medium
Show code
L12: ipairs L19: ipairs
L123 🟢 uncached_globals_summary
Cache 2 globals in create_new
Impact: medium
Show code
L127: tostring L175: tostring L322: pairs L327: pairs

soulslike_scenarios.script

L448 🟢 table_insert_append
table.insert(self.game_state.created_stashes[to_id].lost_items, v) -> self.game_state.created_stashes[to_id].lost_items[#self.game_state.created_stashes[to_id].lost_items+1] = v
Impact: high
Show code
table.insert(self.game_state.created_stashes[to_id].lost_items, sec)
L650 🟢 table_insert_append
table.insert(spawns, v) -> spawns[#spawns+1] = v
Impact: high
Show code
table.insert(spawns, spawn)
L669 🟢 table_insert_append
table.insert(spawns, v) -> spawns[#spawns+1] = v
Impact: high
Show code
table.insert(spawns, spawn)
L962 🟢 table_insert_append
table.insert(self.game_state.created_stashes[to_id].lost_items, v) -> self.game_state.created_stashes[to_id].lost_items[#self.game_state.created_stashes[to_id].lost_items+1] = v
Impact: high
Show code
table.insert(self.game_state.created_stashes[to_id].lost_items, sec)
L982 🟢 table_insert_append
table.insert(self.game_state.created_stashes[to_id].lost_items, v) -> self.game_state.created_stashes[to_id].lost_items[#self.game_state.created_stashes[to_id].lost_items+1] = v
Impact: high
Show code
table.insert(self.game_state.created_stashes[to_id].lost_items, sec)
L1007 🟢 table_insert_append
table.insert(keys, v) -> keys[#keys+1] = v
Impact: high
Show code
table.insert(keys, k)
L1053 🟢 table_insert_append
table.insert(self.game_state.created_stashes[to_id].lost_items, v) -> self.game_state.created_stashes[to_id].lost_items[#self.game_state.created_stashes[to_id].lost_items+1] = v
Impact: high
Show code
table.insert(self.game_state.created_stashes[to_id].lost_items, sec)
L1160 🟢 table_insert_append
table.insert(self.game_state.created_stashes[to_id].lost_items, v) -> self.game_state.created_stashes[to_id].lost_items[#self.game_state.created_stashes[to_id].lost_items+1] = v
Impact: high
Show code
table.insert(self.game_state.created_stashes[to_id].lost_items, sec)
L397 🟢 uncached_globals_summary
Cache 1 globals in ApplyItemConditionLoss
Impact: medium
Show code
L401: tostring L402: tostring
L613 🟢 uncached_globals_summary
Cache 1 globals in SpawnAmbush
Impact: medium
Show code
L640: pairs L661: pairs
L889 🟢 uncached_globals_summary
Cache 1 globals in IsItemLossAllowed
Impact: medium
Show code
L936: math.random L940: math.random
L194 🔴 global_write
Global write: slot
Impact: low
Show code
slot = db.actor:item_in_slot(i)
L195 🟡 potential_nil_access
Potential nil access: 'slot' from :item_in_slot() used without nil check
Impact: low
Show code
if (slot and slot:id() == id) then
L492 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local position = actor:position()
L499 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
level_vertex_id = actor:level_vertex_id(),
L500 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
game_vertex_id = actor:game_vertex_id()
L1249 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local se_stash = alife_create("inv_backpack", actor:position(), actor:level_vertex_id(), actor:game_vertex_id())
L1249 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local se_stash = alife_create("inv_backpack", actor:position(), actor:level_vertex_id(), actor:game_vertex_id())
L1249 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local se_stash = alife_create("inv_backpack", actor:position(), actor:level_vertex_id(), actor:game_vertex_id())
L1385 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local se_stash = alife_create("hidden_box", actor:position(), actor:level_vertex_id(), actor:game_vertex_id())
L1385 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local se_stash = alife_create("hidden_box", actor:position(), actor:level_vertex_id(), actor:game_vertex_id())
L1385 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local se_stash = alife_create("hidden_box", actor:position(), actor:level_vertex_id(), actor:game_vertex_id())

souslike_gamemode_injector_mcm.script

L132 🟢 repeated_level_name
level.name called 2x in actor_on_first_update
Impact: low
Show code
local level_name = level.name()
L58 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('[Soulslike] OnStartGame:is_soulslike_mode='..tostring(is_soulslike_mode))
L104 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('[Soulslike] on_game_load:no config')
L113 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('[Soulslike] on_game_load:enable_soulslike_mode=true')
L133 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('Initial spawn point set to '..level.name())

340- Black Market (Buyable Gear) - SalamanderAnder & nox

2 files (🟢24 🟡13 🔴26 🔵5)

dialog_blackmarket.script

L40 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("adding dialog %s for %s, pos %s", dialogs_table[character_id], character_id, res)
L3 🔴 global_write
Global write: dialogs_table
Impact: low
Show code
dialogs_table = {

zzzz_arti_jamming_repairs.script

L256 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details, with_scope:sub(2))
L262 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details, scope)
L266 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details, sil)
L270 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details, gl)
L290 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details,spare_parts[i])
L301 🟢 table_insert_append
table.insert(upgr_tools, v) -> upgr_tools[#upgr_tools+1] = v
Impact: high
Show code
table.insert(upgr_tools,tool)
L306 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details,upgr_tools[i])
L730 🟢 table_insert_append
table.insert(context_str, v) -> context_str[#context_str+1] = v
Impact: high
Show code
table.insert(context_str, replace_name(k, false))
L731 🟢 table_insert_append
table.insert(context_action, v) -> context_action[#context_action+1] = v
Impact: high
Show code
table.insert(context_action, "replace_part")
L732 🟢 table_insert_append
table.insert(context_params, v) -> context_params[#context_params+1] = v
Impact: high
Show code
table.insert(context_params, {obj:id(), k, repair_kit:section(), false})
L735 🟢 table_insert_append
table.insert(context_str, v) -> context_str[#context_str+1] = v
Impact: high
Show code
table.insert(context_str, replace_name(k, true))
L736 🟢 table_insert_append
table.insert(context_action, v) -> context_action[#context_action+1] = v
Impact: high
Show code
table.insert(context_action, "clean_part")
L737 🟢 table_insert_append
table.insert(context_params, v) -> context_params[#context_params+1] = v
Impact: high
Show code
table.insert(context_params, {obj:id(), k, clean_kit:section(), true})
L739 🟢 table_insert_append
table.insert(context_str, v) -> context_str[#context_str+1] = v
Impact: high
Show code
table.insert(context_str, replace_name(k, true))
L740 🟢 table_insert_append
table.insert(context_action, v) -> context_action[#context_action+1] = v
Impact: high
Show code
table.insert(context_action, "replace_part")
L741 🟢 table_insert_append
table.insert(context_params, v) -> context_params[#context_params+1] = v
Impact: high
Show code
table.insert(context_params, {obj:id(), k, repair_kit:section(), true})
L833 🟢 table_insert_append
table.insert(context_str, v) -> context_str[#context_str+1] = v
Impact: high
Show code
table.insert(context_str, remove_name(k))
L834 🟢 table_insert_append
table.insert(context_action, v) -> context_action[#context_action+1] = v
Impact: high
Show code
table.insert(context_action, "remove_part")
L835 🟢 table_insert_append
table.insert(context_params, v) -> context_params[#context_params+1] = v
Impact: high
Show code
table.insert(context_params, {obj:id(), k, v})
L841 🟢 table_insert_append
table.insert(context_str, v) -> context_str[#context_str+1] = v
Impact: high
Show code
table.insert(context_str, remove_name(nil))
L842 🟢 table_insert_append
table.insert(context_action, v) -> context_action[#context_action+1] = v
Impact: high
Show code
table.insert(context_action, "remove_part")
L843 🟢 table_insert_append
table.insert(context_params, v) -> context_params[#context_params+1] = v
Impact: high
Show code
table.insert(context_params, {obj:id(), k, v})
L55 🟢 uncached_globals_summary
Cache 1 globals in weapon_eval_parts
Impact: medium
Show code
L70: math.random L71: math.random
L732 🟢 repeated_obj_id()
obj:id() called 3x in init_maintenance_menu
Impact: low
Show code
Cache obj:id() result
L613 🟡 string_concat_in_loop
String concat in loop: display_str = display_str .. x
Impact: critical
Show code
display_str = display_str .. process_part(k, v)
L872 🟡 string_concat_in_loop
String concat in loop: str_msg = str_msg .. x
Impact: critical
Show code
str_msg = str_msg .. "\\n -" .. ui_item.get_sec_name(k)
L192 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ item_parts timer | no owner found")
L242 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ item_parts | no owner found for [%s]", obj:name())
L451 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR UIWorkshopRepair:Repair() | can't discharge toolkit with id (%s). Object not found!", self.toolkit_pick[i])
L469 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopRepair:Repair() | object with id (%s) is either not found. Or didn't register new condition (%s)!", id, final_con)
L7 🔴 global_write
Global write: gc
Impact: low
Show code
gc = game.translate_string
L8 🔴 global_write
Global write: has_parts
Impact: low
Show code
has_parts = arti_jamming.has_parts
L9 🔴 global_write
Global write: is_part
Impact: low
Show code
is_part = arti_jamming.is_part
L10 🔴 global_write
Global write: print_dbg
Impact: low
Show code
print_dbg = arti_jamming.print_dbg
L11 🔴 global_write
Global write: print_ws
Impact: low
Show code
print_ws = ui_workshop.print_ws
L12 🔴 global_write
Global write: get_config
Impact: low
Show code
get_config = a_arti_jamming_mcm.get_config
L13 🔴 global_write
Global write: math_floor
Impact: low
Show code
math_floor = math.floor
L14 🔴 global_write
Global write: current_id
Impact: low
Show code
current_id = arti_jamming.current_id
L15 🔴 global_write
Global write: reset_cgd
Impact: low
Show code
reset_cgd = arti_jamming.reset_cgd
L16 🔴 global_write
Global write: SetTip
Impact: low
Show code
SetTip = ui_workshop.SetTip
L82 🔴 global_write
Global write: EvaluateParts
Impact: low
Show code
EvaluateParts = item_parts.evaluate_parts
L220 🔴 global_write
Global write: DisassemblyWeapon
Impact: low
Show code
DisassemblyWeapon = item_parts.disassembly_weapon
L330 🔴 global_write
Global write: WorkshopReplacePart
Impact: low
Show code
WorkshopReplacePart = ui_workshop.UIWorkshopRepair.ReplacePart
L399 🔴 global_write
Global write: WorkshopRepair
Impact: low
Show code
WorkshopRepair = ui_workshop.UIWorkshopRepair.Repair
L495 🔴 global_write
Global write: HowMuch
Impact: low
Show code
HowMuch = inventory_upgrades_mp.how_much_repair
L506 🔴 global_write
Global write: quality_map
Impact: low
Show code
quality_map = {
L513 🔴 global_write
Global write: unique_mapping
Impact: low
Show code
unique_mapping = {
L524 🔴 global_write
Global write: name_mapping
Impact: low
Show code
name_mapping = {
L582 🔴 global_write
Global write: jam_prob
Impact: low
Show code
jam_prob = arti_jamming.get_jam_chance(wpn)
L584 🔴 global_write
Global write: clr
Impact: low
Show code
if jam_prob <= 5 then clr = clr_g
L585 🔴 global_write
Global write: clr
Impact: low
Show code
elseif jam_prob <= 10 then clr = clr_y
L586 🔴 global_write
Global write: clr
Impact: low
Show code
elseif jam_prob <= 20 then clr = clr_o
L587 🔴 global_write
Global write: clr
Impact: low
Show code
else clr = clr_r end
L589 🔴 global_write
Global write: jam_prob
Impact: low
Show code
jam_prob = tonumber(string.format("%.0f", jam_prob))
L599 🔴 global_write
Global write: original_build_desc_header
Impact: low
Show code
original_build_desc_header = ui_item.build_desc_header
L326 🟡 potential_nil_access
Potential nil access: 'npc' from :parent() used without nil check
Impact: low
Show code
CreateTimeEvent(0,"delay_disassembly" .. id, delay, timer_disassembly_weapon, npc:id(), result_details, result_conditions, name)
L697 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check (auto-fixable)
Impact: low
Show code
wpn:set_condition( clamp(wpn:condition() + 0.1, 0, 0.999) )
L697 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check (auto-fixable)
Impact: low
Show code
wpn:set_condition( clamp(wpn:condition() + 0.1, 0, 0.999) )
L862 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
wpn:force_unload_magazine(true)
L6 🟡 unused_local_variable
Local variable 'parts_info' is assigned but never used
Impact: low
Show code
local parts_info = {}
L88 🟡 unused_local_variable
Local variable 'm_con' is assigned but never used
Impact: low
Show code
local m_con = math.ceil(obj:condition() * 100) -- default condition of the item
L117 🟡 unused_local_variable
Local variable 'temp_con' is assigned but never used
Impact: low
Show code
local temp_con = {}
L248 🟡 unused_local_variable
Local variable 'get_ammo' is assigned but never used
Impact: low
Show code
local get_ammo = {}
L412 🟡 unused_local_variable
Local variable 'sim' is assigned but never used
Impact: low
Show code
local sim = alife()
L499 🟡 unused_local_variable
Local variable 'class' is assigned but never used
Impact: low
Show code
local class = ini_sys:r_string_ex(item_name, "class")
L534 🟡 unused_local_variable
Local variable 'math_ceil' is assigned but never used
Impact: low
Show code
local math_ceil = math.ceil

342- Desert Eagle Gunslinger Port - Dizmok & Pieuvre

3 files (🟢3 🟡3 🔴5 🔵2)

animation_common.script

L31 🟢 table_insert_append
table.insert(anim_mutators, v) -> anim_mutators[#anim_mutators+1] = v
Impact: high
Show code
table.insert(anim_mutators, {functor=functor, priority=priority})

aol_anim_transitions.script

L6 🟢 table_insert_append
table.insert(valid_anims, v) -> valid_anims[#valid_anims+1] = v
Impact: high
Show code
table.insert(valid_anims, anm_suffix)
L37 🟢 table_insert_append
table.insert(pattern_transitions[hud_section], v) -> pattern_transitions[hud_section][#pattern_transitions[hud_section]+1] = v
Impact: high
Show code
table.insert(pattern_transitions[hud_section], {
L99 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L128 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L15 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L32 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L3 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L10 🔴 global_write
Global write: transitions
Impact: low
Show code
transitions = {
L26 🔴 global_write
Global write: pattern_transitions
Impact: low
Show code
pattern_transitions = {
L162 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L51 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_items:r_line_ex(section,i,"","")

aol_sprint_cancel.script

L16 🔴 global_write
Global write: aol_anim_transitions_anm_transitions
Impact: low
Show code
aol_anim_transitions_anm_transitions = aol_anim_transitions.anm_transitions

343- G.A.M.M.A. Traduccion Espanola - vdltman

1 file (🟢3 🟡4 🔴2 🔵3)

ui_options.script

L1129 🟢 uncached_globals_summary
Cache 1 globals in curr_crosshair_clr
Impact: medium
Show code
L1134: tonumber L1136: tonumber
L1382 🟢 uncached_globals_summary
Cache 1 globals in Reset_opt
Impact: medium
Show code
L1388: unpack L1437: unpack
L2417 🟢 uncached_globals_summary
Cache 1 globals in On_Accept
Impact: medium
Show code
L2434: unpack L2436: unpack
L59 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L1038 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("- Changed player name from (%s) to (%s)", curr_name, new_name)
L1225 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!Found nil option value [%s]", id)
L68 🔴 global_write
Global write: options
Impact: low
Show code
options = {}
L83 🔴 global_write
Global write: options
Impact: low
Show code
options = {
L43 🟡 unused_local_variable
Local variable 'm_ceil' is assigned but never used
Impact: low
Show code
local m_floor, m_ceil, s_find, s_gsub = math.floor, math.ceil, string.find, string.gsub
L49 🟡 unused_local_variable
Local variable 'clr_g2' is assigned but never used
Impact: low
Show code
local clr_g2 = GetARGB(255, 200, 200, 200)
L50 🟡 unused_local_variable
Local variable 'clr_w' is assigned but never used
Impact: low
Show code
local clr_w = GetARGB(255, 255, 255, 255)
L2546 🟡 unused_local_variable
Local variable 'bind' is assigned but never used
Impact: low
Show code
local bind = dik_to_bind(dik)

345- HUD Icons Time - bvcx

1 file (🟢0 🟡10 🔴1 🔵0)

actor_status.script

L228 🔴 global_write
Global write: indicators
Impact: low
Show code
indicators = {}
L79 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local tot_weight = actor:get_total_weight()
L80 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local max_weight = actor:get_actor_max_walk_weight()
L82 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local outfit = actor:item_in_slot(7)
L83 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local backpack = actor:item_in_slot(13)
L84 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
max_weight = max_weight + (outfit and outfit:get_additional_max_weight() or 0)
L85 🟡 potential_nil_access
Potential nil access: 'backpack' from :item_in_slot() used without nil check
Impact: low
Show code
max_weight = max_weight + (backpack and backpack:get_additional_max_weight() or 0)
L86 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:iterate_belt( function(owner, obj)
L122 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(i)
L123 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if se_obj and safe_covers_list[se_obj:name()] and is_on_the_actor_level(se_obj) then
L492 🟡 unused_local_variable
Local variable 'num' is assigned but never used
Impact: low
Show code
local cover_curr, cover_near, num = scan_safe_zone_old()

347- MP7 Remodel and Reanimation - SeDzhiMol

4 files (🟢4 🟡3 🔴6 🔵2)

animation_common.script

L31 🟢 table_insert_append
table.insert(anim_mutators, v) -> anim_mutators[#anim_mutators+1] = v
Impact: high
Show code
table.insert(anim_mutators, {functor=functor, priority=priority})
L86 🟢 repeated_item_section()
item:section() called 3x in actor_on_hud_animation_play
Impact: low
Show code
Cache item:section() result

aol_anim_transitions.script

L6 🟢 table_insert_append
table.insert(valid_anims, v) -> valid_anims[#valid_anims+1] = v
Impact: high
Show code
table.insert(valid_anims, anm_suffix)
L37 🟢 table_insert_append
table.insert(pattern_transitions[hud_section], v) -> pattern_transitions[hud_section][#pattern_transitions[hud_section]+1] = v
Impact: high
Show code
table.insert(pattern_transitions[hud_section], {
L99 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L128 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L15 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L32 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L3 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L10 🔴 global_write
Global write: transitions
Impact: low
Show code
transitions = {
L26 🔴 global_write
Global write: pattern_transitions
Impact: low
Show code
pattern_transitions = {
L162 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L51 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_items:r_line_ex(section,i,"","")

aol_sprint_cancel.script

L16 🔴 global_write
Global write: aol_anim_transitions_anm_transitions
Impact: low
Show code
aol_anim_transitions_anm_transitions = aol_anim_transitions.anm_transitions

shotgun_unjam_fix.script

L1 🔴 global_write
Global write: common
Impact: low
Show code
common = animation_common

348- FN F2000 Remodel and Reanimation - SeDzhiMol

5 files (🟢8 🟡4 🔴10 🔵2)

animation_common.script

L31 🟢 table_insert_append
table.insert(anim_mutators, v) -> anim_mutators[#anim_mutators+1] = v
Impact: high
Show code
table.insert(anim_mutators, {functor=functor, priority=priority})
L86 🟢 repeated_item_section()
item:section() called 3x in actor_on_hud_animation_play
Impact: low
Show code
Cache item:section() result

aol_anim_transitions.script

L6 🟢 table_insert_append
table.insert(valid_anims, v) -> valid_anims[#valid_anims+1] = v
Impact: high
Show code
table.insert(valid_anims, anm_suffix)
L37 🟢 table_insert_append
table.insert(pattern_transitions[hud_section], v) -> pattern_transitions[hud_section][#pattern_transitions[hud_section]+1] = v
Impact: high
Show code
table.insert(pattern_transitions[hud_section], {
L99 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L128 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L15 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L32 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L3 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L10 🔴 global_write
Global write: transitions
Impact: low
Show code
transitions = {
L26 🔴 global_write
Global write: pattern_transitions
Impact: low
Show code
pattern_transitions = {
L162 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L51 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_items:r_line_ex(section,i,"","")

aol_sprint_cancel.script

L16 🔴 global_write
Global write: aol_anim_transitions_anm_transitions
Impact: low
Show code
aol_anim_transitions_anm_transitions = aol_anim_transitions.anm_transitions

shotgun_unjam_fix.script

L1 🔴 global_write
Global write: common
Impact: low
Show code
common = animation_common

vks_custom.script

L50 🟢 table_insert_append
table.insert(bore_anims, v) -> bore_anims[#bore_anims+1] = v
Impact: high
Show code
table.insert(bore_anims, {anm = "anm_bore"})
L51 🟢 table_insert_append
table.insert(bore_anims, v) -> bore_anims[#bore_anims+1] = v
Impact: high
Show code
table.insert(bore_anims, {anm = "anm_ammo_check", snd = "snd_ammo_check"})
L62 🟢 table_insert_append
table.insert(bore_anims, v) -> bore_anims[#bore_anims+1] = v
Impact: high
Show code
table.insert(bore_anims, {anm = "anm_bore_empty"})
L63 🟢 table_insert_append
table.insert(bore_anims, v) -> bore_anims[#bore_anims+1] = v
Impact: high
Show code
table.insert(bore_anims, {anm = "anm_ammo_check_empty", snd = "snd_ammo_check"})
L5 🔴 global_write
Global write: n
Impact: low
Show code
n = ini_sys:line_count(snd_path) or 0
L7 🔴 global_write
Global write: result
Impact: low
Show code
result, id, value = ini_sys:r_line_ex(snd_path,i,"","")
L7 🔴 global_write
Global write: id
Impact: low
Show code
result, id, value = ini_sys:r_line_ex(snd_path,i,"","")
L7 🔴 global_write
Global write: value
Impact: low
Show code
result, id, value = ini_sys:r_line_ex(snd_path,i,"","")
L76 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
if key == DIK_keys.MOUSE_2 and arti_jamming and weapon and weapon:get_state() == 4 then

349- Hideout Furniture Expansion - Maid & HarukaSai

6 files (🟢5 🟡3 🔴11 🔵0)

bind_table_fan.script

L9 🟡 unused_local_variable
Local variable 'section' is assigned but never used
Impact: low
Show code
local section = alife_object(obj_id):section_name()

haru_specialized_storage_boxes.script

L8 🔴 global_write
Global write: canned_food
Impact: low
Show code
canned_food = {
L17 🔴 global_write
Global write: storage_types
Impact: low
Show code
storage_types = {
L124 🔴 global_write
Global write: binder_update
Impact: low
Show code
binder_update = bind_physic_object.generic_physics_binder.update

meat_spoiling.script

L67 🟢 repeated_obj_id()
obj:id() called 2x in actor_on_item_use
Impact: low
Show code
Cache obj:id() result
L20 🔴 global_write
Global write: meats
Impact: low
Show code
meats = utils_data.collect_section(ini_meat.ini, "meats", true)

rax_icon_layers.script

L28 🟢 table_insert_append
table.insert(icon_layers[name], v) -> icon_layers[name][#icon_layers[name]+1] = v
Impact: high
Show code
table.insert(icon_layers[name], functor)

rax_persistent_highlight.script

L24 🟢 table_insert_append
table.insert(persistent_highlights[name], v) -> persistent_highlights[name][#persistent_highlights[name]+1] = v
Impact: high
Show code
table.insert(persistent_highlights[name], functor)
L57 🟢 uncached_globals_summary
Cache 1 globals in change_alpha
Impact: medium
Show code
L61: bit.band L62: bit.band
L44 🔴 global_write
Global write: persistant_highlight
Impact: low
Show code
persistant_highlight = self:GetPersistantHighlight()
L47 🔴 global_write
Global write: color
Impact: low
Show code
color = main_clr and change_alpha(persistant_highlight, 255) or persistant_highlight -- if main_clr set the alpha to max for reasons.
L55 🔴 global_write
Global write: clr_cache
Impact: low
Show code
clr_cache = {}
L61 🔴 global_write
Global write: b
Impact: low
Show code
b = bit.band(clr, 255)
L62 🔴 global_write
Global write: g
Impact: low
Show code
g = bit.band(bit.rshift(clr, 8), 255)
L63 🔴 global_write
Global write: r
Impact: low
Show code
r = bit.band(bit.rshift(clr, 16), 255)

ui_stove_furniture.script

L193 🟢 table_insert_append
table.insert(items, v) -> items[#items+1] = v
Impact: high
Show code
table.insert(items, obj:id())
L12 🔴 global_write
Global write: curBoxID
Impact: low
Show code
curBoxID = pid
L209 🟡 unused_local_variable
Local variable 'cook_ui' is assigned but never used
Impact: low
Show code
local cook_ui = item_cooking.start(obj, "fieldcooker")
L250 🟡 unused_local_variable
Local variable 'bind' is assigned but never used
Impact: low
Show code
local bind = dik_to_bind(dik)

350- Ledge Grabbing - Demonized

3 files (🟢3 🟡11 🔴11 🔵1)

demonized_ledge_grabbing.script

L447 🟢 repeated_device
device called 5x in checkLedgeGrabbing
Impact: low
Show code
local dev = device()
L1055 🟢 repeated_device
device called 3x in tryToClimb
Impact: low
Show code
local dev = device()
L1524 🟢 repeated_shit_draftsman_id()
shit.draftsman:id() called 3x in actor_on_before_hit
Impact: low
Show code
Cache shit.draftsman:id() result
L138 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('bisect, lo must be non-negative')
L47 🔴 global_write
Global write: hardcoreModeProperties
Impact: low
Show code
hardcoreModeProperties = {
L52 🔴 global_write
Global write: helmets
Impact: low
Show code
helmets = {}
L62 🔴 global_write
Global write: n
Impact: low
Show code
n = floor(max(n or 1, 1))
L67 🔴 global_write
Global write: n
Impact: low
Show code
n = n - 1
L194 🔴 global_write
Global write: settings
Impact: low
Show code
settings = load_defaults()
L197 🔴 global_write
Global write: settings
Impact: low
Show code
settings = load_defaults()
L884 🔴 global_write
Global write: outfitSoundFolder
Impact: low
Show code
outfitSoundFolder = {
L891 🔴 global_write
Global write: gruntSoundFolder
Impact: low
Show code
gruntSoundFolder = {
L895 🔴 global_write
Global write: soundFolderCache
Impact: low
Show code
soundFolderCache = {}
L818 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
maxWeight = maxWeight + (outfit and outfit:get_additional_max_weight() or 0)
L819 🟡 potential_nil_access
Potential nil access: 'backpack' from :item_in_slot() used without nil check
Impact: low
Show code
maxWeight = maxWeight + (backpack and backpack:get_additional_max_weight() or 0)
L960 🟡 potential_nil_access
Potential nil access: 'helmet' from :item_in_slot() used without nil check
Impact: low
Show code
if (helmet and helmets[helmet:section()]) or (outfit and helmets[outfit:section()]) then
L960 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
if (helmet and helmets[helmet:section()]) or (outfit and helmets[outfit:section()]) then
L585 🟡 unused_local_variable
Local variable 'shoot_factor' is assigned but never used
Impact: low
Show code
local shoot_factor = result.material_shoot_factor
L1011 🟡 unused_local_variable
Local variable 'animationStartTime' is assigned but never used
Impact: low
Show code
local animationStartTime = 0
L1093 🟡 unused_local_variable
Local variable 'targetStamina' is assigned but never used
Impact: low
Show code
local targetStamina = initStamina - staminaDrain
L1098 🟡 unused_local_variable
Local variable 'targetSatiety' is assigned but never used
Impact: low
Show code
local targetSatiety = initSatiety - satietyDrain
L1259 🟡 unused_local_variable
Local variable 'animDelta' is assigned but never used
Impact: low
Show code
local animDelta, animLo, animHi = delta, lo, hi
L1259 🟡 unused_local_variable
Local variable 'animLo' is assigned but never used
Impact: low
Show code
local animDelta, animLo, animHi = delta, lo, hi
L1259 🟡 unused_local_variable
Local variable 'animHi' is assigned but never used
Impact: low
Show code
local animDelta, animLo, animHi = delta, lo, hi

demonized_ledge_grabbing_animation_data.script

L5 🔴 global_write
Global write: data
Impact: low
Show code
data = {

demonized_ledge_grabbing_mcm.script

L5 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "demonized_ledge_grabbing", sh=true ,gr={

351- M249 Reanimation - NickolasNikova

4 files (🟢4 🟡3 🔴6 🔵2)

animation_common.script

L31 🟢 table_insert_append
table.insert(anim_mutators, v) -> anim_mutators[#anim_mutators+1] = v
Impact: high
Show code
table.insert(anim_mutators, {functor=functor, priority=priority})
L86 🟢 repeated_item_section()
item:section() called 3x in actor_on_hud_animation_play
Impact: low
Show code
Cache item:section() result

aol_anim_transitions.script

L6 🟢 table_insert_append
table.insert(valid_anims, v) -> valid_anims[#valid_anims+1] = v
Impact: high
Show code
table.insert(valid_anims, anm_suffix)
L37 🟢 table_insert_append
table.insert(pattern_transitions[hud_section], v) -> pattern_transitions[hud_section][#pattern_transitions[hud_section]+1] = v
Impact: high
Show code
table.insert(pattern_transitions[hud_section], {
L99 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L128 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L15 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L32 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L3 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L10 🔴 global_write
Global write: transitions
Impact: low
Show code
transitions = {
L26 🔴 global_write
Global write: pattern_transitions
Impact: low
Show code
pattern_transitions = {
L162 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L51 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_items:r_line_ex(section,i,"","")

aol_sprint_cancel.script

L16 🔴 global_write
Global write: aol_anim_transitions_anm_transitions
Impact: low
Show code
aol_anim_transitions_anm_transitions = aol_anim_transitions.anm_transitions

shotgun_unjam_fix.script

L1 🔴 global_write
Global write: common
Impact: low
Show code
common = animation_common

353- RPD Reanimation - NickolasNikova

4 files (🟢4 🟡3 🔴6 🔵2)

animation_common.script

L31 🟢 table_insert_append
table.insert(anim_mutators, v) -> anim_mutators[#anim_mutators+1] = v
Impact: high
Show code
table.insert(anim_mutators, {functor=functor, priority=priority})
L86 🟢 repeated_item_section()
item:section() called 3x in actor_on_hud_animation_play
Impact: low
Show code
Cache item:section() result

aol_anim_transitions.script

L6 🟢 table_insert_append
table.insert(valid_anims, v) -> valid_anims[#valid_anims+1] = v
Impact: high
Show code
table.insert(valid_anims, anm_suffix)
L37 🟢 table_insert_append
table.insert(pattern_transitions[hud_section], v) -> pattern_transitions[hud_section][#pattern_transitions[hud_section]+1] = v
Impact: high
Show code
table.insert(pattern_transitions[hud_section], {
L99 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L128 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L15 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L32 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L3 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L10 🔴 global_write
Global write: transitions
Impact: low
Show code
transitions = {
L26 🔴 global_write
Global write: pattern_transitions
Impact: low
Show code
pattern_transitions = {
L162 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L51 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_items:r_line_ex(section,i,"","")

aol_sprint_cancel.script

L16 🔴 global_write
Global write: aol_anim_transitions_anm_transitions
Impact: low
Show code
aol_anim_transitions_anm_transitions = aol_anim_transitions.anm_transitions

shotgun_unjam_fix.script

L1 🔴 global_write
Global write: common
Impact: low
Show code
common = animation_common

354- AK12 Reanimation - SeDzhiMol

4 files (🟢4 🟡3 🔴6 🔵2)

animation_common.script

L31 🟢 table_insert_append
table.insert(anim_mutators, v) -> anim_mutators[#anim_mutators+1] = v
Impact: high
Show code
table.insert(anim_mutators, {functor=functor, priority=priority})
L86 🟢 repeated_item_section()
item:section() called 3x in actor_on_hud_animation_play
Impact: low
Show code
Cache item:section() result

aol_anim_transitions.script

L6 🟢 table_insert_append
table.insert(valid_anims, v) -> valid_anims[#valid_anims+1] = v
Impact: high
Show code
table.insert(valid_anims, anm_suffix)
L37 🟢 table_insert_append
table.insert(pattern_transitions[hud_section], v) -> pattern_transitions[hud_section][#pattern_transitions[hud_section]+1] = v
Impact: high
Show code
table.insert(pattern_transitions[hud_section], {
L99 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L128 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L15 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L32 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L3 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L10 🔴 global_write
Global write: transitions
Impact: low
Show code
transitions = {
L26 🔴 global_write
Global write: pattern_transitions
Impact: low
Show code
pattern_transitions = {
L162 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L51 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_items:r_line_ex(section,i,"","")

aol_sprint_cancel.script

L16 🔴 global_write
Global write: aol_anim_transitions_anm_transitions
Impact: low
Show code
aol_anim_transitions_anm_transitions = aol_anim_transitions.anm_transitions

shotgun_unjam_fix.script

L1 🔴 global_write
Global write: common
Impact: low
Show code
common = animation_common

359- Pretty Pistols Reanimated - FIREBREATH

1 file (🟢0 🟡4 🔴0 🔵0)

jam_animations.script

L25 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
local hudSection = SYS_GetParam(0, item:section(), "hud", item:section())
L25 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
local hudSection = SYS_GetParam(0, item:section(), "hud", item:section())
L30 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
local ammo = item:get_ammo_in_magazine()
L42 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
item:play_hud_motion(animName, true, 4, 1, 0)

361- BAS SR-2M Reanimated - Synd1cate

3 files (🟢3 🟡3 🔴5 🔵2)

animation_common.script

L31 🟢 table_insert_append
table.insert(anim_mutators, v) -> anim_mutators[#anim_mutators+1] = v
Impact: high
Show code
table.insert(anim_mutators, {functor=functor, priority=priority})

aol_anim_transitions.script

L6 🟢 table_insert_append
table.insert(valid_anims, v) -> valid_anims[#valid_anims+1] = v
Impact: high
Show code
table.insert(valid_anims, anm_suffix)
L37 🟢 table_insert_append
table.insert(pattern_transitions[hud_section], v) -> pattern_transitions[hud_section][#pattern_transitions[hud_section]+1] = v
Impact: high
Show code
table.insert(pattern_transitions[hud_section], {
L99 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L128 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L15 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L32 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L3 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L10 🔴 global_write
Global write: transitions
Impact: low
Show code
transitions = {
L26 🔴 global_write
Global write: pattern_transitions
Impact: low
Show code
pattern_transitions = {
L162 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L51 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_items:r_line_ex(section,i,"","")

aol_sprint_cancel.script

L16 🔴 global_write
Global write: aol_anim_transitions_anm_transitions
Impact: low
Show code
aol_anim_transitions_anm_transitions = aol_anim_transitions.anm_transitions

363- Winchester 1892 - billwa

6 files (🟢8 🟡4 🔴10 🔵3)

ammo_check_mcm.script

L1 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("no ammo check")

animation_common.script

L31 🟢 table_insert_append
table.insert(anim_mutators, v) -> anim_mutators[#anim_mutators+1] = v
Impact: high
Show code
table.insert(anim_mutators, {functor=functor, priority=priority})
L86 🟢 repeated_item_section()
item:section() called 3x in actor_on_hud_animation_play
Impact: low
Show code
Cache item:section() result

aol_anim_transitions.script

L6 🟢 table_insert_append
table.insert(valid_anims, v) -> valid_anims[#valid_anims+1] = v
Impact: high
Show code
table.insert(valid_anims, anm_suffix)
L37 🟢 table_insert_append
table.insert(pattern_transitions[hud_section], v) -> pattern_transitions[hud_section][#pattern_transitions[hud_section]+1] = v
Impact: high
Show code
table.insert(pattern_transitions[hud_section], {
L99 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L128 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L15 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L32 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L3 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L10 🔴 global_write
Global write: transitions
Impact: low
Show code
transitions = {
L26 🔴 global_write
Global write: pattern_transitions
Impact: low
Show code
pattern_transitions = {
L162 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L51 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_items:r_line_ex(section,i,"","")

aol_sprint_cancel.script

L16 🔴 global_write
Global write: aol_anim_transitions_anm_transitions
Impact: low
Show code
aol_anim_transitions_anm_transitions = aol_anim_transitions.anm_transitions

shotgun_unjam_fix.script

L1 🔴 global_write
Global write: common
Impact: low
Show code
common = animation_common

vks_custom.script

L50 🟢 table_insert_append
table.insert(bore_anims, v) -> bore_anims[#bore_anims+1] = v
Impact: high
Show code
table.insert(bore_anims, {anm = "anm_bore"})
L51 🟢 table_insert_append
table.insert(bore_anims, v) -> bore_anims[#bore_anims+1] = v
Impact: high
Show code
table.insert(bore_anims, {anm = "anm_ammo_check", snd = "snd_ammo_check"})
L62 🟢 table_insert_append
table.insert(bore_anims, v) -> bore_anims[#bore_anims+1] = v
Impact: high
Show code
table.insert(bore_anims, {anm = "anm_bore_empty"})
L63 🟢 table_insert_append
table.insert(bore_anims, v) -> bore_anims[#bore_anims+1] = v
Impact: high
Show code
table.insert(bore_anims, {anm = "anm_ammo_check_empty", snd = "snd_ammo_check"})
L5 🔴 global_write
Global write: n
Impact: low
Show code
n = ini_sys:line_count(snd_path) or 0
L7 🔴 global_write
Global write: result
Impact: low
Show code
result, id, value = ini_sys:r_line_ex(snd_path,i,"","")
L7 🔴 global_write
Global write: id
Impact: low
Show code
result, id, value = ini_sys:r_line_ex(snd_path,i,"","")
L7 🔴 global_write
Global write: value
Impact: low
Show code
result, id, value = ini_sys:r_line_ex(snd_path,i,"","")
L76 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
if key == DIK_keys.MOUSE_2 and arti_jamming and weapon and weapon:get_state() == 4 then

366- AS VAL Reanimation - SeDzhiMol

4 files (🟢4 🟡3 🔴6 🔵4)

animation_common.script

L31 🟢 table_insert_append
table.insert(anim_mutators, v) -> anim_mutators[#anim_mutators+1] = v
Impact: high
Show code
table.insert(anim_mutators, {functor=functor, priority=priority})
L83 🟢 repeated_item_section()
item:section() called 3x in actor_on_hud_animation_play
Impact: low
Show code
Cache item:section() result
L63 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("stop_all_sound_object(sec): %s", sec)
L67 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("sec: %s| Stopping: %s", sec, path)

aol_anim_transitions.script

L6 🟢 table_insert_append
table.insert(valid_anims, v) -> valid_anims[#valid_anims+1] = v
Impact: high
Show code
table.insert(valid_anims, anm_suffix)
L37 🟢 table_insert_append
table.insert(pattern_transitions[hud_section], v) -> pattern_transitions[hud_section][#pattern_transitions[hud_section]+1] = v
Impact: high
Show code
table.insert(pattern_transitions[hud_section], {
L99 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L128 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L15 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L32 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L3 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L10 🔴 global_write
Global write: transitions
Impact: low
Show code
transitions = {
L26 🔴 global_write
Global write: pattern_transitions
Impact: low
Show code
pattern_transitions = {
L162 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L51 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_items:r_line_ex(section,i,"","")

aol_sprint_cancel.script

L16 🔴 global_write
Global write: aol_anim_transitions_anm_transitions
Impact: low
Show code
aol_anim_transitions_anm_transitions = aol_anim_transitions.anm_transitions

shotgun_unjam_fix.script

L1 🔴 global_write
Global write: common
Impact: low
Show code
common = animation_common

37- Dynamic Tonemap Extended - TheMrDemonized

3 files (🟢3 🟡1 🔴1 🔵9)

demonized_time_events.script

L24 🟢 uncached_globals_summary
Cache 1 globals in print_table
Impact: medium
Show code
L33: type L35: type
L36 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = function",k)
L39 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s",k,utils_data.vector_to_string(v))
L41 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = userdata", k)
L46 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = true",k)
L48 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = true")
L52 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = false", k)
L54 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = false")
L59 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s", k,v)
L61 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = nil", k,v)
L205 🟡 unused_local_variable
Local variable 'tg_past' is assigned but never used
Impact: low
Show code
local tg_past = 0

dynamic_tonemap.script

L160 🟢 repeated_get_console
get_console called 6x in set_tonemap_values
Impact: low
Show code
local console = get_console()
L286 🟢 repeated_get_console
get_console called 6x in reset_tonemapping
Impact: low
Show code
local console = get_console()

dynamic_tonemap_mcm.script

L2 🔴 global_write
Global write: op
Impact: low
Show code
op = {id = "dynamic_tonemap_extended", sh = true, gr = {

374- Stealth Kill Detection Fix - Catspaw

1 file (🟢0 🟡0 🔴9 🔵6)

stealth_kill_detection.script

L41 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! ERROR: AddScriptCallback is not supported, you need to upgrade your version of Anomaly!")
L58 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(logprefix..logtext, ...)
L83 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Stealth kill detection: Triggering stealth kill callbacks (melee = %s) for victim %s", was_melee, victim_id)
L100 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Stealth kill detection: Checking actor hit on %s (%s)", npc:name(), victim_id)
L116 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("npc_on_death_callback fired for kill: victim %s (%s) | killer %s (%s)",victim and victim:name(),victim and victim:id(),killer and killer:name(),killer and killer:id())
L120 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("npc_on_silent_kill_callback fired for stealth kill: victim %s (%s) | killer %s (%s) | weapon %s | melee: %s",victim and victim:name(),victim and victim:id(),killer and killer:name(),killer and killer:id(),weapon and weapon:name(), was_melee)
L8 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "1.0"
L9 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20240603
L48 🔴 global_write
Global write: debuglogs
Impact: low
Show code
debuglogs = false
L49 🔴 global_write
Global write: test_callbacks
Impact: low
Show code
test_callbacks = false
L50 🔴 global_write
Global write: send_on_death_cb
Impact: low
Show code
send_on_death_cb = true
L51 🔴 global_write
Global write: send_on_skill_cb
Impact: low
Show code
send_on_skill_cb = true
L52 🔴 global_write
Global write: add_statistic
Impact: low
Show code
add_statistic = true
L53 🔴 global_write
Global write: last_s_killed
Impact: low
Show code
last_s_killed = nil
L77 🔴 global_write
Global write: last_s_killed
Impact: low
Show code
last_s_killed = killer_id

377- GAMMA Portugues Brasileiro Traducao - PedroAmaral89

1 file (🟢3 🟡4 🔴2 🔵3)

ui_options.script

L1054 🟢 uncached_globals_summary
Cache 1 globals in curr_crosshair_clr
Impact: medium
Show code
L1059: tonumber L1061: tonumber
L1307 🟢 uncached_globals_summary
Cache 1 globals in Reset_opt
Impact: medium
Show code
L1313: unpack L1362: unpack
L2342 🟢 uncached_globals_summary
Cache 1 globals in On_Accept
Impact: medium
Show code
L2359: unpack L2361: unpack
L59 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L963 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("- Changed player name from (%s) to (%s)", curr_name, new_name)
L1150 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!Found nil option value [%s]", id)
L68 🔴 global_write
Global write: options
Impact: low
Show code
options = {}
L83 🔴 global_write
Global write: options
Impact: low
Show code
options = {
L43 🟡 unused_local_variable
Local variable 'm_ceil' is assigned but never used
Impact: low
Show code
local m_floor, m_ceil, s_find, s_gsub = math.floor, math.ceil, string.find, string.gsub
L49 🟡 unused_local_variable
Local variable 'clr_g2' is assigned but never used
Impact: low
Show code
local clr_g2 = GetARGB(255, 200, 200, 200)
L50 🟡 unused_local_variable
Local variable 'clr_w' is assigned but never used
Impact: low
Show code
local clr_w = GetARGB(255, 255, 255, 255)
L2471 🟡 unused_local_variable
Local variable 'bind' is assigned but never used
Impact: low
Show code
local bind = dik_to_bind(dik)

378- FDDA Enhanced Animations - lizzardman

1 file (🟢0 🟡0 🔴1 🔵1)

z_enhanced_animations_hud_fov_fix.script

L9 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
if ea_debug then printf("speed is = "..speed) end
L4 🔴 global_write
Global write: orig_enhanced_animations_start_anim
Impact: low
Show code
orig_enhanced_animations_start_anim = enhanced_animations.start_anim

380- Anomaly Subtitles - AntGlobes

10 files (🟢15 🟡9 🔴55 🔵23)

ag_colours.script

L79 🟢 uncached_globals_summary
Cache 2 globals in get_colourblind_rgb
Impact: medium
Show code
L82: unpack L86: unpack L85: type L85: type
L104 🔴 global_write
Global write: clr_table
Impact: low
Show code
clr_table = {
L130 🔴 global_write
Global write: clr_table_opacity
Impact: low
Show code
clr_table_opacity = {
L156 🔴 global_write
Global write: faction_to_colour_opacity
Impact: low
Show code
faction_to_colour_opacity = {
L174 🔴 global_write
Global write: faction_to_colour
Impact: low
Show code
faction_to_colour = {

ag_game_objects.script

L150 🟢 table_insert_append
table.insert(stock["sell"], v) -> stock["sell"][#stock["sell"]+1] = v
Impact: high
Show code
table.insert(stock["sell"], lines)
L373 🟢 math_pow_simple
math.pow(dx, 2) -> dx*dx
Impact: high
Show code
local length = math.sqrt(math.pow(dx, 2)) + math.sqrt(math.pow(dy, 2)) + math.sqrt(math.pow(dz, 2))
L373 🟢 math_pow_simple
math.pow(dy, 2) -> dy*dy
Impact: high
Show code
local length = math.sqrt(math.pow(dx, 2)) + math.sqrt(math.pow(dy, 2)) + math.sqrt(math.pow(dz, 2))
L373 🟢 math_pow_simple
math.pow(dz, 2) -> dz*dz
Impact: high
Show code
local length = math.sqrt(math.pow(dx, 2)) + math.sqrt(math.pow(dy, 2)) + math.sqrt(math.pow(dz, 2))
L369 🟢 uncached_globals_summary
Cache 2 globals in get_direction
Impact: medium
Show code
L373: math.sqrt L373: math.sqrt L373: math.pow L373: math.pow
L382 🟢 uncached_globals_summary
Cache 1 globals in get_unknown_object
Impact: medium
Show code
L384: type L386: type
L630 🟢 repeated_npc_id()
npc:id() called 3x in remember_stalker
Impact: low
Show code
Cache npc:id() result
L591 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("object found")
L596 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("object within distance")
L601 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("valid screen pos")
L603 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("checked if behind wall")
L605 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("invalid screen pos")
L608 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("out of distance")
L611 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("obj not found")
L613 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Is %s visible: %s?", id, visible)
L644 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s: %s", obj:section(), utils_data.print_table(bones, nil, true))
L656 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Found %s %s's on current level", size_table(items), sect)
L669 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s icon file: %s", sect, file)
L679 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s %s %s", sect, visual, name)
L448 🟡 unused_local_variable
Local variable 'class' is assigned but never used
Impact: low
Show code
local class = ini_sys:r_string_ex(item_name, "class")
L536 🟡 unused_local_variable
Local variable 't' is assigned but never used
Impact: low
Show code
local t = type(key)

ag_logging.script

L28 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(header, strformat(str, ...))
L64 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log(fmt)

ag_strings.script

L108 🟢 table_insert_append
table.insert(targ_str, v) -> targ_str[#targ_str+1] = v
Impact: high
Show code
table.insert(targ_str, i)
L99 🟢 uncached_globals_summary
Cache 1 globals in exclude_str
Impact: medium
Show code
L118: string.sub L121: string.sub
L39 🟡 string_concat_in_loop
String concat in loop: sentence = sentence .. x
Impact: critical
Show code
sentence = sentence.." ".. capitalise(word)
L83 🔴 global_write
Global write: tokens
Impact: low
Show code
tokens = list_pattern_occurances(subtitle, "[,!?.]", CHAR_LIMT)

ag_tables.script

L116 🟢 table_insert_append
table.insert(tbl_1, v) -> tbl_1[#tbl_1+1] = v
Impact: high
Show code
table.insert(tbl_1, v)
L146 🟢 uncached_globals_summary
Cache 1 globals in compare_tables
Impact: medium
Show code
L149: pairs L152: pairs
L258 🟢 uncached_globals_summary
Cache 2 globals in print_table
Impact: medium
Show code
L290: type L290: type L291: tostring L293: tostring
L166 🟡 string_concat_in_loop
String concat in loop: result = result .. x
Impact: critical
Show code
result = result .. key .. ", "
L249 🟡 string_concat_in_loop
String concat in loop: tbl_str = tbl_str .. x
Impact: critical
Show code
tbl_str = tbl_str .. strformat("%s", k)
L263 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str = str .. "\t"
L280 🟡 string_concat_in_loop
String concat in loop: output_str = output_str .. x
Impact: critical
Show code
output_str = output_str .. ",\n"
L336 🟡 string_concat_in_loop
String concat in loop: output_str = output_str .. x
Impact: critical
Show code
output_str = output_str .. "\n" .. tab(depth-1) .. "}"
L241 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s=%s", k, v)
L359 🔴 global_write
Global write: bone_groups
Impact: low
Show code
bone_groups = {

subtitles.script

L2 🔴 global_write
Global write: split
Impact: low
Show code
split = ag_strings.split
L3 🔴 global_write
Global write: table_slice
Impact: low
Show code
table_slice = ag_tables.table_slice
L4 🔴 global_write
Global write: table_extend
Impact: low
Show code
table_extend = ag_tables.table_extend
L5 🔴 global_write
Global write: contains
Impact: low
Show code
contains = ag_tables.contains
L6 🔴 global_write
Global write: get_unknown_object
Impact: low
Show code
get_unknown_object = ag_game_objects.get_unknown_object
L7 🔴 global_write
Global write: dist_to_pos
Impact: low
Show code
dist_to_pos = ag_game_objects.dist_to_pos
L8 🔴 global_write
Global write: gts
Impact: low
Show code
gts = ag_strings.get_translation
L9 🔴 global_write
Global write: print_table
Impact: low
Show code
print_table = ag_tables.print_table
L12 🔴 global_write
Global write: get_end_digits
Impact: low
Show code
get_end_digits = subtitles_utils.get_end_digits
L13 🔴 global_write
Global write: in_snd_dir
Impact: low
Show code
in_snd_dir = subtitles_utils.in_snd_dir
L14 🔴 global_write
Global write: path_to_xml
Impact: low
Show code
path_to_xml = subtitles_utils.path_to_xml
L15 🔴 global_write
Global write: get_npc_name
Impact: low
Show code
get_npc_name = subtitles_utils.get_npc_name
L16 🔴 global_write
Global write: set_debug_level
Impact: low
Show code
set_debug_level = subtitles_utils.set_debug_level
L17 🔴 global_write
Global write: filter_debug_msg
Impact: low
Show code
filter_debug_msg = subtitles_utils.filter_debug_msg
L20 🔴 global_write
Global write: log_file_cache
Impact: low
Show code
log_file_cache = {
L29 🔴 global_write
Global write: priority_tbl
Impact: low
Show code
priority_tbl = {
L52 🔴 global_write
Global write: exclude_subs
Impact: low
Show code
exclude_subs = {
L74 🔴 global_write
Global write: file_cache
Impact: low
Show code
file_cache = {}
L75 🔴 global_write
Global write: clr_cache
Impact: low
Show code
clr_cache = {}
L76 🔴 global_write
Global write: recent_npc_deaths
Impact: low
Show code
recent_npc_deaths = {}
L80 🔴 global_write
Global write: ini_script_sound
Impact: low
Show code
ini_script_sound = ini_file_ex("misc\\sound\\script_sound.ltx")
L154 🟡 unused_local_variable
Local variable 'fin' is assigned but never used
Impact: low
Show code
local start, fin = file:find("fight")

subtitles_mcm.script

L11 🔴 global_write
Global write: print_table
Impact: low
Show code
print_table = ag_tables.print_table
L13 🔴 global_write
Global write: defaults
Impact: low
Show code
defaults = {
L64 🔴 global_write
Global write: opts
Impact: low
Show code
opts = {

subtitles_ui.script

L409 🟢 uncached_globals_summary
Cache 1 globals in change_alpha
Impact: medium
Show code
L413: bit.band L414: bit.band
L422 🟢 uncached_globals_summary
Cache 2 globals in float2argb
Impact: medium
Show code
L424: bit.band L425: bit.band L424: bit.rshift L425: bit.rshift
L2 🔴 global_write
Global write: contains
Impact: low
Show code
contains = ag_tables.contains
L3 🔴 global_write
Global write: print_table
Impact: low
Show code
print_table = ag_tables.print_table
L4 🔴 global_write
Global write: get_unknown_object
Impact: low
Show code
get_unknown_object = ag_game_objects.get_unknown_object
L5 🔴 global_write
Global write: dist_to_pos
Impact: low
Show code
dist_to_pos = ag_game_objects.dist_to_pos
L6 🔴 global_write
Global write: geo_ray
Impact: low
Show code
geo_ray = demonized_geometry_ray.geometry_ray
L7 🔴 global_write
Global write: get_direction
Impact: low
Show code
get_direction = ag_game_objects.get_direction
L10 🔴 global_write
Global write: get_npc_faction
Impact: low
Show code
get_npc_faction = subtitles_utils.get_npc_faction
L11 🔴 global_write
Global write: set_debug_level
Impact: low
Show code
set_debug_level = subtitles_utils.set_debug_level
L12 🔴 global_write
Global write: filter_debug_msg
Impact: low
Show code
filter_debug_msg = subtitles_utils.filter_debug_msg
L13 🔴 global_write
Global write: str2ARGB
Impact: low
Show code
str2ARGB = subtitles_utils.str2ARGB
L30 🔴 global_write
Global write: clr_cache
Impact: low
Show code
clr_cache = {}
L35 🔴 global_write
Global write: include_materials
Impact: low
Show code
include_materials = {

subtitles_utils.script

L46 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Filename: %s", files:GetAt(i):NameFull())
L135 🔵 debug_statement
Debug call: print()
Impact: medium
Show code
print(file_tkn, community)
L177 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("--------Anomaly Subtitles--------")
L178 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Version: %s", as_version)
L179 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Author(s): %s", as_authors)
L180 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Last Updated: %s", as_last_update)
L181 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("---------------------------------")
L2 🔴 global_write
Global write: contains
Impact: low
Show code
contains = ag_tables.contains
L3 🔴 global_write
Global write: split
Impact: low
Show code
split = ag_strings.split
L7 🔴 global_write
Global write: as_version
Impact: low
Show code
as_version = "v0.12.2"
L8 🔴 global_write
Global write: as_authors
Impact: low
Show code
as_authors = "Antglobes, Vodoxleb, Lin, Tehanow"
L9 🔴 global_write
Global write: as_last_update
Impact: low
Show code
as_last_update = "23-07-25"
L12 🔴 global_write
Global write: setup_init
Impact: low
Show code
setup_init = false
L66 🔴 global_write
Global write: special_character_faction
Impact: low
Show code
special_character_faction = {
L92 🔴 global_write
Global write: communities
Impact: low
Show code
communities = {
L109 🔴 global_write
Global write: exclude_factions
Impact: low
Show code
exclude_factions = {
L187 🔴 global_write
Global write: setup_init
Impact: low
Show code
setup_init = true

ui_mcm_argb_input.script

L198 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Setting up colorblind control")
L25 🔴 global_write
Global write: script_name
Impact: low
Show code
script_name = "ui_mcm_argb_input"
L26 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "2.1.1"
L27 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20250428

381- Mugging Squads - Demonized

3 files (🟢9 🟡14 🔴22 🔵3)

demonized_mugging_squads.script

L832 🟢 table_insert_append
table.insert(activeMembers, v) -> activeMembers[#activeMembers+1] = v
Impact: high
Show code
table.insert(activeMembers, obj)
L1207 🟢 table_insert_append
table.insert(talkingMuggingSquadInfo.chosenItems, v) -> talkingMuggingSquadInfo.chosenItems[#talkingMuggingSquadInfo.chosenItems+1] = v
Impact: high
Show code
table.insert(talkingMuggingSquadInfo.chosenItems, table.remove(items))
L217 🟢 uncached_globals_summary
Cache 1 globals in trySpawn
Impact: medium
Show code
L234: math.random L268: math.random
L879 🟢 uncached_globals_summary
Cache 1 globals in findPos
Impact: medium
Show code
L895: math.random L897: math.random
L917 🟢 uncached_globals_summary
Cache 1 globals in execute
Impact: medium
Show code
L969: pairs L981: pairs
L1427 🟢 uncached_globals_summary
Cache 1 globals in convertToNewFaction
Impact: medium
Show code
L1534: tonumber L1535: tonumber
L678 🟢 repeated_alife
alife called 2x in actor_on_first_update
Impact: low
Show code
local sim = alife()
L730 🟢 repeated_commander_id()
commander:id() called 3x in squad_on_update
Impact: low
Show code
Cache commander:id() result
L1176 🟢 repeated_obj_section()
obj:section() called 3x in itr
Impact: low
Show code
Cache obj:section() result
L1396 🟡 string_concat_in_loop
String concat in loop: s = s .. x
Impact: critical
Show code
s = s .. "\\n • " .. ui_item.get_sec_name(item:section())
L25 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
_G.printf(s, ...)
L39 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
_G.printf(s, ...)
L1122 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("-demonized_mugging_squads axr_panic: no action id p[%s]", i)
L14 🔴 global_write
Global write: delaySpawn
Impact: low
Show code
delaySpawn = 30 -- real seconds
L15 🔴 global_write
Global write: delayState
Impact: low
Show code
delayState = 5 -- real seconds
L103 🔴 global_write
Global write: settings
Impact: low
Show code
settings = load_defaults()
L106 🔴 global_write
Global write: settings
Impact: low
Show code
settings = load_defaults()
L131 🔴 global_write
Global write: activeSquads
Impact: low
Show code
activeSquads = {} -- current active mugging squads
L137 🔴 global_write
Global write: squadStages
Impact: low
Show code
squadStages = {
L497 🔴 global_write
Global write: defaultUseCond
Impact: low
Show code
defaultUseCond = "{=is_wounded} false, {!is_squad_commander} false, {=actor_enemy} false, {=has_enemy} false, {=dist_to_actor_le(3)} true, false"
L640 🔴 global_write
Global write: activeSquads
Impact: low
Show code
activeSquads = demonized_mugging_squads.active_squads or {}
L772 🔴 global_write
Global write: actid
Impact: low
Show code
actid = 188125
L773 🔴 global_write
Global write: evaid
Impact: low
Show code
evaid = 188125
L1167 🔴 global_write
Global write: ignoreItemsToMug
Impact: low
Show code
ignoreItemsToMug = {
L1704 🔴 global_write
Global write: factionToMuggingOptions
Impact: low
Show code
factionToMuggingOptions = {}
L444 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local actor = sim:actor()
L445 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
if (simulation_objects.is_on_the_same_level(obj, actor) and pos:distance_to_sqr(actor.position) <= sim:switch_distance()^2) then
L1118 🟡 potential_nil_access
Potential nil access: 'manager' from :motivation_action_manager() used without nil check
Impact: low
Show code
action = manager:action(p[i])
L1179 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:transfer_item(obj, npc)
L1182 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:iterate_inventory(itr, actor)
L1183 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
dialogs.relocate_money(npc, actor:money(), "out")
L1196 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:iterate_inventory(itr, actor)
L1219 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:transfer_item(obj, npc)
L1228 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
dialogs.relocate_money(npc, actor:money(), "out")
L1231 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local money = actor:money()
L608 🟡 unused_local_variable
Local variable 'se_actor' is assigned but never used
Impact: low
Show code
local se_actor = alife():actor()
L930 🟡 unused_local_variable
Local variable 'bw' is assigned but never used
Impact: low
Show code
local bw = npc:active_item()
L1511 🟡 unused_local_variable
Local variable 'res' is assigned but never used
Impact: low
Show code
local res,id,val = ini_map:r_line(section,i,"","")

demonized_mugging_squads_mcm.script

L5 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "demonized_mugging_squads",sh=true ,gr={
L39 🔴 global_write
Global write: ui_mcm_UIMCM_Register_Cap
Impact: low
Show code
ui_mcm_UIMCM_Register_Cap = ui_mcm.UIMCM.Register_Cap
L42 🔴 global_write
Global write: id
Impact: low
Show code
id = id:gsub("/", "_")
L44 🔴 global_write
Global write: hint
Impact: low
Show code
hint = hint:gsub("demonized_replace_placeholder_", "")

demonized_mugging_squads_options.script

L45 🔴 global_write
Global write: safe_levels
Impact: low
Show code
safe_levels = {
L71 🔴 global_write
Global write: safe_smarts
Impact: low
Show code
safe_smarts = {
L94 🔴 global_write
Global write: factions_to_levels
Impact: low
Show code
factions_to_levels = {}
L97 🔴 global_write
Global write: faction_squads
Impact: low
Show code
faction_squads = {
L113 🔴 global_write
Global write: danger_ranks
Impact: low
Show code
danger_ranks = {
L125 🔴 global_write
Global write: danger_reputations
Impact: low
Show code
danger_reputations = {

383- Headgear Animations - lizzardman

1 file (🟢0 🟡1 🔴12 🔵0)

headgear_animations.script

L8 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = false
L46 🔴 global_write
Global write: enable_animations
Impact: low
Show code
Invoke("actor_on_first_update_te", 3, function() enable_animations = true end)
L113 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = false
L115 🔴 global_write
Global write: enable_animations
Impact: low
Show code
Invoke("on_toggle_equip_te0", 0.1, function() enable_animations = true end)
L118 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = false
L120 🔴 global_write
Global write: enable_animations
Impact: low
Show code
Invoke("on_toggle_equip_te1", 0.1, function() enable_animations = true end)
L129 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = false
L131 🔴 global_write
Global write: enable_animations
Impact: low
Show code
Invoke("on_toggle_unequip_te1", 0.1, function() enable_animations = true end)
L135 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = false
L137 🔴 global_write
Global write: enable_animations
Impact: low
Show code
Invoke("on_toggle_unequip_te3", 0.1, function() enable_animations = true end)
L194 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = false
L211 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = true
L45 🟡 potential_nil_access
Potential nil access: 'helm' from :item_in_slot() used without nil check (auto-fixable)
Impact: low
Show code
equipped_helmet = helm and helm:id() or no_helmet

384- Armsel Protecta Reanimation - NickolasNikova

4 files (🟢4 🟡3 🔴6 🔵2)

animation_common.script

L31 🟢 table_insert_append
table.insert(anim_mutators, v) -> anim_mutators[#anim_mutators+1] = v
Impact: high
Show code
table.insert(anim_mutators, {functor=functor, priority=priority})
L86 🟢 repeated_item_section()
item:section() called 3x in actor_on_hud_animation_play
Impact: low
Show code
Cache item:section() result

aol_anim_transitions.script

L6 🟢 table_insert_append
table.insert(valid_anims, v) -> valid_anims[#valid_anims+1] = v
Impact: high
Show code
table.insert(valid_anims, anm_suffix)
L37 🟢 table_insert_append
table.insert(pattern_transitions[hud_section], v) -> pattern_transitions[hud_section][#pattern_transitions[hud_section]+1] = v
Impact: high
Show code
table.insert(pattern_transitions[hud_section], {
L99 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L128 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L15 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L32 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L3 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L10 🔴 global_write
Global write: transitions
Impact: low
Show code
transitions = {
L26 🔴 global_write
Global write: pattern_transitions
Impact: low
Show code
pattern_transitions = {
L162 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L51 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_items:r_line_ex(section,i,"","")

aol_sprint_cancel.script

L16 🔴 global_write
Global write: aol_anim_transitions_anm_transitions
Impact: low
Show code
aol_anim_transitions_anm_transitions = aol_anim_transitions.anm_transitions

shotgun_unjam_fix.script

L1 🔴 global_write
Global write: common
Impact: low
Show code
common = animation_common

387- MK18 Mjlonir Reanimation - NickolasNikova

4 files (🟢4 🟡3 🔴6 🔵2)

animation_common.script

L31 🟢 table_insert_append
table.insert(anim_mutators, v) -> anim_mutators[#anim_mutators+1] = v
Impact: high
Show code
table.insert(anim_mutators, {functor=functor, priority=priority})
L86 🟢 repeated_item_section()
item:section() called 3x in actor_on_hud_animation_play
Impact: low
Show code
Cache item:section() result

aol_anim_transitions.script

L6 🟢 table_insert_append
table.insert(valid_anims, v) -> valid_anims[#valid_anims+1] = v
Impact: high
Show code
table.insert(valid_anims, anm_suffix)
L37 🟢 table_insert_append
table.insert(pattern_transitions[hud_section], v) -> pattern_transitions[hud_section][#pattern_transitions[hud_section]+1] = v
Impact: high
Show code
table.insert(pattern_transitions[hud_section], {
L99 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L128 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L15 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L32 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L3 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L10 🔴 global_write
Global write: transitions
Impact: low
Show code
transitions = {
L26 🔴 global_write
Global write: pattern_transitions
Impact: low
Show code
pattern_transitions = {
L162 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L51 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_items:r_line_ex(section,i,"","")

aol_sprint_cancel.script

L16 🔴 global_write
Global write: aol_anim_transitions_anm_transitions
Impact: low
Show code
aol_anim_transitions_anm_transitions = aol_anim_transitions.anm_transitions

shotgun_unjam_fix.script

L1 🔴 global_write
Global write: common
Impact: low
Show code
common = animation_common

390- Workshop Parts Inventory - strangerism

1 file (🟢1 🟡0 🔴5 🔵3)

zone_keeper.script

L148 🟢 table_insert_append
table.insert(zonekeeper_items, v) -> zonekeeper_items[#zonekeeper_items+1] = v
Impact: high
Show code
table.insert(zonekeeper_items, zonekeeper_item)
L16 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
if select('#', ...) ~= 0 then printf(string.format(msg,...))
L17 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
else printf(msg)
L118 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("build_desc_footer for object id %s", obj:id())
L7 🔴 global_write
Global write: settings
Impact: low
Show code
settings = {}
L111 🔴 global_write
Global write: original_build_desc_footer
Impact: low
Show code
original_build_desc_footer = ui_item.build_desc_footer
L159 🔴 global_write
Global write: inventory_close
Impact: low
Show code
inventory_close = ui_inventory.UIInventory.Close
L184 🔴 global_write
Global write: base_return_items
Impact: low
Show code
base_return_items = nil
L187 🔴 global_write
Global write: base_return_items
Impact: low
Show code
base_return_items = zzz_workshop_return_items.return_items

391- Hideout Furniture Expansion Ammo Box Patch - pesta

1 file (🟢0 🟡0 🔴2 🔵0)

zzz_haru_storage_mags_monkey.script

L13 🔴 global_write
Global write: custom_ammo_classes
Impact: low
Show code
custom_ammo_classes = {
L24 🔴 global_write
Global write: mine_sections
Impact: low
Show code
mine_sections = {

392- NPCs Don't Attack Boxes - OnTuMuCT

1 file (🟢0 🟡1 🔴3 🔵0)

axr_npc_vs_box.script

L6 🔴 global_write
Global write: actid
Impact: low
Show code
actid = 188120
L7 🔴 global_write
Global write: evaid
Impact: low
Show code
evaid = 188120
L17 🔴 global_write
Global write: selected
Impact: low
Show code
selected = {}
L200 🟡 potential_nil_access
Potential nil access: 'manager' from :motivation_action_manager() used without nil check
Impact: low
Show code
action = manager:action(p[i])

393- Disassembly Item Tweaks - Asshall

2 files (🟢3 🟡0 🔴2 🔵0)

dit_mcm.script

L16 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "dit",sh=true ,gr={

zzz_dit.script

L34 🟢 uncached_globals_summary
Cache 1 globals in get_suitable_dtool
Impact: medium
Show code
L37: pairs L40: pairs
L25 🟢 repeated_obj_d_section()
obj_d:section() called 4x in is_breaking
Impact: low
Show code
Cache obj_d:section() result
L72 🟢 repeated_obj_d_section()
obj_d:section() called 3x in <global>
Impact: low
Show code
Cache obj_d:section() result
L68 🔴 global_write
Global write: obj_d
Impact: low
Show code
obj_d = obj_d or get_suitable_dtool(obj)

394- Return Menu Music - Mirrowel

1 file (🟢0 🟡0 🔴0 🔵4)

return_menu_music.script

L7 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![RMM] EGUI detected on load. Shutting down")
L18 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![RMM] %s track(s) indexed: ", amount)
L22 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s", strings[i])
L26 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![RMM] Track picked: %s", toplay)

396- Glowsticks Reanimated - lizzardman

1 file (🟢9 🟡39 🔴5 🔵2)

zz_glowstick_mcm.script

L54 🟢 uncached_globals_summary
Cache 1 globals in actor_on_update
Impact: medium
Show code
L61: string.find L86: string.find
L131 🟢 uncached_globals_summary
Cache 1 globals in spawn_glowstick
Impact: medium
Show code
L156: math.random L157: math.random
L936 🟢 uncached_globals_summary
Cache 1 globals in spawn_glowostick
Impact: medium
Show code
L938: math.random L945: math.random
L988 🟢 uncached_globals_summary
Cache 1 globals in ui_mm_faction_select.UINewGame.LoadLoadout
Impact: medium
Show code
L995: pairs L1012: pairs
L61 🟢 repeated_det_section()
det:section() called 4x in actor_on_update
Impact: low
Show code
Cache det:section() result
L99 🟢 repeated_det_id()
det:id() called 2x in actor_on_update
Impact: low
Show code
Cache det:id() result
L221 🟢 repeated_itm_id()
itm:id() called 2x in actor_on_item_drop
Impact: low
Show code
Cache itm:id() result
L409 🟢 repeated_obj_id()
obj:id() called 9x in iter
Impact: low
Show code
Cache obj:id() result
L517 🟢 repeated_self_object_id()
self.object:id() called 9x in update
Impact: low
Show code
Cache self.object:id() result
L144 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!Couldn't spawn Glowstick!")
L151 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!Couldn't get Glowstick data!")
L586 🔴 global_write
Global write: options
Impact: low
Show code
options =
L669 🔴 global_write
Global write: base_get_light_flicker
Impact: low
Show code
base_get_light_flicker = level_environment.get_light_flicker()
L951 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update
L958 🔴 global_write
Global write: SpawnCosmetics
Impact: low
Show code
SpawnCosmetics = death_manager.spawn_cosmetics
L965 🔴 global_write
Global write: TrySpawnTreasure
Impact: low
Show code
TrySpawnTreasure = treasure_manager.try_spawn_treasure
L56 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local det = actor:active_detector()
L61 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
if (string.find(det:section(), "glowstick")) then
L62 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
if (det:condition() > 0.01) then
L63 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
local new_c = clamp(det:condition() - active_gs_drain, 0.01, 0.9999)
L64 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
det:set_condition(new_c)
L71 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
if (det:get_state() ~= last_det_state) then
L72 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
last_det_state = det:get_state()
L73 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
active_gs_drain = ini_sys:r_float_ex(det:section(), "power_drain", 0.001)
L86 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
if (string.find(det:section(), "flashlight")) then
L87 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
if (det:get_state() == 1 and not axr_main.weapon_is_zoomed) then
L88 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
local prev_con = det:condition()
L89 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
det:set_condition(0.001)
L90 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
det:switch_state(0)
L91 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
local tm = det:play_hud_motion("anm_show", false, 1, 1, 0) / 1000
L95 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
obj:set_condition(con_d)
L99 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
CreateTimeEvent("glowstick","flashlight_fix",clamp(tm-0.5,0.1,999),flashlight_fix,det:id(),prev_con)
L108 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
if (det:get_state() ~= 0 or shift_pressed or not is_empty(_GUIs) or not game.hud_motion_allowed() or game.only_movekeys_allowed() or not string.find(det:section(), "glowstick")) then
L108 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
if (det:get_state() ~= 0 or shift_pressed or not is_empty(_GUIs) or not game.hud_motion_allowed() or game.only_movekeys_allowed() or not string.find(det:section(), "glowstick")) then
L117 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
local tm = det:play_hud_motion("anm_throw_stick", true, 0, 1, 0) / 1000
L123 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
CreateTimeEvent("glowstick","drop",tm-0.2,spawn_glowstick,det:id(),true)
L135 🟡 potential_nil_access
Potential nil access: 'itm' from level.object_by_id() used without nil check
Impact: low
Show code
if (not itm or (not throw and itm:parent())) then return true end
L138 🟡 potential_nil_access
Potential nil access: 'itm' from level.object_by_id() used without nil check
Impact: low
Show code
local section = itm:section()
L139 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local pos = actor:bone_position(throw and "eye_left" or "bip01_l_hand")
L141 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local obj = alife_create("lights_glowstick", pos, actor:level_vertex_id(), actor:game_vertex_id())
L141 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local obj = alife_create("lights_glowstick", pos, actor:level_vertex_id(), actor:game_vertex_id())
L161 🟡 potential_nil_access
Potential nil access: 'itm' from level.object_by_id() used without nil check
Impact: low
Show code
local con_d = itm:condition()
L164 🟡 potential_nil_access
Potential nil access: 'itm' from level.object_by_id() used without nil check
Impact: low
Show code
alife_release_id(itm:id())
L211 🟡 potential_nil_access
Potential nil access: 'gl' from level.object_by_id() used without nil check
Impact: low
Show code
gl:get_physics_shell():apply_force(dir.x, dir.y, dir.z)
L262 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local next = actor:object(section)
L271 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:move_to_slot(next,9)
L285 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:iterate_ruck(function (temp, obj)
L302 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:move_to_slot(glowsticks_in_ruck[1].object, 9)
L322 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
if (actor:item_in_slot(9)) then return true end
L323 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
if (not actor:object_id(id)) then return true end
L324 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:move_to_slot(actor:object_id(id),9)
L324 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:move_to_slot(actor:object_id(id),9)
L326 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local itm = actor:active_item()
L328 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
local slot = ini_sys:r_s32(itm:section(), "slot")
L346 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local det = actor:active_detector()

397- Outfits Animation - lizzardman

1 file (🟢0 🟡0 🔴3 🔵4)

outfit_animations.script

L367 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("outfit memory: l(" .. s ..") {}")
L370 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("outfit memory: l(" .. s .. ") {")
L375 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(" " .. i .. " = " .. v)
L378 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("}")
L1 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = false
L43 🔴 global_write
Global write: memory_max
Impact: low
Show code
memory_max = outfit_animations_mcm.get_config("memory_size")
L53 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = true

399- Tosox Mini Mods Repo - Tosox

6 files (🟢0 🟡4 🔴12 🔵0)

z_companions_dont_blow_disguises.script

L13 🔴 global_write
Global write: orig_gameplay_disguise_npc_on_update
Impact: low
Show code
orig_gameplay_disguise_npc_on_update = gameplay_disguise.npc_on_update
L34 🔴 global_write
Global write: orig_gameplay_disguise_anybody_see
Impact: low
Show code
orig_gameplay_disguise_anybody_see = gameplay_disguise.anybody_see

z_dyn_news_heard_melee_fix.script

L11 🔴 global_write
Global write: orig_dnm_gossip_death_by_stalker
Impact: low
Show code
orig_dnm_gossip_death_by_stalker = dynamic_news_manager.DynamicNewsManager.GossipDeathByStalker
L21 🔴 global_write
Global write: orig_dnm_gossip_death_of_mutant
Impact: low
Show code
orig_dnm_gossip_death_of_mutant = dynamic_news_manager.DynamicNewsManager.GossipDeathOfMutant

z_dyn_news_task_gossip_fix.script

L11 🔴 global_write
Global write: orig_dnm_gossip_task_repeat_timeout
Impact: low
Show code
orig_dnm_gossip_task_repeat_timeout = dynamic_news_manager.DynamicNewsManager.GossipTaskRepeatTimeout

z_npc_wounded_animation_fix_mcm.script

L11 🔴 global_write
Global write: orig_action_wounded_initialize
Impact: low
Show code
orig_action_wounded_initialize = xr_wounded.action_wounded.initialize
L44 🔴 global_write
Global write: defaults
Impact: low
Show code
defaults = {

z_surge_crow_killer_fix.script

L11 🔴 global_write
Global write: surge_manager_CSurgeManager_kill_crows_at_pos
Impact: low
Show code
surge_manager_CSurgeManager_kill_crows_at_pos = surge_manager.CSurgeManager.kill_crows_at_pos
L32 🔴 global_write
Global write: psi_storm_manager_CPsiStormManager_kill_crows_at_pos
Impact: low
Show code
psi_storm_manager_CPsiStormManager_kill_crows_at_pos = psi_storm_manager.CPsiStormManager.kill_crows_at_pos
L25 🟡 potential_nil_access
Potential nil access: 'crow' from level.object_by_id() used without nil check
Impact: low
Show code
if (crow and crow:alive() and pos < crow:position().z) then
L25 🟡 potential_nil_access
Potential nil access: 'crow' from level.object_by_id() used without nil check
Impact: low
Show code
if (crow and crow:alive() and pos < crow:position().z) then
L46 🟡 potential_nil_access
Potential nil access: 'crow' from level.object_by_id() used without nil check
Impact: low
Show code
if (crow and crow:alive() and distance_2d(pos, crow:position()) < 25) then
L46 🟡 potential_nil_access
Potential nil access: 'crow' from level.object_by_id() used without nil check
Impact: low
Show code
if (crow and crow:alive() and distance_2d(pos, crow:position()) < 25) then

z_task_marker_delivery_fix.script

L11 🔴 global_write
Global write: orig_general_delivery
Impact: low
Show code
orig_general_delivery = task_functor.general_delivery
L42 🔴 global_write
Global write: orig_task_status_functor_drx_sl_quest_item_task_status
Impact: low
Show code
orig_task_status_functor_drx_sl_quest_item_task_status = task_status_functor.drx_sl_quest_item_task_status
L64 🔴 global_write
Global write: orig_drx_sl_quest_item_task_target
Impact: low
Show code
orig_drx_sl_quest_item_task_target = task_functor.drx_sl_quest_item_task_target

3D_Interactive_PDA

20 files (🟢60 🟡32 🔴78 🔵7)

pda_inter_gui.script

L852 🟢 table_insert_append
table.insert(small_menu_active, v) -> small_menu_active[#small_menu_active+1] = v
Impact: high
Show code
table.insert(small_menu_active, i)
L1124 🟢 table_insert_append
table.insert(a, v) -> a[#a+1] = v
Impact: high
Show code
table.insert(a, (output == "k" and k) or (output == "v" and v))
L1134 🟢 table_insert_append
table.insert(a, v) -> a[#a+1] = v
Impact: high
Show code
table.insert(a, (by == "k" and k) or (by == "v" and v) or k)
L1152 🟢 table_insert_append
table.insert(pda_x_t, v) -> pda_x_t[#pda_x_t+1] = v
Impact: high
Show code
table.insert(pda_x_t, "pda_inter_" .. #pda_x_t)
L310 🟢 uncached_globals_summary
Cache 1 globals in on_before_key_press
Impact: medium
Show code
L328: string.sub L332: string.sub
L807 🟢 uncached_globals_summary
Cache 1 globals in OnSnakeGridReset
Impact: medium
Show code
L830: string.find L830: string.find
L997 🟢 uncached_globals_summary
Cache 1 globals in align_element
Impact: medium
Show code
L1006: type L1024: type
L818 🟡 string_concat_in_loop
String concat in loop: s1 = s1 .. x
Impact: critical
Show code
for i = 1, #t do s1 = s1 .. string.char(t[i]) end
L1157 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L3 🔴 global_write
Global write: xml
Impact: low
Show code
xml = CScriptXmlInit()
L6 🔴 global_write
Global write: actions_to_unbind
Impact: low
Show code
actions_to_unbind = {
L22 🔴 global_write
Global write: keys_ini
Impact: low
Show code
keys_ini = ini_file_ex("plugins\\key_to_DIK.ltx")
L23 🔴 global_write
Global write: last_3d_state
Impact: low
Show code
last_3d_state = false
L24 🔴 global_write
Global write: exc_key_btns
Impact: low
Show code
exc_key_btns = {
L32 🔴 global_write
Global write: pda_max_tasks
Impact: low
Show code
pda_max_tasks = pda_inter_mcm.get_config("task_max_tasks")
L34 🔴 global_write
Global write: pda_open_key
Impact: low
Show code
pda_open_key = pda_inter_mcm.get_config("int_pda_key")
L36 🔴 global_write
Global write: Custom_PDA_debug
Impact: low
Show code
Custom_PDA_debug = pda_inter_mcm.get_config("debugx")
L39 🔴 global_write
Global write: main_menu_btns
Impact: low
Show code
main_menu_btns = 7
L40 🔴 global_write
Global write: task_menu_btns
Impact: low
Show code
task_menu_btns = 10
L80 🔴 global_write
Global write: tab_visual_positions
Impact: low
Show code
tab_visual_positions = {}
L83 🔴 global_write
Global write: pda_msg_states
Impact: low
Show code
pda_msg_states = {
L93 🔴 global_write
Global write: pda_notes_t
Impact: low
Show code
pda_notes_t = {}
L96 🔴 global_write
Global write: pdax_level_list
Impact: low
Show code
pdax_level_list = {
L144 🔴 global_write
Global write: pdax_mutant_list
Impact: low
Show code
pdax_mutant_list = {
L166 🔴 global_write
Global write: pdax_artefact_list
Impact: low
Show code
pdax_artefact_list = {
L213 🔴 global_write
Global write: pda_inter_bp
Impact: low
Show code
pda_inter_bp = false
L217 🔴 global_write
Global write: pda_opened
Impact: low
Show code
pda_opened = false -- just in case
L308 🔴 global_write
Global write: M_locked
Impact: low
Show code
M_locked = false
L309 🔴 global_write
Global write: removelet
Impact: low
Show code
removelet = false
L326 🔴 global_write
Global write: removelet
Impact: low
Show code
removelet = false
L346 🔴 global_write
Global write: removelet
Impact: low
Show code
removelet = true
L389 🔴 global_write
Global write: pda_opened
Impact: low
Show code
pda_opened = true
L396 🔴 global_write
Global write: last_3d_state
Impact: low
Show code
last_3d_state = get_console_cmd(1,"g_3d_pda")
L464 🔴 global_write
Global write: tab_visual_positions
Impact: low
Show code
tab_visual_positions = {}
L832 🔴 global_write
Global write: pda_inter_bp
Impact: low
Show code
if gt_snake_b1t then pda_inter_bp = true end
L966 🔴 global_write
Global write: pda_opened
Impact: low
Show code
pda_opened = false
L1169 🔴 global_write
Global write: pda_msg_states
Impact: low
Show code
pda_msg_states = m_data.pda_msg_states or { { state = 0, big_menu = true }, { state = 0, big_menu = true }, { state = 0, big_menu = false }, { state = 0, big_menu = true }, { state = 0, big_menu = false }, { state = 0, big_menu = false }, { state = 0, big_menu = true } }
L1171 🔴 global_write
Global write: pda_notes_t
Impact: low
Show code
pda_notes_t = m_data.pda_notes_t or {}
L1184 🔴 global_write
Global write: pda_opened
Impact: low
Show code
pda_opened = false
L1231 🔴 global_write
Global write: pda_open_key
Impact: low
Show code
pda_open_key = pda_inter_mcm.get_config("int_pda_key")
L1232 🔴 global_write
Global write: pda_max_tasks
Impact: low
Show code
pda_max_tasks = pda_inter_mcm.get_config("task_max_tasks")
L1233 🔴 global_write
Global write: Custom_PDA_debug
Impact: low
Show code
Custom_PDA_debug = pda_inter_mcm.get_config("debugx")
L1237 🔴 global_write
Global write: dik_to_num
Impact: low
Show code
dik_to_num = keys_ini:collect_section(section)
L1149 🟡 unused_local_variable
Local variable 'se_obj' is assigned but never used
Impact: low
Show code
local se_obj = alife_object(i)

pda_inter_gui_a_raid.script

L1 🔴 global_write
Global write: pmain
Impact: low
Show code
pmain = pda_inter_gui

pda_inter_gui_b_info.script

L1 🔴 global_write
Global write: pmain
Impact: low
Show code
pmain = pda_inter_gui
L259 🟡 unused_local_variable
Local variable 'senders_t' is assigned but never used
Impact: low
Show code
local senders_t = pda_inter_x_buyinfo.Find_available_messages

pda_inter_gui_c_games.script

L143 🟢 table_insert_append
table.insert(adj_t, v) -> adj_t[#adj_t+1] = v
Impact: high
Show code
table.insert(adj_t, j)
L667 🟢 uncached_globals_summary
Cache 1 globals in OnClickGamesBlackjackTake
Impact: medium
Show code
L670: math.random L672: math.random
L882 🟢 uncached_globals_summary
Cache 1 globals in ResetGamesSudoku
Impact: medium
Show code
L912: math.random L914: math.random
L960 🟢 uncached_globals_summary
Cache 1 globals in OnPressGamesSudoku
Impact: medium
Show code
L984: tonumber L991: tonumber
L198 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("slots launch")
L1 🔴 global_write
Global write: pmain
Impact: low
Show code
pmain = pda_inter_gui
L6 🔴 global_write
Global write: games_amount
Impact: low
Show code
games_amount = 5
L8 🔴 global_write
Global write: puzzle_reward
Impact: low
Show code
puzzle_reward = pda_inter_mcm.get_config("puzzle_reward")
L9 🔴 global_write
Global write: slots_bet
Impact: low
Show code
slots_bet = pda_inter_mcm.get_config("slots_bet")
L10 🔴 global_write
Global write: sudoku_reward
Impact: low
Show code
sudoku_reward = pda_inter_mcm.get_config("sudoku_reward")
L11 🔴 global_write
Global write: sudoku_diff
Impact: low
Show code
sudoku_diff = pda_inter_mcm.get_config("sudoku_diff")
L1157 🔴 global_write
Global write: puzzle_reward
Impact: low
Show code
puzzle_reward = pda_inter_mcm.get_config("puzzle_reward")
L1158 🔴 global_write
Global write: slots_bet
Impact: low
Show code
slots_bet = pda_inter_mcm.get_config("slots_bet")
L1159 🔴 global_write
Global write: sudoku_reward
Impact: low
Show code
sudoku_reward = pda_inter_mcm.get_config("sudoku_reward")
L1160 🔴 global_write
Global write: sudoku_diff
Impact: low
Show code
sudoku_diff = pda_inter_mcm.get_config("sudoku_diff")
L467 🟡 unused_local_variable
Local variable 'reward' is assigned but never used
Impact: low
Show code
local reward = db.actor:give_money(self.snake_cur_score)

pda_inter_gui_c_games_rogue.script

L9 🔴 global_write
Global write: pda_rogue_game
Impact: low
Show code
pda_rogue_game = {}
L477 🔴 global_write
Global write: pda_rogue_game
Impact: low
Show code
pda_rogue_game = m_data.pda_rogue_game or {}

pda_inter_gui_c_games_rogue_a_path.script

L75 🟢 table_insert_append
table.insert(result, v) -> result[#result+1] = v
Impact: high
Show code
table.insert( result, { x = px, y = py } )
L93 🟢 table_insert_append
table.insert(open, v) -> open[#open+1] = v
Impact: high
Show code
table.insert(open, start)
L102 🟢 table_insert_append
table.insert(closed, v) -> closed[#closed+1] = v
Impact: high
Show code
table.insert(closed, current)
L118 🟢 table_insert_append
table.insert(open, v) -> open[#open+1] = v
Impact: high
Show code
table.insert(open, adjacent)

pda_inter_gui_c_games_rogue_level_gen.script

L66 🟢 uncached_globals_summary
Cache 1 globals in RogueSetDarkscapeCellTextures
Impact: medium
Show code
L77: math.random L78: math.random
L90 🟢 uncached_globals_summary
Cache 1 globals in RogueSetSwampCellTextures
Impact: medium
Show code
L97: math.random L102: math.random
L164 🟢 uncached_globals_summary
Cache 1 globals in RogueSetRedForestCellTextures
Impact: medium
Show code
L175: math.random L176: math.random
L188 🟢 uncached_globals_summary
Cache 1 globals in RogueSetLabCellTextures
Impact: medium
Show code
L204: math.random L205: math.random
L437 🟢 uncached_globals_summary
Cache 1 globals in LevelMakeRooms
Impact: medium
Show code
L449: math.random L450: math.random
L135 🟡 string_concat_in_loop
String concat in loop: adj_str = adj_str .. x
Impact: critical
Show code
adj_str = adj_str .. "u"
L221 🟡 string_concat_in_loop
String concat in loop: adj_str = adj_str .. x
Impact: critical
Show code
adj_str = adj_str .. "u"
L27 🔴 global_write
Global write: start_cells
Impact: low
Show code
walls_map, start_cells = self:LevelWildGenerate(self.grid_w, self.grid_h, wall_percents)

pda_inter_gui_c_games_rogue_objects.script

L161 🟢 uncached_globals_summary
Cache 1 globals in RogueGenerateNPC
Impact: medium
Show code
L175: math.random L193: math.random
L257 🟢 uncached_globals_summary
Cache 1 globals in RogueGenerateObjectAnomalies
Impact: medium
Show code
L268: math.random L272: math.random
L1 🟡 unused_local_variable
Local variable 'gt' is assigned but never used
Impact: low
Show code
local gt = game.translate_string

pda_inter_gui_c_games_rogue_utils.script

L1 🟡 unused_local_variable
Local variable 'gt' is assigned but never used
Impact: low
Show code
local gt = game.translate_string
L232 🟡 unused_local_variable
Local variable 'str' is assigned but never used
Impact: low
Show code
local str = self.rogue_grid[row][col].rect

pda_inter_gui_d_trade.script

L61 🟢 table_insert_append
table.insert(self.trade_categories[group].item_btns, v) -> self.trade_categories[group].item_btns[#self.trade_categories[group].item_btns+1] = v
Impact: high
Show code
table.insert(self.trade_categories[group].item_btns, {})
L6 🟢 uncached_globals_summary
Cache 1 globals in BuildTradeUpperMenu
Impact: medium
Show code
L18: pairs L54: pairs
L1 🔴 global_write
Global write: pmain
Impact: low
Show code
pmain = pda_inter_gui
L253 🟡 unused_local_variable
Local variable 'traders_t' is assigned but never used
Impact: low
Show code
local traders_t = pda_inter_x_trade.Trade_available_messages

pda_inter_gui_e_notes.script

L160 🟢 table_insert_append
table.insert(pmain.pda_notes_t, v) -> pmain.pda_notes_t[#pmain.pda_notes_t+1] = v
Impact: high
Show code
table.insert(pmain.pda_notes_t, {}) -- new array for each new note
L28 🟡 string_concat_in_loop
String concat in loop: big_str = big_str .. x
Impact: critical
Show code
big_str = big_str .. yel_clr_str .. pmain.pda_notes_t[i][1] .. white_clr_str .. pmain.pda_notes_t[i][2] .. def_clr_str .. pmain.pda_notes_t[i][3]
L319 🟡 string_concat_in_loop
String concat in loop: big_str = big_str .. x
Impact: critical
Show code
big_str = big_str .. yel_clr_str .. pmain.pda_notes_t[i][1] .. white_clr_str .. pmain.pda_notes_t[i][2] .. def_clr_str .. pmain.pda_notes_t[i][3]
L1 🔴 global_write
Global write: pmain
Impact: low
Show code
pmain = pda_inter_gui

pda_inter_gui_f_banter.script

L1 🔴 global_write
Global write: pmain
Impact: low
Show code
pmain = pda_inter_gui
L2 🟡 unused_local_variable
Local variable 'gt' is assigned but never used
Impact: low
Show code
local gt = game.translate_string

pda_inter_gui_g_tasks.script

L182 🟡 string_concat_in_loop
String concat in loop: reward = reward .. x
Impact: critical
Show code
reward = reward .. " " .. gt("pda_task_reward_hour")
L1 🔴 global_write
Global write: pmain
Impact: low
Show code
pmain = pda_inter_gui

pda_inter_inc.script

L13 🟢 uncached_globals_summary
Cache 1 globals in squad_on_npc_death
Impact: medium
Show code
L73: math.random L87: math.random
L137 🟢 uncached_globals_summary
Cache 1 globals in sos_give_reward
Impact: medium
Show code
L144: math.random L146: math.random
L181 🟡 potential_nil_access
Potential nil access: 'npc' from level.object_by_id() used without nil check
Impact: low
Show code
if npc and (type(npc) == "userdata") and npc:alive() then

pda_inter_mcm.script

L338 🟡 string_concat_in_loop
String concat in loop: new_str = new_str .. x
Impact: critical
Show code
new_str = new_str .. t[i][j] .. "\n"
L161 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "pda_inter" ,gr={

pda_inter_x_banter.script

L103 🟢 uncached_globals_summary
Cache 2 globals in ask_surge
Impact: medium
Show code
L118: math.floor L142: math.floor L127: math.random L142: math.random
L177 🟢 uncached_globals_summary
Cache 2 globals in ask_psi_storm
Impact: medium
Show code
L192: math.floor L216: math.floor L201: math.random L216: math.random
L251 🟢 uncached_globals_summary
Cache 2 globals in ask_status
Impact: medium
Show code
L269: math.random L330: math.random L279: pairs L281: pairs
L518 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L416 🔴 global_write
Global write: npc_name
Impact: low
Show code
npc_name = gt("st_faction_" .. se_npc:community())
L419 🔴 global_write
Global write: npc_name
Impact: low
Show code
npc_name = str and gt(strings[str])
L383 🟡 potential_nil_access
Potential nil access: 'npc' from level.object_by_id() used without nil check
Impact: low
Show code
local npc_pos = npc and npc:position()
L398 🟡 potential_nil_access
Potential nil access: 'npc' from level.object_by_id() used without nil check
Impact: low
Show code
if npc and npc:alive() then

pda_inter_x_buyinfo.script

L236 🟢 table_insert_append
table.insert(Find_available_messages, v) -> Find_available_messages[#Find_available_messages+1] = v
Impact: high
Show code
table.insert(Find_available_messages, {})
L52 🟢 uncached_globals_summary
Cache 1 globals in store_senders
Impact: medium
Show code
L77: string.find L78: string.find
L189 🟢 uncached_globals_summary
Cache 1 globals in add_sender
Impact: medium
Show code
L226: math.random L232: math.random
L381 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L1 🔴 global_write
Global write: Find_available_messages
Impact: low
Show code
Find_available_messages = {} -- slowly add npcs to this table
L309 🔴 global_write
Global write: Find_available_messages
Impact: low
Show code
Find_available_messages = {}
L330 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local target_lname = sim:level_name(target_lid)

pda_inter_x_raid.script

L29 🟢 table_insert_append
table.insert(viable_squads_list, v) -> viable_squads_list[#viable_squads_list+1] = v
Impact: high
Show code
table.insert(viable_squads_list, squad.id)
L84 🟢 table_insert_append
table.insert(Raid_available_squads, v) -> Raid_available_squads[#Raid_available_squads+1] = v
Impact: high
Show code
table.insert(Raid_available_squads, {})
L412 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L1 🔴 global_write
Global write: Raid_available_squads
Impact: low
Show code
Raid_available_squads = {}
L2 🔴 global_write
Global write: Hired_squad
Impact: low
Show code
Hired_squad = { id = false, start_time = false, duration = false, danger = false, icon = "default" }
L420 🔴 global_write
Global write: Hired_squad
Impact: low
Show code
Hired_squad = m_data.Hired_squad or { id = false, start_time = false, duration = false, danger = false, icon = "default" }
L121 🟡 potential_nil_access
Potential nil access: 'npc' from level.object_by_id() used without nil check
Impact: low
Show code
if npc and npc:alive() then
L136 🟡 potential_nil_access
Potential nil access: 'commander' from level.object_by_id() used without nil check
Impact: low
Show code
if commander and commander:alive() and commander:character_icon()then
L136 🟡 potential_nil_access
Potential nil access: 'commander' from level.object_by_id() used without nil check
Impact: low
Show code
if commander and commander:alive() and commander:character_icon()then
L314 🟡 potential_nil_access
Potential nil access: 'npc' from level.object_by_id() used without nil check
Impact: low
Show code
if npc and npc:alive() then
L341 🟡 potential_nil_access
Potential nil access: 'commander' from level.object_by_id() used without nil check
Impact: low
Show code
if commander and commander:alive() then

pda_inter_x_tasks.script

L685 🟢 table_insert_append
table.insert(str_storage, v) -> str_storage[#str_storage+1] = v
Impact: high
Show code
table.insert(str_storage, route_smart_level_name)
L884 🟢 table_insert_append
table.insert(Active_pda_tasks[#Active_pda_tasks].route, v) -> Active_pda_tasks[#Active_pda_tasks].route[#Active_pda_tasks[#Active_pda_tasks].route+1] = v
Impact: high
Show code
table.insert(Active_pda_tasks[#Active_pda_tasks].route, route_smart.id)
L350 🟢 uncached_globals_summary
Cache 1 globals in actor_on_first_update
Impact: medium
Show code
L359: string.find L360: string.find
L504 🟢 uncached_globals_summary
Cache 2 globals in add_giver
Impact: medium
Show code
L525: math.floor L603: math.floor L528: math.random L577: math.random
L769 🟢 uncached_globals_summary
Cache 1 globals in setup_task
Impact: medium
Show code
L844: math.random L908: math.random
L1714 🟢 uncached_globals_summary
Cache 1 globals in get_all_kill_targets
Impact: medium
Show code
L1726: string.find L1746: string.find
L1839 🟢 uncached_globals_summary
Cache 1 globals in get_delivery_targets
Impact: medium
Show code
L1856: math.random L1861: math.random
L2253 🟢 uncached_globals_summary
Cache 1 globals in get_mutant_part_sections
Impact: medium
Show code
L2257: string.find L2257: string.find
L2280 🟢 uncached_globals_summary
Cache 1 globals in get_repair_sections
Impact: medium
Show code
L2284: string.find L2286: string.find
L2359 🟢 uncached_globals_summary
Cache 1 globals in get_anomaly_zone_id
Impact: medium
Show code
L2366: pairs L2367: pairs
L2396 🟢 uncached_globals_summary
Cache 1 globals in first_update_fill_anomaly_zones
Impact: medium
Show code
L2438: pairs L2439: pairs
L2605 🟢 uncached_globals_summary
Cache 1 globals in pda_change_goodwill
Impact: medium
Show code
L2619: math.ceil L2622: math.ceil
L411 🟢 repeated_alife
alife called 5x in find_givers
Impact: low
Show code
local sim = alife()
L596 🟢 repeated_alife
alife called 4x in add_giver
Impact: low
Show code
local sim = alife()
L1258 🟢 repeated_item_section()
item:section() called 3x in manage_fetch_items_task
Impact: low
Show code
Cache item:section() result
L1279 🟢 repeated_itm_section()
itm:section() called 3x in release_items
Impact: low
Show code
Cache itm:section() result
L1433 🟢 repeated_item_id()
item:id() called 3x in manage_delivery_item_task
Impact: low
Show code
Cache item:id() result
L693 🟡 string_concat_in_loop
String concat in loop: smart_levels_str = smart_levels_str .. x
Impact: critical
Show code
smart_levels_str = smart_levels_str .. (smart_levels_str == "" and "" or ", ") .. gt(str_storage[i])
L2655 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L30 🔴 global_write
Global write: Tasks_available_givers
Impact: low
Show code
Tasks_available_givers = {} -- clear this (to display in GUI)
L31 🔴 global_write
Global write: Active_pda_tasks
Impact: low
Show code
Active_pda_tasks = {} -- save this (tasks that we took)
L35 🔴 global_write
Global write: all_potential_givers
Impact: low
Show code
all_potential_givers = {} -- first update collects all possible givers (global for banter)
L2645 🔴 global_write
Global write: Active_pda_tasks
Impact: low
Show code
Active_pda_tasks = m_data.Active_pda_tasks or {}
L425 🟡 potential_nil_access
Potential nil access: 'npc' from level.object_by_id() used without nil check
Impact: low
Show code
local squad = npc and npc:alive() and get_object_squad(npc)
L590 🟡 potential_nil_access
Potential nil access: 'game_giver_obj' from level.object_by_id() used without nil check
Impact: low
Show code
if (not game_giver_obj) or (not game_giver_obj:alive()) then return end
L2496 🟡 potential_nil_access
Potential nil access: 'npc' from level.object_by_id() used without nil check
Impact: low
Show code
local npc_pos = npc and npc:position()
L1822 🟡 unused_local_variable
Local variable 'se_npc_pos' is assigned but never used
Impact: low
Show code
local se_npc_pos = se_npc.position
L1961 🟡 unused_local_variable
Local variable 'blue_clr' is assigned but never used
Impact: low
Show code
local blue_clr = strformat("%c[%s,%s,%s,%s]", 255, 0, 140, 180)
L1967 🟡 unused_local_variable
Local variable 'cur_d' is assigned but never used
Impact: low
Show code
local cur_d = cur_time:dateToString(game.CTime.DateToDay)
L1968 🟡 unused_local_variable
Local variable 'cur_min' is assigned but never used
Impact: low
Show code
local cur_min = cur_time:timeToString(game.CTime.TimeToMinutes)

pda_inter_x_trade.script

L182 🟢 table_insert_append
table.insert(Trade_available_messages, v) -> Trade_available_messages[#Trade_available_messages+1] = v
Impact: high
Show code
table.insert(Trade_available_messages, {})
L236 🟢 table_insert_append
table.insert(Ordered_items, v) -> Ordered_items[#Ordered_items+1] = v
Impact: high
Show code
table.insert(Ordered_items, {})
L453 🟢 table_insert_append
table.insert(t, v) -> t[#t+1] = v
Impact: high
Show code
table.insert(t, {sec, name})
L567 🟢 table_insert_append
table.insert(all_level_stashes, v) -> all_level_stashes[#all_level_stashes+1] = v
Impact: high
Show code
table.insert(all_level_stashes, se_stash)
L597 🟢 table_insert_append
table.insert(ltx_stashes, v) -> ltx_stashes[#ltx_stashes+1] = v
Impact: high
Show code
table.insert(ltx_stashes, stash)
L41 🟢 uncached_globals_summary
Cache 1 globals in find_traders
Impact: medium
Show code
L50: string.find L50: string.find
L114 🟢 uncached_globals_summary
Cache 2 globals in add_trader
Impact: medium
Show code
L148: math.random L173: math.random L154: math.ceil L166: math.ceil
L332 🟢 uncached_globals_summary
Cache 1 globals in collect_all_items
Impact: medium
Show code
L346: pairs L360: pairs
L689 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L2 🔴 global_write
Global write: Trade_available_messages
Impact: low
Show code
Trade_available_messages = {}
L3 🔴 global_write
Global write: Ordered_items
Impact: low
Show code
Ordered_items = {}
L4 🔴 global_write
Global write: delivered_stashes
Impact: low
Show code
delivered_stashes = {}
L8 🔴 global_write
Global write: categorized_items
Impact: low
Show code
categorized_items = {}
L28 🔴 global_write
Global write: Delivery_blacklisted_levels
Impact: low
Show code
Delivery_blacklisted_levels = { ["l03u_agr_underground"] = true, ["y04_pole"] = true, ["k01_darkscape"] = true, ["l04u_labx18"] = true, ["l08u_brainlab"] = true, ["jupiter_underground"] = true, ["l10u_bunker"] = true, ["labx8"] = true, ["l12u_control_monolith"] = true, ["l12u_sarcofag"] = true, ["l13u_warlab"] = true, ["bunker_a1"] = true, ["collaider"] = true }
L337 🔴 global_write
Global write: result
Impact: low
Show code
result, id, value = trade_ini:r_line_ex(to_collect[i], j, "", "")
L337 🔴 global_write
Global write: id
Impact: low
Show code
result, id, value = trade_ini:r_line_ex(to_collect[i], j, "", "")
L337 🔴 global_write
Global write: value
Impact: low
Show code
result, id, value = trade_ini:r_line_ex(to_collect[i], j, "", "")
L586 🔴 global_write
Global write: result
Impact: low
Show code
result, id, value = stash_ini:r_line_ex(selected_level, i, "", "")
L586 🔴 global_write
Global write: id
Impact: low
Show code
result, id, value = stash_ini:r_line_ex(selected_level, i, "", "")
L586 🔴 global_write
Global write: value
Impact: low
Show code
result, id, value = stash_ini:r_line_ex(selected_level, i, "", "")
L698 🔴 global_write
Global write: Ordered_items
Impact: low
Show code
Ordered_items = m_data.Ordered_items or {}
L699 🔴 global_write
Global write: delivered_stashes
Impact: low
Show code
delivered_stashes = m_data.delivered_stashes or {}

40- Food Drugs and Drinks Animations FDDA - Feel_Fried

6 files (🟢0 🟡2 🔴45 🔵16)

ea_error.script

L4 🔴 global_write
Global write: ea_error_text
Impact: low
Show code
ea_error_text = gt("st_EA_game_ver_error_1").." "..GAME_VERSION.." "..gt("st_EA_game_ver_error_2")
L5 🔴 global_write
Global write: ea_button_ok_text
Impact: low
Show code
ea_button_ok_text = gt("st_EA_game_ver_error_button_ok")
L6 🔴 global_write
Global write: ea_button_cancel_text
Impact: low
Show code
ea_button_cancel_text = gt("st_EA_game_ver_error_button_cancel")

ea_prefetcher.script

L12 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(value.."soud prefetched")
L20 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(value.." anim cached")

enhanced_animations.script

L123 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
if ea_debug then printf("speed is = "..speed) end
L168 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
if ea_debug then printf("update = "..failure_timer) end
L173 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("hide weapons for anim failed")
L174 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(used_item or (used_monster and used_monster:section()) or "anim find ERROR")
L175 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(anim_section or "NO ANIM SECTION FOUND")
L30 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = true
L31 🔴 global_write
Global write: mutant_loot_mod
Impact: low
Show code
mutant_loot_mod = true
L35 🔴 global_write
Global write: active_slot
Impact: low
Show code
active_slot,used_item,ea_flag,fake_monster,det_active,anim_section = nil
L35 🔴 global_write
Global write: used_item
Impact: low
Show code
active_slot,used_item,ea_flag,fake_monster,det_active,anim_section = nil
L35 🔴 global_write
Global write: ea_flag
Impact: low
Show code
active_slot,used_item,ea_flag,fake_monster,det_active,anim_section = nil
L35 🔴 global_write
Global write: fake_monster
Impact: low
Show code
active_slot,used_item,ea_flag,fake_monster,det_active,anim_section = nil
L35 🔴 global_write
Global write: det_active
Impact: low
Show code
active_slot,used_item,ea_flag,fake_monster,det_active,anim_section = nil
L35 🔴 global_write
Global write: anim_section
Impact: low
Show code
active_slot,used_item,ea_flag,fake_monster,det_active,anim_section = nil
L54 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = not enable_animations
L60 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = ui_mcm.get("EA_settings/enable_animations")
L61 🔴 global_write
Global write: mutant_loot_mod
Impact: low
Show code
mutant_loot_mod = ui_mcm.get("EA_settings/mutant_loot")
L64 🔴 global_write
Global write: mutant_loot_mod
Impact: low
Show code
mutant_loot_mod = false
L68 🔴 global_write
Global write: mutant_loot_mod
Impact: low
Show code
mutant_loot_mod = ini_eff:r_bool_ex("anim_settings", "mutant_loot_mod")
L69 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = ui_options.get("video/player/animations")
L84 🔴 global_write
Global write: active_slot
Impact: low
Show code
active_slot = db.actor:active_slot()
L94 🔴 global_write
Global write: used_item
Impact: low
Show code
used_item = item
L96 🔴 global_write
Global write: anim_section
Impact: low
Show code
anim_section = ini_eff:r_string_ex(item, "anm")
L136 🔴 global_write
Global write: tmr
Impact: low
Show code
tmr = ini_eff:r_float_ex(used_item, "tm")
L154 🔴 global_write
Global write: tmr
Impact: low
Show code
tmr = ini_eff:r_float_ex("item_ea_harv_wpn_knife", "anim_length")
L190 🔴 global_write
Global write: anim_section
Impact: low
Show code
anim_section = nil
L290 🔴 global_write
Global write: used_item
Impact: low
Show code
used_item = nil
L301 🔴 global_write
Global write: fake_monster
Impact: low
Show code
fake_monster = used_monster
L303 🔴 global_write
Global write: ea_flag
Impact: low
Show code
ea_flag = true
L305 🔴 global_write
Global write: ea_flag
Impact: low
Show code
ea_flag = nil
L307 🔴 global_write
Global write: fake_monster
Impact: low
Show code
fake_monster = nil
L334 🔴 global_write
Global write: det_active
Impact: low
Show code
det_active = db.actor:active_detector() or nil
L379 🔴 global_write
Global write: ea_dummy_var
Impact: low
Show code
ea_dummy_var = ea_dummy_var + 5

enhanced_animations_mcm.script

L3 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "EA_settings" ,sh=true ,gr={

take_item_anim.script

L58 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(obj_o:section() .. " taken with id " .. obj_o:id())
L70 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(obj:section() .. " taken with id " .. obj:id())
L21 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = ui_mcm.get("EA_settings/enable_animations")
L24 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = ui_options.get("video/player/animations")
L27 🔴 global_write
Global write: enable_multipickup
Impact: low
Show code
enable_multipickup = ui_options.get("control/general/pickup_mode")
L52 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check (auto-fixable)
Impact: low
Show code
actor:take_item(obj_o)

zzz_ea_addon_backpack.script

L57 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("force found")
L87 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("inventory close")
L92 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("item was used before closing backpack")
L100 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("called backpack close anim")
L111 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("item_skiped")
L115 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(item)
L157 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("crouching = "..bool_to_int[crouching])
L40 🔴 global_write
Global write: item_use_flag
Impact: low
Show code
item_use_flag = nil
L96 🔴 global_write
Global write: item_use_flag
Impact: low
Show code
item_use_flag = nil
L109 🔴 global_write
Global write: item_use_flag
Impact: low
Show code
item_use_flag = true
L130 🔴 global_write
Global write: item_use_flag
Impact: low
Show code
item_use_flag = nil
L163 🔴 global_write
Global write: det_active
Impact: low
Show code
det_active = db.actor:active_detector() or nil
L165 🔴 global_write
Global write: backpack_faction
Impact: low
Show code
backpack_faction = character_community(db.actor):sub(7)
L182 🔴 global_write
Global write: idle
Impact: low
Show code
idle = "item_ea_backpack_open_" .. backpack_faction .. "_" .. "hud"
L185 🔴 global_write
Global write: ea_invent_flag
Impact: low
Show code
ea_invent_flag = true
L207 🔴 global_write
Global write: det_active
Impact: low
Show code
det_active = nil
L224 🔴 global_write
Global write: ea_invent_flag
Impact: low
Show code
ea_invent_flag = nil
L230 🔴 global_write
Global write: item_use_flag
Impact: low
Show code
if item:section() ~= "items_anm_dummy" then item_use_flag = true end
L126 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then

401- Overheat Gunsmoke - party_50

1 file (🟢1 🟡0 🔴0 🔵0)

z_overheat_gunsmoke.script

L36 🟢 repeated_wpn_id()
wpn:id() called 4x in <global>
Impact: low
Show code
Cache wpn:id() result

402- Radial Quickslots - NLTP_ASHES

3 files (🟢2 🟡1 🔴16 🔵3)

arm.script

L224 🟢 table_insert_append
table.insert(self.option_data, v) -> self.option_data[#self.option_data+1] = v
Impact: high
Show code
table.insert(self.option_data, option_data)
L350 🟢 table_insert_append
table.insert(self.callbacks[callback_id], v) -> self.callbacks[callback_id][#self.callbacks[callback_id]+1] = v
Impact: high
Show code
table.insert(self.callbacks[callback_id], callback_function)
L20 🔴 global_write
Global write: p_width
Impact: low
Show code
p_width = parent_width or 1024
L21 🔴 global_write
Global write: p_center
Impact: low
Show code
p_center = p_width/2
L22 🔴 global_write
Global write: width
Impact: low
Show code
width = ele:GetWidth()
L23 🔴 global_write
Global write: pos
Impact: low
Show code
pos = ele:GetWndPos()
L24 🔴 global_write
Global write: anchorpos
Impact: low
Show code
anchorpos = {}
L28 🔴 global_write
Global write: ratio
Impact: low
Show code
ratio = (device().height / device().width) / (768 / 1024)
L29 🔴 global_write
Global write: xadjust
Impact: low
Show code
xadjust = anchorpos.left
L32 🔴 global_write
Global write: xadjust
Impact: low
Show code
xadjust = p_width - (p_width - (anchor and anchorpos[anchor] or anchorpos.left))*ratio
L34 🔴 global_write
Global write: xadjust
Impact: low
Show code
xadjust = p_center - (p_center - (anchor and anchorpos[anchor] or anchorpos.left))*ratio
L36 🔴 global_write
Global write: xadjust
Impact: low
Show code
xadjust = ratio * (anchor and anchorpos[anchor] or anchorpos.left)
L48 🔴 global_write
Global write: States
Impact: low
Show code
States = {
L56 🔴 global_write
Global write: State2Suffix
Impact: low
Show code
State2Suffix = {
L74 🔴 global_write
Global write: State2Colour
Impact: low
Show code
State2Colour = {

radial_quickslots_core.script

L87 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![RQ] ERROR | Failed to instantiate UIRadialQuickslots !")
L117 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![RQ] ERROR | Cannot change time factor without UI instance !")
L155 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L66 🔴 global_write
Global write: saved_time_factor
Impact: low
Show code
saved_time_factor = nil -- time factor to restore after slowing time
L126 🔴 global_write
Global write: saved_time_factor
Impact: low
Show code
saved_time_factor = GUI:IsShown() and old_time_factor or nil
L187 🟡 potential_nil_access
Potential nil access: 'obj' from :item_in_slot() used without nil check
Impact: low
Show code
local obj_name = obj and ini_sys:r_string_ex(obj:section(), "inv_name", "st_rq_unknown_slot") or "st_rq_empty_slot"

radial_quickslots_mcm.script

L34 🔴 global_write
Global write: op
Impact: low
Show code
op = {

403- New Tasks - iTheon

23 files (🟢22 🟡30 🔴110 🔵2)

a_tab_utils.script

L6 🟢 table_insert_append
table.insert(result, v) -> result[#result+1] = v
Impact: high
Show code
table.insert(result, v)
L45 🟢 table_insert_append
table.insert(t, v) -> t[#t+1] = v
Impact: high
Show code
table.insert(t, i)

a_the_living_fire_configs.script

L1 🔴 global_write
Global write: garbage_prometheus_location
Impact: low
Show code
garbage_prometheus_location = {
L8 🔴 global_write
Global write: garbage_prometheus_spawn_activation_distance
Impact: low
Show code
garbage_prometheus_spawn_activation_distance = 79.5
L9 🔴 global_write
Global write: garbage_mutant_spawn_activation_distance
Impact: low
Show code
garbage_mutant_spawn_activation_distance = 30
L11 🔴 global_write
Global write: garbage_mutant_location
Impact: low
Show code
garbage_mutant_location = {
L19 🔴 global_write
Global write: garbage_zhar_location
Impact: low
Show code
garbage_zhar_location = {
L26 🔴 global_write
Global write: garbage_zharka_locations
Impact: low
Show code
garbage_zharka_locations = {{
L52 🔴 global_write
Global write: garbage_trash_location
Impact: low
Show code
garbage_trash_location = {
L59 🔴 global_write
Global write: swamp_spawn_activation_distance
Impact: low
Show code
swamp_spawn_activation_distance = 90
L61 🔴 global_write
Global write: swamp_explosion_locations
Impact: low
Show code
swamp_explosion_locations = {{
L93 🔴 global_write
Global write: swamp_mutant_locations
Impact: low
Show code
swamp_mutant_locations = {{
L150 🔴 global_write
Global write: x18_prometheus_location
Impact: low
Show code
x18_prometheus_location = {
L157 🔴 global_write
Global write: x18_prometheus_msg_trigger_distance
Impact: low
Show code
x18_prometheus_msg_trigger_distance = 10
L159 🔴 global_write
Global write: dark_valley_corpses_locations
Impact: low
Show code
dark_valley_corpses_locations = {{
L191 🔴 global_write
Global write: dark_valley_actor_msg_trigger_location
Impact: low
Show code
dark_valley_actor_msg_trigger_location = {
L197 🔴 global_write
Global write: dark_valley_actor_msg_trigger_distance
Impact: low
Show code
dark_valley_actor_msg_trigger_distance = 10
L199 🔴 global_write
Global write: x18_military_locations
Impact: low
Show code
x18_military_locations = {{
L236 🔴 global_write
Global write: x16_greh_locations
Impact: low
Show code
x16_greh_locations = {{
L268 🔴 global_write
Global write: x16_prometheus_location
Impact: low
Show code
x16_prometheus_location = {
L274 🔴 global_write
Global write: x16_prometheus_msg_trigger_distance
Impact: low
Show code
x16_prometheus_msg_trigger_distance = 40
L276 🔴 global_write
Global write: x16_middle
Impact: low
Show code
x16_middle = {
L281 🔴 global_write
Global write: x16_mutant_scanning_range
Impact: low
Show code
x16_mutant_scanning_range = 200
L283 🔴 global_write
Global write: x16_corpse_locations
Impact: low
Show code
x16_corpse_locations = {{
L363 🔴 global_write
Global write: red_forest_greh_locations
Impact: low
Show code
red_forest_greh_locations = {{
L380 🔴 global_write
Global write: red_forest_mutants_trigger
Impact: low
Show code
red_forest_mutants_trigger = {
L386 🔴 global_write
Global write: red_forest_mutants_trigger_range
Impact: low
Show code
red_forest_mutants_trigger_range = 5
L388 🔴 global_write
Global write: red_forest_explosion_locations
Impact: low
Show code
red_forest_explosion_locations = {{
L415 🔴 global_write
Global write: red_forest_mutant_locations
Impact: low
Show code
red_forest_mutant_locations = {{
L487 🔴 global_write
Global write: red_forest_isg_locations
Impact: low
Show code
red_forest_isg_locations = {{
L509 🔴 global_write
Global write: red_forest_actor_msg_trigger
Impact: low
Show code
red_forest_actor_msg_trigger = {
L516 🔴 global_write
Global write: red_forest_actor_msg_trigger_range
Impact: low
Show code
red_forest_actor_msg_trigger_range = 8
L518 🔴 global_write
Global write: outskirts_prometheus_location
Impact: low
Show code
outskirts_prometheus_location = {
L525 🔴 global_write
Global write: outskirts_greh_activation_distance
Impact: low
Show code
outskirts_greh_activation_distance = 230
L526 🔴 global_write
Global write: outskirts_greh_locations
Impact: low
Show code
outskirts_greh_locations = {{
L568 🔴 global_write
Global write: outskirts_mutant_locations
Impact: low
Show code
outskirts_mutant_locations = {{
L590 🔴 global_write
Global write: outskirts_prometheus_msg_trigger_distance
Impact: low
Show code
outskirts_prometheus_msg_trigger_distance = 28
L591 🔴 global_write
Global write: outskirts_anomaly_xz_data
Impact: low
Show code
outskirts_anomaly_xz_data = {{217.3464, 332.1511},{217.2378700635549, 335.6045785741122},{216.91270857229628, 339.04442784603674},{216.37219879007787, 342.45707230221484},{215.6184738620747, 345.829043794067},{214.65450839623344, 349.1470346906221},{213.4841067238538, 352.39795039765727},{212.11188788563106, 355.568961036079},{210.54326740241248, 358.6475520755943},{208.78443590261082, 361.6215737238448},{206.8423346906221, 364.479288876086},{204.7246283526684, 367.20941943617794},{202.43967450817763, 369.80119082607786},{199.99649082607786, 372.2443745081776},{197.4047194361779, 374.5293283526684},{194.674588876086, 376.6470346906221},{191.8168737238448, 378.5891359026108},{188.84285207559432, 380.3479674024125},{185.76426103607898, 381.9165878856311},{182.59325039765727, 383.28880672385384},{179.3423346906221, 384.4592083962334},{176.024343794067, 385.4231738620747},{172.65237230221484, 386.17689879007787},{169.23972784603671, 386.7174085722963},{165.79987857411223, 387.04257006355493},{162.3464, 387.1511},{158.89292142588775, 387.04257006355493},{155.45307215396326, 386.7174085722963},{152.04042769778513, 386.17689879007787},{148.66845620593298, 385.4231738620747},{145.35046530937788, 384.4592083962334},{142.0995496023427, 383.28880672385384},{138.928538963921, 381.91658788563103},{135.84994792440563, 380.34796740241245},{132.87592627615516, 378.5891359026108},{130.01821112391397, 376.6470346906221},{127.28808056382205, 374.5293283526684},{124.69630917392212, 372.2443745081776},{122.25312549182235, 369.80119082607786},{119.96817164733157, 367.2094194361779},{117.85046530937788, 364.479288876086},{115.90836409738915, 361.6215737238448},{114.1495325975875, 358.6475520755943},{112.58091211436891, 355.568961036079},{111.20869327614616, 352.39795039765727},{110.03829160376654, 349.1470346906221},{109.07432613792528, 345.829043794067},{108.3206012099221, 342.45707230221484},{107.7800914277037, 339.0444278460367},{107.45492993644505, 335.6045785741122},{107.34639999999999, 332.1511},{107.45492993644505, 328.69762142588775},{107.7800914277037, 325.25777215396323},{108.32060120992212, 321.84512769778513},{109.07432613792528, 318.473156205933},{110.03829160376654, 315.1551653093779},{111.20869327614616, 311.9042496023427},{112.58091211436891, 308.733238963921},{114.1495325975875, 305.65464792440565},{115.90836409738917, 302.6806262761552},{117.85046530937788, 299.82291112391397},{119.96817164733159, 297.09278056382203},{122.25312549182235, 294.5010091739221},{124.69630917392212, 292.05782549182237},{127.28808056382206, 289.77287164733156},{130.01821112391394, 287.6551653093779},{132.87592627615518, 285.7130640973891},{135.84994792440565, 283.9542325975875},{138.92853896392103, 282.3856121143689},{142.0995496023427, 281.01339327614613},{145.35046530937788, 279.84299160376656},{148.66845620593298, 278.8790261379253},{152.04042769778513, 278.1253012099221},{155.4530721539633, 277.5847914277037},{158.89292142588775, 277.25962993644504},{162.3464, 277.1511},{165.79987857411226, 277.25962993644504},{169.23972784603671, 277.5847914277037},{172.65237230221487, 278.1253012099221},{176.02434379406702, 278.8790261379253},{179.3423346906221, 279.84299160376656},{182.5932503976573, 281.0133932761462},{185.76426103607898, 282.3856121143689},{188.84285207559435, 283.9542325975875},{191.81687372384482, 285.7130640973892},{194.67458887608603, 287.6551653093779},{197.40471943617794, 289.7728716473316},{199.99649082607786, 292.05782549182237},{202.43967450817763, 294.5010091739221},{204.7246283526684, 297.09278056382203},{206.84233469062212, 299.82291112391397},{208.78443590261082, 302.6806262761552},{210.54326740241248, 305.65464792440565},{212.11188788563106, 308.733238963921},{213.4841067238538, 311.9042496023427},{214.65450839623344, 315.15516530937794},{215.6184738620747, 318.473156205933},{216.37219879007787, 321.84512769778513},{216.91270857229628, 325.2577721539633},{217.2378700635549, 328.69762142588775}}
L593 🔴 global_write
Global write: outskirts_endgame_greh_locations
Impact: low
Show code
outskirts_endgame_greh_locations = {{

baba_yaga_configs.script

L1 🔴 global_write
Global write: art_location
Impact: low
Show code
art_location = {
L7 🔴 global_write
Global write: teleport_to_location
Impact: low
Show code
teleport_to_location = {
L13 🔴 global_write
Global write: karlik_spots
Impact: low
Show code
karlik_spots = {{
L30 🔴 global_write
Global write: hag_spot
Impact: low
Show code
hag_spot = {
L37 🔴 global_write
Global write: art_sections
Impact: low
Show code
art_sections = {

big_game_configs.script

L1 🔴 global_write
Global write: small_giants_spots
Impact: low
Show code
small_giants_spots = {{
L18 🔴 global_write
Global write: big_giant_spot
Impact: low
Show code
big_giant_spot = {

dead_night_configs.script

L9 🔴 global_write
Global write: spawn_trigger
Impact: low
Show code
spawn_trigger = vector():set(-226.5967,4.5275,-317.1637)
L11 🔴 global_write
Global write: spawn_configs
Impact: low
Show code
spawn_configs = {{

house_of_horrors_configs.script

L1 🔴 global_write
Global write: house_location
Impact: low
Show code
house_location = {
L7 🔴 global_write
Global write: zombie_location
Impact: low
Show code
zombie_location = {
L14 🔴 global_write
Global write: dog_location
Impact: low
Show code
dog_location = {
L21 🔴 global_write
Global write: board_location
Impact: low
Show code
board_location = {
L29 🔴 global_write
Global write: hanged_man_location
Impact: low
Show code
hanged_man_location = {

mirage_configs.script

L1 🔴 global_write
Global write: teleport_activator_center_point
Impact: low
Show code
teleport_activator_center_point = vector():set(-423.5822,39.9999,-392.2540)
L2 🔴 global_write
Global write: teleport_activation_distance
Impact: low
Show code
teleport_activation_distance = 190
L4 🔴 global_write
Global write: first_spawn_activator
Impact: low
Show code
first_spawn_activator = vector():set(-350.9619,40.0389,-333.7500)
L5 🔴 global_write
Global write: first_spawn_activation_distance
Impact: low
Show code
first_spawn_activation_distance = 15
L6 🔴 global_write
Global write: first_spawn_spots
Impact: low
Show code
first_spawn_spots = {{
L23 🔴 global_write
Global write: second_spawn_activator
Impact: low
Show code
second_spawn_activator = vector():set(-409.0541,40.0467,-379.4803)
L24 🔴 global_write
Global write: second_spawn_activation_distance
Impact: low
Show code
second_spawn_activation_distance = 20
L25 🔴 global_write
Global write: second_spawn_spots
Impact: low
Show code
second_spawn_spots = {{
L42 🔴 global_write
Global write: third_spawn_activator
Impact: low
Show code
third_spawn_activator = vector():set(-407.9597,32.1984,-376.7980)
L43 🔴 global_write
Global write: third_spawn_activation_distance
Impact: low
Show code
third_spawn_activation_distance = 5
L44 🔴 global_write
Global write: third_spawn_spots
Impact: low
Show code
third_spawn_spots = {{
L56 🔴 global_write
Global write: sidor_spawn_activator
Impact: low
Show code
sidor_spawn_activator = vector():set(-404.8524,32.1999,-339.5040)
L57 🔴 global_write
Global write: sidor_spawn_activation_distance
Impact: low
Show code
sidor_spawn_activation_distance = 2
L59 🔴 global_write
Global write: med_table_spawn_config
Impact: low
Show code
med_table_spawn_config = {
L66 🔴 global_write
Global write: sidor_spawn_config
Impact: low
Show code
sidor_spawn_config = {
L74 🔴 global_write
Global write: sidor_controllers_configs
Impact: low
Show code
sidor_controllers_configs = {{
L86 🔴 global_write
Global write: burer_spawn_config
Impact: low
Show code
burer_spawn_config = {

modxml_nta.script

L61 🟢 uncached_globals_summary
Cache 1 globals in on_xml_read
Impact: medium
Show code
L63: pairs L79: pairs

mystery_of_the_swamps_configs.script

L1 🔴 global_write
Global write: stalker_squad_1_config
Impact: low
Show code
stalker_squad_1_config = {
L9 🔴 global_write
Global write: eco_squad_1_config
Impact: low
Show code
eco_squad_1_config = {
L17 🔴 global_write
Global write: aw_message_point
Impact: low
Show code
aw_message_point = vector():set(104.9109,-11.6276,166.1361)
L18 🔴 global_write
Global write: aw_message_activation_distance
Impact: low
Show code
aw_message_activation_distance = 75
L20 🔴 global_write
Global write: aw_karlik_configs
Impact: low
Show code
aw_karlik_configs = {{
L37 🔴 global_write
Global write: dead_ecolog_spawn_config
Impact: low
Show code
dead_ecolog_spawn_config = {
L44 🔴 global_write
Global write: garbage_karlik_configs
Impact: low
Show code
garbage_karlik_configs = {{
L61 🔴 global_write
Global write: garbage_ghost_configs
Impact: low
Show code
garbage_ghost_configs = {{
L69 🔴 global_write
Global write: dead_ecolog_2_spawn_config
Impact: low
Show code
dead_ecolog_2_spawn_config = {
L76 🔴 global_write
Global write: stalker_squad_2_configs
Impact: low
Show code
stalker_squad_2_configs = {
L84 🔴 global_write
Global write: stalker_squad_3_configs
Impact: low
Show code
stalker_squad_3_configs = {
L92 🔴 global_write
Global write: ds_ghosts_configs
Impact: low
Show code
ds_ghosts_configs = {{
L108 🔴 global_write
Global write: ds_swamp_trigger
Impact: low
Show code
ds_swamp_trigger = {
L114 🔴 global_write
Global write: ds_baba_yaga_config
Impact: low
Show code
ds_baba_yaga_config = {
L123 🔴 global_write
Global write: jupiter_campfire_config
Impact: low
Show code
jupiter_campfire_config = {
L132 🔴 global_write
Global write: jupiter_skeleton_config
Impact: low
Show code
jupiter_skeleton_config = {
L139 🔴 global_write
Global write: jupiter_karlik_activation_distance
Impact: low
Show code
jupiter_karlik_activation_distance = 105
L140 🔴 global_write
Global write: jupiter_karlik_configs
Impact: low
Show code
jupiter_karlik_configs = {{
L167 🔴 global_write
Global write: jupiter_ghost_activation_distance
Impact: low
Show code
jupiter_ghost_activation_distance = 48
L168 🔴 global_write
Global write: jupiter_ghost_configs
Impact: low
Show code
jupiter_ghost_configs = {{
L233 🔴 global_write
Global write: jupiter_baba_yaga_config
Impact: low
Show code
jupiter_baba_yaga_config = {
L242 🔴 global_write
Global write: jupiter_lost_soul_config
Impact: low
Show code
jupiter_lost_soul_config = {

new_tasks_addon_mcm.script

L2 🔴 global_write
Global write: config
Impact: low
Show code
config = {
L35 🔴 global_write
Global write: op
Impact: low
Show code
op = {

new_tasks_addon_tasks_utils.script

L116 🟢 table_insert_append
table.insert(t, v) -> t[#t+1] = v
Impact: high
Show code
table.insert(t, i)
L234 🟢 table_insert_append
table.insert(sim_stalkers[comm], v) -> sim_stalkers[comm][#sim_stalkers[comm]+1] = v
Impact: high
Show code
table.insert(sim_stalkers[comm], se_obj.id)
L190 🔴 global_write
Global write: southern_maps
Impact: low
Show code
southern_maps = {
L205 🔴 global_write
Global write: nothern_maps
Impact: low
Show code
nothern_maps = {
L217 🔴 global_write
Global write: sim_stalkers
Impact: low
Show code
sim_stalkers = nil
L219 🔴 global_write
Global write: sim_stalkers
Impact: low
Show code
sim_stalkers = {}
L335 🔴 global_write
Global write: levels
Impact: low
Show code
levels = {
L369 🔴 global_write
Global write: mcm_config
Impact: low
Show code
mcm_config = load_defaults()
L372 🔴 global_write
Global write: mcm_config
Impact: low
Show code
mcm_config = load_defaults()
L412 🔴 global_write
Global write: se_id
Impact: low
Show code
se_id = spawn_helicopter(true, vector():set(-178.07975769043,5.3180623054504,-181.78283691406))
L9 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_npc = k.object or k.id and sim:object(k.id)
L131 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check (auto-fixable)
Impact: low
Show code
return item and string.find(item:section(), "axe")
L148 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
local pos = obj:position()
L150 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
obj:force_set_position(pos, false)
L177 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local squad = sim:object(id)
L180 🟡 potential_nil_access
Potential nil access: 'squad' from :object() used without nil check
Impact: low
Show code
for k in squad:squad_members() do
L181 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_npc = k.object or k.id and sim:object(k.id)
L272 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check (auto-fixable)
Impact: low
Show code
return sim:level_name(gg:vertex(se_obj.m_game_vertex_id):level_id())

nta_utils.script

L61 🟢 table_insert_append
table.insert(tab_with_ids, v) -> tab_with_ids[#tab_with_ids+1] = v
Impact: high
Show code
table.insert(tab_with_ids, id)
L225 🟢 table_insert_append
table.insert(sim_stalkers[comm], v) -> sim_stalkers[comm][#sim_stalkers[comm]+1] = v
Impact: high
Show code
table.insert(sim_stalkers[comm], se_obj.id)
L411 🟢 table_insert_append
table.insert(particle_tab, v) -> particle_tab[#particle_tab+1] = v
Impact: high
Show code
table.insert(particle_tab, part)
L422 🟢 table_insert_append
table.insert(sound_tab, v) -> sound_tab[#sound_tab+1] = v
Impact: high
Show code
table.insert(sound_tab, snd)
L181 🔴 global_write
Global write: southern_maps
Impact: low
Show code
southern_maps = {
L196 🔴 global_write
Global write: northern_maps
Impact: low
Show code
northern_maps = {
L208 🔴 global_write
Global write: sim_stalkers
Impact: low
Show code
sim_stalkers = nil
L210 🔴 global_write
Global write: sim_stalkers
Impact: low
Show code
sim_stalkers = {}
L435 🔴 global_write
Global write: levels
Impact: low
Show code
levels = {
L539 🔴 global_write
Global write: story_ids
Impact: low
Show code
story_ids = {
L563 🔴 global_write
Global write: mcm_config
Impact: low
Show code
mcm_config = load_defaults()
L566 🔴 global_write
Global write: mcm_config
Impact: low
Show code
mcm_config = load_defaults()
L9 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_npc = k.object or k.id and sim:object(k.id)
L135 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check (auto-fixable)
Impact: low
Show code
return item and string.find(item:section(), "axe")
L153 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
local pos = obj:position()
L155 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
obj:force_set_position(pos, false)
L263 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check (auto-fixable)
Impact: low
Show code
return sim:level_name(gg:vertex(se_obj.m_game_vertex_id):level_id())

tasks_big_game.script

L35 🟡 potential_nil_access
Potential nil access: 'giant' from level.object_by_id() used without nil check
Impact: low
Show code
if giant and giant:alive() then
L48 🟡 potential_nil_access
Potential nil access: 'giant' from level.object_by_id() used without nil check
Impact: low
Show code
if giant and not giant:alive() then

tasks_dead_night.script

L49 🟢 table_insert_append
table.insert(state, v) -> state[#state+1] = v
Impact: high
Show code
table.insert(state, nta_utils.spawn_helper(spawn_config))
L56 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(iterations)

tasks_hold_the_ground.script

L41 🟡 potential_nil_access
Potential nil access: 'smart' from level.object_by_id() used without nil check
Impact: low
Show code
and db.actor:position():distance_to(smart:position()) < 15

tasks_intercept_artifact.script

L120 🟢 table_insert_append
table.insert(result, v) -> result[#result+1] = v
Impact: high
Show code
table.insert(result, p[i])

tasks_mirage.script

L101 🟢 table_insert_append
table.insert(state.enemy_ids, v) -> state.enemy_ids[#state.enemy_ids+1] = v
Impact: high
Show code
table.insert(state.enemy_ids, se_id)
L127 🟢 table_insert_append
table.insert(state.enemy_ids, v) -> state.enemy_ids[#state.enemy_ids+1] = v
Impact: high
Show code
table.insert(state.enemy_ids, nta_utils.spawn_helper(configs.burer_spawn_config))
L163 🟡 potential_nil_access
Potential nil access: 'active_item' from :active_item() used without nil check
Impact: low
Show code
sec = active_item:section()
L175 🟡 potential_nil_access
Potential nil access: 'npc' from level.object_by_id() used without nil check
Impact: low
Show code
npc:iterate_inventory(iterate)
L189 🟡 potential_nil_access
Potential nil access: 'npc' from level.object_by_id() used without nil check
Impact: low
Show code
npc:set_visual_name(get_actor_visual())

tasks_mystery_of_the_swamps.script

L36 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(state.dependency_task_finished_at and 'dep set' or 'dep not set')
L222 🟡 potential_nil_access
Potential nil access: 'campfire' from level.object_by_id() used without nil check
Impact: low
Show code
if campfire and campfire:get_campfire():is_on() then
L500 🟡 potential_nil_access
Potential nil access: 'mutant' from level.object_by_id() used without nil check
Impact: low
Show code
mutant:set_health_ex(0)

tasks_nta_stash.script

L58 🟢 table_insert_append
table.insert(result, v) -> result[#result+1] = v
Impact: high
Show code
table.insert(result, p[i])

tasks_skyfall.script

L212 🟢 repeated_who_section()
who:section() called 3x in physic_object_on_hit_callback
Impact: low
Show code
Cache who:section() result
L98 🟡 potential_nil_access
Potential nil access: 'heliObj' from :get_helicopter() used without nil check
Impact: low
Show code
if heliObj:GetfHealth() <= 0 then
L99 🟡 potential_nil_access
Potential nil access: 'heliObj' from :get_helicopter() used without nil check
Impact: low
Show code
heliObj:Die()
L100 🟡 potential_nil_access
Potential nil access: 'heliObj' from :get_helicopter() used without nil check
Impact: low
Show code
heliObj:Explode() -- explode immediately to make sure that it does not stay alive under the map

tasks_the_living_fire.script

L53 🟢 table_insert_append
table.insert(state.anomaly_ids, v) -> state.anomaly_ids[#state.anomaly_ids+1] = v
Impact: high
Show code
table.insert(state.anomaly_ids, nta_utils.spawn_helper(configs.garbage_zhar_location))
L69 🟢 table_insert_append
table.insert(state.enemy_ids, v) -> state.enemy_ids[#state.enemy_ids+1] = v
Impact: high
Show code
table.insert(state.enemy_ids, nta_utils.spawn_helper(configs.garbage_mutant_location))
L363 🟢 table_insert_append
table.insert(state.anomaly_ids, v) -> state.anomaly_ids[#state.anomaly_ids+1] = v
Impact: high
Show code
table.insert(state.anomaly_ids, nta_utils.spawn_helper(spawn_config))
L493 🟢 table_insert_append
table.insert(state.enemy_ids, v) -> state.enemy_ids[#state.enemy_ids+1] = v
Impact: high
Show code
table.insert(state.enemy_ids, id)
L523 🟢 table_insert_append
table.insert(state.anomaly_ids, v) -> state.anomaly_ids[#state.anomaly_ids+1] = v
Impact: high
Show code
table.insert(state.anomaly_ids, nta_utils.spawn_helper(anomaly_location))
L541 🟢 table_insert_append
table.insert(state.enemy_ids, v) -> state.enemy_ids[#state.enemy_ids+1] = v
Impact: high
Show code
table.insert(state.enemy_ids, id)
L365 🟡 potential_nil_access
Potential nil access: 'mutant' from level.object_by_id() used without nil check
Impact: low
Show code
nta_utils.spawn_sound_at_position([[monsters\boar\boar_anomaly_0]], mutant:position())
L366 🟡 potential_nil_access
Potential nil access: 'mutant' from level.object_by_id() used without nil check
Impact: low
Show code
nta_utils.spawn_sound_at_position([[new_tasks_addon\zhar_blow]], mutant:position())
L368 🟡 potential_nil_access
Potential nil access: 'mutant' from level.object_by_id() used without nil check
Impact: low
Show code
safe_release_manager.release({id = mutant:id()})
L482 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
if obj and obj:alive() then
L688 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
local sec = wpn:section()

tasks_urgent_orders.script

L68 🟡 potential_nil_access
Potential nil access: 'smart' from level.object_by_id() used without nil check
Impact: low
Show code
and nta_utils.actor_in_range(smart:position(), 60)

z_nta_stashes_utils.script

L19 🟢 table_insert_append
table.insert(stashes_by_level[lvl], v) -> stashes_by_level[lvl][#stashes_by_level[lvl]+1] = v
Impact: high
Show code
table.insert(stashes_by_level[lvl], id)
L2 🔴 global_write
Global write: stashes_by_level
Impact: low
Show code
stashes_by_level = {}
L11 🔴 global_write
Global write: stashes_by_level
Impact: low
Show code
stashes_by_level = {}

404- DesertTech MDR Pack - Andtheherois & Bert

3 files (🟢2 🟡7 🔴25 🔵2)

animation_common.script

L31 🟢 table_insert_append
table.insert(anim_mutators, v) -> anim_mutators[#anim_mutators+1] = v
Impact: high
Show code
table.insert(anim_mutators, {functor=functor, priority=priority})
L88 🟢 repeated_item_section()
item:section() called 3x in actor_on_hud_animation_play
Impact: low
Show code
Cache item:section() result

uni_anim_detectors.script

L14 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = false
L18 🔴 global_write
Global write: fdda_anim_prepare
Impact: low
Show code
fdda_anim_prepare = enhanced_animations.anim_prepare
L20 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L24 🔴 global_write
Global write: fdda_call_my_slot_back
Impact: low
Show code
fdda_call_my_slot_back = enhanced_animations.call_my_slot_back
L28 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = false
L33 🔴 global_write
Global write: fdda_bp_call_my_slot_back
Impact: low
Show code
fdda_bp_call_my_slot_back = zzz_ea_addon_backpack.call_my_slot_back
L37 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = false
L50 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L63 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L71 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L85 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L98 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L113 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L167 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = false
L122 🟡 potential_nil_access
Potential nil access: 'player_detector' from :active_detector() used without nil check
Impact: low
Show code
if player_detector and item:id() == player_detector:id() then
L160 🟡 potential_nil_access
Potential nil access: 'player_wpn' from :active_item() used without nil check
Impact: low
Show code
player_wpn and is_state_valid[player_wpn:get_state()]

utjan_mag_check.script

L15 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!Old mag check script (ammo_check_mcm) detected. Remove it to get full features of mag checks")
L107 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!Old mag check script (ammo_check_mcm) detected. Remove it to get full features of mag checks")
L3 🔴 global_write
Global write: do_ammo_check_anim
Impact: low
Show code
do_ammo_check_anim = nil
L4 🔴 global_write
Global write: wpn_checking
Impact: low
Show code
wpn_checking, det_active = nil
L4 🔴 global_write
Global write: det_active
Impact: low
Show code
wpn_checking, det_active = nil
L7 🔴 global_write
Global write: base_check_Ammo
Impact: low
Show code
base_check_Ammo = ammo_check_mcm.check_Ammo
L63 🔴 global_write
Global write: do_ammo_check_anim
Impact: low
Show code
do_ammo_check_anim = 1
L65 🔴 global_write
Global write: det_active
Impact: low
Show code
det_active = db.actor:active_detector() or nil
L80 🔴 global_write
Global write: wpn_checking
Impact: low
Show code
wpn_checking = nil
L81 🔴 global_write
Global write: do_ammo_check_anim
Impact: low
Show code
do_ammo_check_anim = nil
L86 🔴 global_write
Global write: det_active
Impact: low
Show code
det_active = nil
L90 🔴 global_write
Global write: wpn_checking
Impact: low
Show code
wpn_checking = obj
L102 🔴 global_write
Global write: do_ammo_check_anim
Impact: low
Show code
do_ammo_check_anim = 2
L28 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local currentState = weapon:get_state()
L29 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
if not (currentState == 0 or weapon:weapon_in_grenade_mode()) then
L35 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local currentAmmo = weapon:get_ammo_in_magazine()
L41 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local anm_ammo_check = common.has_animation(weapon:section(), "anm_ammo_check")
L64 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
weapon:switch_state(4)

406- Random RPK Reanimation - Firebreath

3 files (🟢2 🟡10 🔴16 🔵3)

jam_animations.script

L25 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
local hudSection = SYS_GetParam(0, item:section(), "hud", item:section())
L25 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
local hudSection = SYS_GetParam(0, item:section(), "hud", item:section())
L30 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
local ammo = item:get_ammo_in_magazine()
L42 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
item:play_hud_motion(animName, true, 4, 1, 0)

loadouts_injector.script

L131 🟢 uncached_globals_summary
Cache 1 globals in xrs_rnd_npc_loadout.create_item_on_npc
Impact: medium
Show code
L159: math.random L163: math.random
L189 🟢 uncached_globals_summary
Cache 1 globals in create_item
Impact: medium
Show code
L202: math.random L205: math.random
L222 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR: NPC Loadouts | wrong ammo_type set for [%s], missing value in ammo_class", section)
L52 🔴 global_write
Global write: tmp
Impact: low
Show code
tmp = ini_loadouts:r_string_ex("settings","scope_chance")
L54 🔴 global_write
Global write: tmp
Impact: low
Show code
tmp = str_explode(tmp,",")
L74 🔴 global_write
Global write: tmp
Impact: low
Show code
tmp = str_explode(id,":")
L92 🔴 global_write
Global write: tokens
Impact: low
Show code
tokens = str_explode(loadout, "_")
L106 🔴 global_write
Global write: faction
Impact: low
Show code
faction, rank, slot = unpack(tokens)
L106 🔴 global_write
Global write: rank
Impact: low
Show code
faction, rank, slot = unpack(tokens)
L106 🔴 global_write
Global write: slot
Impact: low
Show code
faction, rank, slot = unpack(tokens)
L107 🔴 global_write
Global write: slot
Impact: low
Show code
slot = slots[slot]
L117 🔴 global_write
Global write: l
Impact: low
Show code
l = custom_loadouts[faction][rank][slot]
L130 🔴 global_write
Global write: CreateItem
Impact: low
Show code
CreateItem = xrs_rnd_npc_loadout.create_item_on_npc
L177 🔴 global_write
Global write: id
Impact: low
Show code
id = custom_tbl[pick]
L115 🟡 unused_local_variable
Local variable 'value' is assigned but never used
Impact: low
Show code
local _, id, value = ini_wep_loadouts:r_line_ex(weapons,i)

utjan_mag_check.script

L14 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!Old mag check script (ammo_check_mcm) detected. Remove it to get full features of mag checks")
L90 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!Old mag check script (ammo_check_mcm) detected. Remove it to get full features of mag checks")
L3 🔴 global_write
Global write: do_ammo_check_anim
Impact: low
Show code
do_ammo_check_anim = nil
L6 🔴 global_write
Global write: base_check_Ammo
Impact: low
Show code
base_check_Ammo = ammo_check_mcm.check_Ammo
L62 🔴 global_write
Global write: do_ammo_check_anim
Impact: low
Show code
do_ammo_check_anim = 1
L66 🔴 global_write
Global write: do_ammo_check_anim
Impact: low
Show code
do_ammo_check_anim = nil
L86 🔴 global_write
Global write: do_ammo_check_anim
Impact: low
Show code
do_ammo_check_anim = 2
L27 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local currentState = weapon:get_state()
L28 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
if not (currentState == 0 or weapon:weapon_in_grenade_mode()) then
L34 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local currentAmmo = weapon:get_ammo_in_magazine()
L40 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local anm_ammo_check = common.has_animation(weapon:section(), "anm_ammo_check")
L63 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
weapon:switch_state(4)

409- Mark Switch - party50 & meowie

2 files (🟢2 🟡0 🔴1 🔵0)

z_mark_switch.script

L111 🟢 repeated_get_console
get_console called 3x in update_shader
Impact: low
Show code
local console = get_console()
L159 🟢 repeated_wpn_id()
wpn:id() called 2x in actor_on_update
Impact: low
Show code
Cache wpn:id() result

z_mark_switch_mcm.script

L15 🔴 global_write
Global write: op
Impact: low
Show code
op = {

41- LowerSprintAnimaiton - Skieppy

1 file (🟢1 🟡1 🔴0 🔵0)

lower_weapon_sprint.script

L257 🟢 repeated_wpn_section()
wpn:section() called 5x in actor_on_update
Impact: low
Show code
Cache wpn:section() result
L240 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
local state = wpn:get_state()

410- 3DSS for GAMMA - Redotix99 & Andtheherois & party50

9 files (🟢5 🟡5 🔴7 🔵8)

lewd_lens_hider.script

L39 🟢 repeated_obj_section()
obj:section() called 3x in game_object_on_net_spawn
Impact: low
Show code
Cache obj:section() result
L68 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[LEWD LENS HIDER] ERROR | Game Object Net Spawn | Error with object with ID %s, the object was not found. Aborting...", id)
L191 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[LEWD LENS HIDER] ERROR | Get Information | Error with object with ID %s, the object was not found", id)
L197 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[LEWD LENS HIDER] ERROR | Get Information | Error with object with name %s, the object failed to cast as a weapon", obj:name())
L203 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[LEWD LENS HIDER] ERROR | Get Information | Error with object with name %s, the config %s was not defined", obj:name(), CONFIG_KEY_BONE_NAME)
L209 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[LEWD LENS HIDER] ERROR | Get Information | Error with object with name %s, the config %s should have %s elements, except it has %s", obj:name(), CONFIG_KEY_AIM_MODE, 3, size_table(aim_modes))
L236 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[LEWD LENS HIDER] ERROR | Get Delays | Error with object with name %s, the config %s should have %s elements, except it has %s", obj:name(), CONFIG_KEY_AIM_MODE, 2, size_table(delays))
L256 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L45 🟡 potential_nil_access
Potential nil access: 'parent' from :parent() used without nil check
Impact: low
Show code
if not parent or parent:id() ~= AC_ID then

magnifier_switch.script

L4 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
if settings.debug then printf("[magnifier_switch] "..str, ...) end
L220 🔴 global_write
Global write: og_play_item_sound
Impact: low
Show code
og_play_item_sound = itms_manager.play_item_sound
L145 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
local sec = wpn and wpn:section()
L188 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
local sec = wpn and wpn:section()

magnifier_switch_mcm.script

L1 🔴 global_write
Global write: defaults
Impact: low
Show code
defaults = {

no_laser_while_ads_mcm.script

L2 🔴 global_write
Global write: op
Impact: low
Show code
op = {

z_3d_scopes.script

L144 🟢 repeated_get_console
get_console called 4x in update_shader
Impact: low
Show code
local console = get_console()
L182 🟢 repeated_wpn_id()
wpn:id() called 2x in actor_on_update
Impact: low
Show code
Cache wpn:id() result
L142 🔴 global_write
Global write: info
Impact: low
Show code
info = parse_parameters(wpn)

z_3d_scopes_mcm.script

L20 🔴 global_write
Global write: op
Impact: low
Show code
op = {

z_mark_switch.script

L120 🟢 repeated_get_console
get_console called 3x in update_shader
Impact: low
Show code
local console = get_console()
L168 🟢 repeated_wpn_id()
wpn:id() called 2x in actor_on_update
Impact: low
Show code
Cache wpn:id() result

z_mark_switch_mcm.script

L15 🔴 global_write
Global write: op
Impact: low
Show code
op = {

zzz_bas_laser_control.script

L25 🔴 global_write
Global write: CloneWep
Impact: low
Show code
CloneWep = _G.alife_clone_weapon
L41 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
local section = wpn and wpn:section()
L76 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
local section = wpn and wpn:section()

412- Busyhands Detection and Blame - RavenAscendant

1 file (🟢1 🟡0 🔴3 🔵12)

a_rax_wd.script

L68 🟢 uncached_globals_summary
Cache 1 globals in make_callback_watcher
Impact: medium
Show code
L73: type L75: type
L40 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![axr_main callback_set] trying to set callback %s to nil function!",name)
L93 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! [RAX WD] can't make callback to non existing intercept %s! how did we get here?!?!?",name)
L126 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
RegisterScriptCallback("actor_on_update", function() if tmr2 then return end tmr2 = os.time() + 1 while os.time() < tmr2 do printf( os.time()) flush() end end ) --causes a busy hands type 1 hang that clears during the save lockout
L204 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! [RAX WD] Callback %s hung for > %s milliseconds!", name , time_global() -info.tmr )
L206 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! [RAX WD] Offending callback at line: %s of script:%s",dbug and dbug.linedefined, dbug and dbug.short_src)
L209 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! [RAX WD] Callback should be called on object but was not")
L213 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! [RAX WD] Callback called on object. ID: %s Sec: %s, game object %s, server object %s", npc_id[1], npc_id[2], obj and "found" or "not found", se_obj and "found" or "not found")
L218 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! [RAX WD] Saving game.")
L230 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! [RAX WD] Event %s, %s hung for > %s milliseconds!", last_event.event_id,last_event.action_id, time_global() - last_event.tmr)
L232 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! [RAX WD] Offending event at line: %s of script:%s",info and info.linedefined, info and info.short_src)
L234 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! [RAX WD] Saving game.")
L243 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! [RAX WD] Hang cleared during save. Resetting tracking.")
L34 🔴 global_write
Global write: base_calback_set
Impact: low
Show code
base_calback_set = axr_main.callback_set
L49 🔴 global_write
Global write: base_callback_unset
Impact: low
Show code
base_callback_unset = axr_main.callback_unset
L57 🔴 global_write
Global write: base_make_callback
Impact: low
Show code
base_make_callback = axr_main.make_callback

413- Milspec PDA - Catspaw

13 files (🟢11 🟡27 🔴112 🔵22)

catsy_milpda_mcm.script

L40 🔴 global_write
Global write: op
Impact: low
Show code
op = { id = "milpda", gr={
L291 🟡 unused_local_variable
Local variable 'head' is assigned but never used
Impact: low
Show code
local head = xml:InitStatic("box",anchor)
L294 🟡 unused_local_variable
Local variable 'tbox2' is assigned but never used
Impact: low
Show code
local tbox2 = xml:InitTextWnd("box",tbg1)

ish_kill_tracker.script

L601 🟢 string_len
string.len(ic) -> #ic
Impact: low
Show code
if (string.len(ic) == 4) then
L586 🟢 uncached_globals_summary
Cache 1 globals in on_option_change
Impact: medium
Show code
L610: tonumber L615: tonumber
L145 🟢 repeated_obj_section()
obj:section() called 4x in safename
Impact: low
Show code
Cache obj:section() result
L171 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(utils_catspaw_common.logdiv ..
L179 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(utils_catspaw_common.logdiv .. logprefix .. "End of kill database dump")
L7 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "1.15.0"
L8 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20250717
L22 🔴 global_write
Global write: debuglogs
Impact: low
Show code
debuglogs = false -- Debug logging for troubleshooting issues - this should always be "false" in the release version
L23 🔴 global_write
Global write: verbose
Impact: low
Show code
verbose = false -- Noisier verbose logging - no effect if debuglogs is false
L24 🔴 global_write
Global write: logprefix
Impact: low
Show code
logprefix = "[MPDA:KT] "
L53 🔴 global_write
Global write: styles
Impact: low
Show code
styles = {
L60 🔴 global_write
Global write: default_style
Impact: low
Show code
default_style = styles.whtx
L61 🔴 global_write
Global write: default_style_actor
Impact: low
Show code
default_style_actor = styles.whtx
L62 🔴 global_write
Global write: default_style_other
Impact: low
Show code
default_style_other = styles.sdot
L63 🔴 global_write
Global write: default_style_force
Impact: low
Show code
default_style_force = nil
L64 🔴 global_write
Global write: clear_on_loot
Impact: low
Show code
clear_on_loot = true
L65 🔴 global_write
Global write: use_paw_icon
Impact: low
Show code
use_paw_icon = false
L96 🔴 global_write
Global write: tracking_mode
Impact: low
Show code
tracking_mode = 3
L108 🔴 global_write
Global write: monster_tracking_mode
Impact: low
Show code
monster_tracking_mode = 3
L114 🔴 global_write
Global write: tracked_bodies
Impact: low
Show code
tracked_bodies = {}
L167 🔴 global_write
Global write: ktype
Impact: low
Show code
ktype = string.format("Stalker (%s)", v.comm)
L169 🔴 global_write
Global write: ktype
Impact: low
Show code
ktype = "Monster"
L559 🔴 global_write
Global write: clear_on_loot
Impact: low
Show code
clear_on_loot = true
L563 🔴 global_write
Global write: clear_on_loot
Impact: low
Show code
clear_on_loot = false
L582 🔴 global_write
Global write: tracked_bodies
Impact: low
Show code
tracked_bodies = {}
L608 🔴 global_write
Global write: debuglogs
Impact: low
Show code
debuglogs = get_mcm("milpda/milpdagen/debuglogs", debuglogs)
L609 🔴 global_write
Global write: verbose
Impact: low
Show code
verbose = get_mcm("milpda/milpdagen/verbose", verbose)
L610 🔴 global_write
Global write: tracking_mode
Impact: low
Show code
tracking_mode = tonumber(ui_mcm.get("milpda/milpdagen/tracking_mode"))
L625 🔴 global_write
Global write: monster_tracking_mode
Impact: low
Show code
monster_tracking_mode = tonumber(ui_mcm.get("milpda/milpdagen/monster_tracking_mode"))
L634 🔴 global_write
Global write: default_style_actor
Impact: low
Show code
default_style_actor = ((not pba) and mode_bi) or default_style_actor
L635 🔴 global_write
Global write: default_style_other
Impact: low
Show code
default_style_other = ((not pbo) and mode_bio) or default_style_other
L638 🔴 global_write
Global write: clear_on_loot
Impact: low
Show code
if autoclear ~= nil then clear_on_loot = autoclear end
L333 🟡 potential_nil_access
Potential nil access: 'pda' from :item_in_slot() used without nil check
Impact: low
Show code
if pda and pda_shows_kills(pda:section()) then
L45 🟡 unused_local_variable
Local variable 'game_time_now' is assigned but never used
Impact: low
Show code
local game_time_now = game.get_game_time
L46 🟡 unused_local_variable
Local variable 'level_start' is assigned but never used
Impact: low
Show code
local level_start = level.get_start_time
L49 🟡 unused_local_variable
Local variable 'pri_task_mapspot' is assigned but never used
Impact: low
Show code
local pri_task_mapspot = "storyline_task_location"
L50 🟡 unused_local_variable
Local variable 'sec_task_mapspot' is assigned but never used
Impact: low
Show code
local sec_task_mapspot = "secondary_task_location"
L95 🟡 unused_local_variable
Local variable 'pda_data_notify' is assigned but never used
Impact: low
Show code
local pda_data_notify = true
L165 🟡 unused_local_variable
Local variable 'kt' is assigned but never used
Impact: low
Show code
local kt = "Unknown entity"
L186 🟡 unused_local_variable
Local variable 'sec' is assigned but never used
Impact: low
Show code
local sec = victim:section() or "unknown"
L228 🟡 unused_local_variable
Local variable 'paw_allowed' is assigned but never used
Impact: low
Show code
local paw_allowed = false
L399 🟡 unused_local_variable
Local variable 'tg' is assigned but never used
Impact: low
Show code
local tg = time_global()

item_milpda.script

L601 🟢 uncached_globals_summary
Cache 2 globals in load_mcm
Impact: medium
Show code
L609: tonumber L631: tonumber L622: pairs L629: pairs
L563 🟡 string_concat_in_loop
String concat in loop: rs = rs .. x
Impact: critical
Show code
rs = rs..","..mat..","..ct
L34 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%sMilspec PDA v%s (rel %s) began initialization at tg %s", logprefix, script_version, release_date, time_global())
L18 🔴 global_write
Global write: script_name
Impact: low
Show code
script_name = "item_milpda"
L19 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "1.15.0"
L20 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20250717
L31 🔴 global_write
Global write: debuglogs
Impact: low
Show code
debuglogs = false -- Debug logging for troubleshooting issues - this should always be "false" in the release version
L32 🔴 global_write
Global write: verbose
Impact: low
Show code
verbose = false -- Noisier verbose logging - no effect if debuglogs is false
L33 🔴 global_write
Global write: logprefix
Impact: low
Show code
logprefix = "[MPDA] "
L54 🔴 global_write
Global write: no_blacklist_prog
Impact: low
Show code
no_blacklist_prog = true -- Cannot gain progressive data for blacklisted factions
L55 🔴 global_write
Global write: progressive_vis
Impact: low
Show code
progressive_vis = false
L56 🔴 global_write
Global write: update_interval
Impact: low
Show code
update_interval = 873 -- Weird number to avoid perf hit from stacking 1000ms updates with other addons
L57 🔴 global_write
Global write: access_resets
Impact: low
Show code
access_resets = false
L58 🔴 global_write
Global write: only_enemy_resets
Impact: low
Show code
only_enemy_resets = true
L59 🔴 global_write
Global write: only_enemy_unlock
Impact: low
Show code
only_enemy_unlock = false
L60 🔴 global_write
Global write: show_squadmate_mapspots
Impact: low
Show code
show_squadmate_mapspots = false
L61 🔴 global_write
Global write: progress_gain_mode
Impact: low
Show code
progress_gain_mode = 1
L62 🔴 global_write
Global write: access_time
Impact: low
Show code
access_time = 7
L63 🔴 global_write
Global write: access_unit
Impact: low
Show code
access_unit = "d"
L64 🔴 global_write
Global write: timer_mult
Impact: low
Show code
timer_mult = {
L70 🔴 global_write
Global write: reset_time_coef
Impact: low
Show code
reset_time_coef = timer_mult[access_unit]
L71 🔴 global_write
Global write: tracking_mode
Impact: low
Show code
tracking_mode = 1
L75 🔴 global_write
Global write: first_update
Impact: low
Show code
first_update = false
L76 🔴 global_write
Global write: pda_inv_item
Impact: low
Show code
pda_inv_item = "device_pda_milspec" -- Don't change this
L83 🔴 global_write
Global write: found_npc_pda
Impact: low
Show code
found_npc_pda = {}
L90 🔴 global_write
Global write: pda_defs
Impact: low
Show code
pda_defs = {
L133 🔴 global_write
Global write: ranks_by_name
Impact: low
Show code
ranks_by_name = {
L259 🔴 global_write
Global write: fd
Impact: low
Show code
fd = faction_data
L265 🔴 global_write
Global write: pda_craft_string
Impact: low
Show code
pda_craft_string = {
L606 🔴 global_write
Global write: debuglogs
Impact: low
Show code
debuglogs = get_mcm("milpda/milpdagen/debuglogs", debuglogs)
L607 🔴 global_write
Global write: verbose
Impact: low
Show code
verbose = get_mcm("milpda/milpdagen/verbose", verbose)
L609 🔴 global_write
Global write: tracking_mode
Impact: low
Show code
tracking_mode = tonumber(get_mcm("milpda/milpdagen/tracking_mode", tracking_mode or 0))
L615 🔴 global_write
Global write: show_squadmate_mapspots
Impact: low
Show code
show_squadmate_mapspots = get_mcm("milpda/milpdagen/squadmate_mapspots", show_squadmate_mapspots)
L654 🔴 global_write
Global write: progressive_vis
Impact: low
Show code
progressive_vis = get_mcm("milpda/progressive/enabled", progressive_vis)
L656 🔴 global_write
Global write: access_resets
Impact: low
Show code
access_resets = get_mcm("milpda/progressive/access_resets", access_resets)
L657 🔴 global_write
Global write: progress_gain_mode
Impact: low
Show code
progress_gain_mode = get_mcm("milpda/progressive/gain_mode", progress_gain_mode)
L658 🔴 global_write
Global write: access_time
Impact: low
Show code
access_time = get_mcm("milpda/progressive/access_time", access_time)
L659 🔴 global_write
Global write: access_unit
Impact: low
Show code
access_unit = get_mcm("milpda/progressive/access_unit", access_unit)
L660 🔴 global_write
Global write: only_enemy_unlock
Impact: low
Show code
only_enemy_unlock = get_mcm("milpda/progressive/only_enemy_unlock", only_enemy_unlock)
L661 🔴 global_write
Global write: only_enemy_resets
Impact: low
Show code
only_enemy_resets = get_mcm("milpda/progressive/only_enemy_resets", only_enemy_resets)
L662 🔴 global_write
Global write: no_blacklist_prog
Impact: low
Show code
no_blacklist_prog = get_mcm("milpda/progressive/noblacklist", no_blacklist_prog)
L663 🔴 global_write
Global write: reset_time_coef
Impact: low
Show code
reset_time_coef = (timer_mult[access_unit] or 1) * (access_mode or 1)
L664 🔴 global_write
Global write: reset_time_coef
Impact: low
Show code
if (not reset_time_coef) or (reset_time_coef < 1) then reset_time_coef = 1 end
L805 🔴 global_write
Global write: first_update
Impact: low
Show code
first_update = true
L830 🔴 global_write
Global write: fd
Impact: low
Show code
fd = mpda.faction_data
L318 🟡 potential_nil_access
Potential nil access: 'dev' from :item_in_slot() used without nil check
Impact: low
Show code
local sec = dev and dev:section()
L402 🟡 potential_nil_access
Potential nil access: 'dev' from :item_in_slot() used without nil check
Impact: low
Show code
local sec = dev and dev:section()

modxml_map_spots_milpda.script

L36 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("DXML is patching mapspots for %s in %s",addon_name,xml_file_name)
L28 🔴 global_write
Global write: addon_name
Impact: low
Show code
addon_name = "Milspec PDA"

utils_catspaw_common.script

L197 🟢 uncached_globals_summary
Cache 1 globals in to_bool
Impact: medium
Show code
L198: type L200: type
L278 🟢 uncached_globals_summary
Cache 1 globals in get_next_tg_interval
Impact: medium
Show code
L281: tonumber L282: tonumber
L592 🟢 uncached_globals_summary
Cache 1 globals in import_metatable
Impact: medium
Show code
L603: type L612: type
L47 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf((caller.logprefix or logprefix) .. logtext, ...)
L56 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf((caller.logprefix or logprefix) .. (caller.vprefix or vprefix) .. logtext, ...)
L66 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf((raw_prefix or "") .. logtext, ...)
L133 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( "! Modded exes not detected! No extra features available.\n" ..
L139 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(logdiv .. "@ Modded exes %s feature support (GAMMA: %s)", exes_version, using_gamma_modpack)
L141 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s %s (added %s): %s", v.enabled and "-" or "!", v.name, v.ver, v.func())
L143 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(logdiv)
L497 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! ERROR: no INI filename passed to %s.load_file_data%s, cannot continue!", script_name, args.called_by and (" by " ..args.called_by) or "")
L502 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
local function dl(s, ...) return log and printf(s, ...) end
L627 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Loaded %s v%s (rel %s)", script_name, script_version, release_date)
L4 🔴 global_write
Global write: script_name
Impact: low
Show code
script_name = "utils_catspaw_common"
L5 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "1.15"
L6 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20250530
L73 🔴 global_write
Global write: debuglogs
Impact: low
Show code
debuglogs = false
L74 🔴 global_write
Global write: verbose
Impact: low
Show code
verbose = false
L75 🔴 global_write
Global write: logprefix
Impact: low
Show code
logprefix = "[CatsyUtils] " -- gets prefixed, optional
L76 🔴 global_write
Global write: vprefix
Impact: low
Show code
vprefix = "[V] " -- gets added to verbose log entries, optional
L94 🔴 global_write
Global write: debuglogs
Impact: low
Show code
if (debug_en ~= nil) then debuglogs = debug_en end
L95 🔴 global_write
Global write: verbose
Impact: low
Show code
if (verbose_en ~= nil) then verbose = verbose_en end
L101 🔴 global_write
Global write: logdiv
Impact: low
Show code
logdiv = "~ ------------------------------------------------------------------------\n"
L107 🔴 global_write
Global write: engine_features
Impact: low
Show code
engine_features = {
L119 🔴 global_write
Global write: using_gamma_modpack
Impact: low
Show code
using_gamma_modpack = game_version:find("G.A.M.M.A.") and true or false
L121 🔴 global_write
Global write: using_modded_exes
Impact: low
Show code
using_modded_exes = using_gamma_modpack or exes_version and true or false
L245 🔴 global_write
Global write: easing
Impact: low
Show code
easing = {
L401 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
max_weight = max_weight + (outfit and outfit:get_additional_max_weight() or 0)
L404 🟡 potential_nil_access
Potential nil access: 'backpack' from :item_in_slot() used without nil check
Impact: low
Show code
max_weight = max_weight + (backpack and backpack:get_additional_max_weight() or 0)
L572 🟡 unused_local_variable
Local variable 'def_ltx' is assigned but never used
Impact: low
Show code
local def_ltx = def_ini and def_ini:get_sections(true)

utils_catspaw_mapspots.script

L154 🟢 uncached_globals_summary
Cache 1 globals in get_argb
Impact: medium
Show code
L158: tonumber L159: tonumber
L217 🟢 uncached_globals_summary
Cache 1 globals in get_mapspot_texture_data
Impact: medium
Show code
L267: tonumber L268: tonumber
L279 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Loaded %s v%s (rel %s)", script_name, script_version, release_date)
L4 🔴 global_write
Global write: script_name
Impact: low
Show code
script_name = "utils_catspaw_mapspots"
L5 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "1.1"
L6 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20250406
L35 🔴 global_write
Global write: logprefix
Impact: low
Show code
logprefix = "[Catsy:Mapspots] "
L36 🔴 global_write
Global write: debuglogs
Impact: low
Show code
debuglogs = false
L37 🔴 global_write
Global write: verbose
Impact: low
Show code
verbose = false
L38 🔴 global_write
Global write: vprefix
Impact: low
Show code
vprefix = ""
L54 🔴 global_write
Global write: debuglogs
Impact: low
Show code
if (debug_en ~= nil) then debuglogs = debug_en end
L55 🔴 global_write
Global write: verbose
Impact: low
Show code
if (verbose_en ~= nil) then verbose = verbose_en end
L66 🔴 global_write
Global write: task_mapspot_whitelist
Impact: low
Show code
task_mapspot_whitelist = {
L73 🔴 global_write
Global write: mapspot_data_cache
Impact: low
Show code
mapspot_data_cache = {}
L219 🔴 global_write
Global write: mapspot_data_cache
Impact: low
Show code
mapspot_data_cache = {}

utils_catspaw_text.script

L221 🟢 uncached_globals_summary
Cache 1 globals in csv_argb_to_tbl
Impact: medium
Show code
L230: tonumber L231: tonumber
L330 🟢 uncached_globals_summary
Cache 2 globals in int_to_rgba
Impact: medium
Show code
L338: bit.band L339: bit.band L338: bit.rshift L339: bit.rshift
L794 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Loaded %s v%s (rel %s)", script_name, script_version, release_date)
L4 🔴 global_write
Global write: script_name
Impact: low
Show code
script_name = "utils_catspaw_text"
L5 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "1.11"
L6 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20250717
L37 🔴 global_write
Global write: debuglogs
Impact: low
Show code
debuglogs = false
L38 🔴 global_write
Global write: verbose
Impact: low
Show code
verbose = false
L39 🔴 global_write
Global write: logprefix
Impact: low
Show code
logprefix = "[CatsyText] "
L40 🔴 global_write
Global write: vprefix
Impact: low
Show code
vprefix = ""
L56 🔴 global_write
Global write: debuglogs
Impact: low
Show code
if (debug_en ~= nil) then debuglogs = debug_en end
L57 🔴 global_write
Global write: verbose
Impact: low
Show code
if (verbose_en ~= nil) then verbose = verbose_en end
L82 🔴 global_write
Global write: tokens_generated
Impact: low
Show code
tokens_generated = false
L296 🔴 global_write
Global write: state_tokens
Impact: low
Show code
state_tokens = {}
L297 🔴 global_write
Global write: state_colors
Impact: low
Show code
state_colors = {
L420 🔴 global_write
Global write: wpo_thresholds
Impact: low
Show code
wpo_thresholds = {
L768 🔴 global_write
Global write: safename
Impact: low
Show code
safename = bestname -- alias for backwards compatibility
L75 🟡 unused_local_variable
Local variable 'sfind' is assigned but never used
Impact: low
Show code
local sfind = string.find
L138 🟡 unused_local_variable
Local variable 'custom_tokens' is assigned but never used
Impact: low
Show code
local custom_tokens = args and args.tokens or {}
L195 🟡 unused_local_variable
Local variable 'nfirst' is assigned but never used
Impact: low
Show code
local nfirst, nlast = get_firstname_lastname(npcname)
L195 🟡 unused_local_variable
Local variable 'nlast' is assigned but never used
Impact: low
Show code
local nfirst, nlast = get_firstname_lastname(npcname)
L686 🟡 unused_local_variable
Local variable 'st_id' is assigned but never used
Impact: low
Show code
local st_id = tostring(id)

zzz_faction_expansions_loadall.script

L22 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ [zzz_faction_expansions_loadall.script] monkeypatch override of faction_expansions.on_game_start\n" ..
L92 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_fact:r_line_ex("mutant_tier",i,"","")

zzz_item_parts_milpda.script

L15 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("<MPDA> item_parts.disassembly_item - clean monkeypatch by zzz_item_parts_milpda.script")

zzz_sim_squad_scripted_milpda.script

L18 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[MPDA] sim_squad_scripted.sim_squad_scripted.show() - monkeypatch override by zzz_sim_squad_scripted_milpda.script (Milspec PDA)")
L14 🔴 global_write
Global write: show_squadmate_mapspots
Impact: low
Show code
show_squadmate_mapspots = false
L128 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_actor = sim:actor()
L39 🟡 unused_local_variable
Local variable 'enemy' is assigned but never used
Impact: low
Show code
local enemy = game_relations.is_factions_enemies(warfare.actor_faction, faction)

zzz_ui_pda_npc_tab_milpda.script

L48 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("ui_pda_npc_tab: clean monkeypatch of faction lookup and encryption tables by zzz_ui_pda_npc_tab_milpda.script")

zzzzz_ui_pda_npc_tab_wpnhidefix.script

L14 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[MPDA][zzzzz_ui_pda_npc_tab_wpnhidefix.script] monkeypatch override of ui_pda_npc_tab.use_view()")
L19 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then

zzzzzz_ui_pda_npc_tab_mpdaprogressive.script

L20 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[MPDA][zzzzzz_ui_pda_npc_tab_mpdaprogressive.script] clean monkeypatch of ui_pda_npc_tab.use_view()")

416- Devices of Anomaly Redone - BarryBogs

11 files (🟢9 🟡22 🔴62 🔵13)

animation_common.script

L31 🟢 table_insert_append
table.insert(anim_mutators, v) -> anim_mutators[#anim_mutators+1] = v
Impact: high
Show code
table.insert(anim_mutators, {functor=functor, priority=priority})
L86 🟢 repeated_item_section()
item:section() called 3x in actor_on_hud_animation_play
Impact: low
Show code
Cache item:section() result

catsy_nerfs_mcm.script

L152 🟢 table_insert_append
table.insert(op.gr, v) -> op.gr[#op.gr+1] = v
Impact: high
Show code
table.insert(op.gr,widgetmenu)
L20 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "nerfs", gr={

dar_rf_noise.script

L19 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
if debuglogs then printf("<DAR> sound_currently_enabled %s | item section %s | anm_name %s",sound_currently_enabled, parent_section, anm_table and anm_table.anm_name) end
L25 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
if debuglogs then printf("<DAR> sound_currently_enabled is %s | valid device %s",sound_currently_enabled,valid_dev) end
L6 🔴 global_write
Global write: no_sound_states
Impact: low
Show code
no_sound_states = {
L12 🔴 global_write
Global write: sound_currently_enabled
Impact: low
Show code
sound_currently_enabled = false
L18 🔴 global_write
Global write: sound_currently_enabled
Impact: low
Show code
sound_currently_enabled = no_sound_states[anm_table.anm_name] == nil

dead_device.script

L15 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local det = actor:active_detector()
L17 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
if (det and string.find(det:section(), "flashlight")) then return end

detec_bone_hide.script

L19 🟢 uncached_globals_summary
Cache 1 globals in actor_on_update
Impact: medium
Show code
L29: pairs L36: pairs
L4 🔴 global_write
Global write: valid_detectors
Impact: low
Show code
valid_detectors = {

item_radio.script

L822 🟢 uncached_globals_summary
Cache 3 globals in load_ltx_data
Impact: medium
Show code
L833: tostring L834: tostring L839: pairs L903: pairs L862: tonumber L870: tonumber
L962 🟢 uncached_globals_summary
Cache 1 globals in actor_on_first_update
Impact: medium
Show code
L970: pairs L980: pairs
L1093 🟢 repeated_obj_section()
obj:section() called 2x in actor_on_update
Impact: low
Show code
Cache obj:section() result
L362 🟡 string_concat_in_loop
String concat in loop: dump = dump .. x
Impact: critical
Show code
dump = dump..string.format("\n | %s (%s) : %s Mhz |",v.name,v.id,v.freq)
L846 🟡 string_concat_in_loop
String concat in loop: sndpath = sndpath .. x
Impact: critical
Show code
sndpath = sndpath.."\\"..sndfile
L185 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(logprefix..logtext,...)
L812 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("sfx_background_noise at %s",time_global())
L817 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("sfx_emission at %s",time_global())
L925 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s",fr[i])
L1158 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("found noisefx %s",noisefx)
L1162 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("no noisefx returned by %s, playing silence",functor)
L1179 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("snd_random_now: %s | randfac %s | randsnd %s | talksnd %s",snd_random_now,randfac,randsnd,talksnd)
L1273 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("mod_key_pressed(%s): %s",key,mkp)
L1283 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("presets: kb %s | mk %s | freq %s",presets[i].kb,presets[i].mk,presets[i].f)
L32 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "1.5-DAR"
L45 🔴 global_write
Global write: emission_functor
Impact: low
Show code
emission_functor = nil
L46 🔴 global_write
Global write: bgnoise_functor
Impact: low
Show code
bgnoise_functor = nil
L50 🔴 global_write
Global write: wid_pos
Impact: low
Show code
wid_pos = {x=491,y=670}
L54 🔴 global_write
Global write: explosive_triggered
Impact: low
Show code
explosive_triggered = false
L56 🔴 global_write
Global write: enable_rrfr
Impact: low
Show code
enable_rrfr = false
L57 🔴 global_write
Global write: rrfr_update_sources
Impact: low
Show code
rrfr_update_sources = false
L58 🔴 global_write
Global write: rrfr_must_equip_det
Impact: low
Show code
rrfr_must_equip_det = false
L66 🔴 global_write
Global write: tb_flash_time
Impact: low
Show code
tb_flash_time = 0
L67 🔴 global_write
Global write: tb_in_range
Impact: low
Show code
tb_in_range = false
L68 🔴 global_write
Global write: tb_sound_object
Impact: low
Show code
tb_sound_object = false
L88 🔴 global_write
Global write: bands
Impact: low
Show code
bands = {
L138 🔴 global_write
Global write: stalker_pda_frequencies
Impact: low
Show code
stalker_pda_frequencies = {} -- PDA frequencies of known stalkers
L142 🔴 global_write
Global write: RF_stashes
Impact: low
Show code
RF_stashes = {} -- stored stashes with RF source
L143 🔴 global_write
Global write: RF_targets
Impact: low
Show code
RF_targets = {} -- stored specific targets with RF source
L149 🔴 global_write
Global write: action_defs
Impact: low
Show code
action_defs = {}
L506 🔴 global_write
Global write: snd
Impact: low
Show code
snd = rft_def.snd or snd_path_table.quest_beep or path_default_beep
L516 🔴 global_write
Global write: action_defs
Impact: low
Show code
action_defs = {
L558 🔴 global_write
Global write: refresh
Impact: low
Show code
refresh = true -- require sounds update
L890 🔴 global_write
Global write: emission_functor
Impact: low
Show code
emission_functor = rfcfg["emission_functor"]
L891 🔴 global_write
Global write: bgnoise_functor
Impact: low
Show code
bgnoise_functor = bgcfg["sfx_functor"]
L1196 🔴 global_write
Global write: RF_stashes
Impact: low
Show code
RF_stashes = m_data.RF_stashes or {}
L1197 🔴 global_write
Global write: RF_targets
Impact: low
Show code
RF_targets = m_data.RF_targets or {}
L1199 🔴 global_write
Global write: stalker_pda_frequencies
Impact: low
Show code
stalker_pda_frequencies = m_data.stalker_pda_frequencies or {}
L1226 🔴 global_write
Global write: signal_low
Impact: low
Show code
signal_low = {
L1232 🔴 global_write
Global write: signal_high
Impact: low
Show code
signal_high = {
L1238 🔴 global_write
Global write: signal_emission
Impact: low
Show code
signal_emission = {
L1251 🔴 global_write
Global write: indicator
Impact: low
Show code
indicator = nil
L1357 🔴 global_write
Global write: enable_rrfr
Impact: low
Show code
enable_rrfr = (onoff == true)
L1361 🔴 global_write
Global write: rrfr_update_sources
Impact: low
Show code
if rrfr_us ~= nil then rrfr_update_sources = rrfr_us end
L1362 🔴 global_write
Global write: rrfr_must_equip_det
Impact: low
Show code
if rrfr_eq ~= nil then rrfr_must_equip_det = rrfr_eq end
L971 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se = sim:object(id)
L973 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local lvl = sim:level_name(gg:vertex(se.m_game_vertex_id):level_id())
L1044 🟡 potential_nil_access
Potential nil access: 'obj_det' from :active_detector() used without nil check
Impact: low
Show code
return (obj_det and obj_det:section() == _device and obj_det:condition() >= obj_det:power_critical())
L1044 🟡 potential_nil_access
Potential nil access: 'obj_det' from :active_detector() used without nil check
Impact: low
Show code
return (obj_det and obj_det:section() == _device and obj_det:condition() >= obj_det:power_critical())
L1044 🟡 potential_nil_access
Potential nil access: 'obj_det' from :active_detector() used without nil check
Impact: low
Show code
return (obj_det and obj_det:section() == _device and obj_det:condition() >= obj_det:power_critical())
L1281 🟡 potential_nil_access
Potential nil access: 'detector' from :active_detector() used without nil check
Impact: low
Show code
if detector and (detector:section() == _device) and (not wep) then
L1302 🟡 potential_nil_access
Potential nil access: 'detector' from :active_detector() used without nil check
Impact: low
Show code
if detector and (detector:section() == _device) and (not wep) then
L34 🟡 unused_local_variable
Local variable 'sfind' is assigned but never used
Impact: low
Show code
local sfind = string.find
L35 🟡 unused_local_variable
Local variable 'ssub' is assigned but never used
Impact: low
Show code
local ssub = string.sub
L467 🟡 unused_local_variable
Local variable 'matched' is assigned but never used
Impact: low
Show code
local matched = false

ui_dosimeter.script

L30 🟢 uncached_globals_summary
Cache 1 globals in Update
Impact: medium
Show code
L53: math.random L58: math.random
L2 🟡 unused_local_variable
Local variable 'workIndicatorTimer' is assigned but never used
Impact: low
Show code
local workIndicatorTimer = 0

ui_rf_widget.script

L79 🟢 uncached_globals_summary
Cache 1 globals in SetIndicatorColor
Impact: medium
Show code
L80: math.random L97: math.random

uni_anim_detectors.script

L14 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = false
L18 🔴 global_write
Global write: fdda_anim_prepare
Impact: low
Show code
fdda_anim_prepare = enhanced_animations.anim_prepare
L20 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L24 🔴 global_write
Global write: fdda_call_my_slot_back
Impact: low
Show code
fdda_call_my_slot_back = enhanced_animations.call_my_slot_back
L28 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = false
L33 🔴 global_write
Global write: fdda_bp_call_my_slot_back
Impact: low
Show code
fdda_bp_call_my_slot_back = zzz_ea_addon_backpack.call_my_slot_back
L37 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = false
L50 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L63 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L71 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L85 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L98 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L113 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L167 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = false
L122 🟡 potential_nil_access
Potential nil access: 'player_detector' from :active_detector() used without nil check
Impact: low
Show code
if player_detector and item:id() == player_detector:id() then
L160 🟡 potential_nil_access
Potential nil access: 'player_wpn' from :active_item() used without nil check
Impact: low
Show code
player_wpn and is_state_valid[player_wpn:get_state()]

utjan_mag_check.script

L15 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!Old mag check script (ammo_check_mcm) detected. Remove it to get full features of mag checks")
L107 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!Old mag check script (ammo_check_mcm) detected. Remove it to get full features of mag checks")
L3 🔴 global_write
Global write: do_ammo_check_anim
Impact: low
Show code
do_ammo_check_anim = nil
L4 🔴 global_write
Global write: wpn_checking
Impact: low
Show code
wpn_checking, det_active = nil
L4 🔴 global_write
Global write: det_active
Impact: low
Show code
wpn_checking, det_active = nil
L7 🔴 global_write
Global write: base_check_Ammo
Impact: low
Show code
base_check_Ammo = ammo_check_mcm.check_Ammo
L63 🔴 global_write
Global write: do_ammo_check_anim
Impact: low
Show code
do_ammo_check_anim = 1
L65 🔴 global_write
Global write: det_active
Impact: low
Show code
det_active = db.actor:active_detector() or nil
L80 🔴 global_write
Global write: wpn_checking
Impact: low
Show code
wpn_checking = nil
L81 🔴 global_write
Global write: do_ammo_check_anim
Impact: low
Show code
do_ammo_check_anim = nil
L86 🔴 global_write
Global write: det_active
Impact: low
Show code
det_active = nil
L90 🔴 global_write
Global write: wpn_checking
Impact: low
Show code
wpn_checking = obj
L102 🔴 global_write
Global write: do_ammo_check_anim
Impact: low
Show code
do_ammo_check_anim = 2
L28 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local currentState = weapon:get_state()
L29 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
if not (currentState == 0 or weapon:weapon_in_grenade_mode()) then
L35 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local currentAmmo = weapon:get_ammo_in_magazine()
L41 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local anm_ammo_check = common.has_animation(weapon:section(), "anm_ammo_check")
L64 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
weapon:switch_state(4)

zz_rf_light_remover.script

L3 🔴 global_write
Global write: base_radio_update
Impact: low
Show code
base_radio_update = item_radio.UI3D_RF.Update

417- New Extensible RF Sources - Catspaw

6 files (🟢8 🟡17 🔴75 🔵11)

catsy_nerfs_mcm.script

L237 🟢 table_insert_append
table.insert(op.gr, v) -> op.gr[#op.gr+1] = v
Impact: high
Show code
table.insert(op.gr, widgetmenu)
L27 🔴 global_write
Global write: color_tokens
Impact: low
Show code
color_tokens = {
L46 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "nerfs", gr={
L242 🔴 global_write
Global write: GUI_PosPre
Impact: low
Show code
GUI_PosPre = nil
L268 🔴 global_write
Global write: GUI_PosPre
Impact: low
Show code
GUI_PosPre = pos_previewer_mcm.UIMCMPosPreview(anchor, path, args)
L313 🟡 unused_local_variable
Local variable 'head' is assigned but never used
Impact: low
Show code
local head = xml:InitStatic("box",anchor)

item_radio.script

L869 🟢 uncached_globals_summary
Cache 3 globals in load_sound_data
Impact: medium
Show code
L880: tostring L881: tostring L886: pairs L950: pairs L909: tonumber L917: tonumber
L1011 🟢 uncached_globals_summary
Cache 1 globals in actor_on_first_update
Impact: medium
Show code
L1019: pairs L1029: pairs
L1151 🟢 repeated_obj_section()
obj:section() called 2x in actor_on_update
Impact: low
Show code
Cache obj:section() result
L342 🟡 string_concat_in_loop
String concat in loop: dump = dump .. x
Impact: critical
Show code
dump = dump..string.format("\n | %s (%s) : %s Mhz |",v.name,v.id,v.freq)
L893 🟡 string_concat_in_loop
String concat in loop: sndpath = sndpath .. x
Impact: critical
Show code
sndpath = sndpath.."\\"..sndfile
L8 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "1.7.3"
L9 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20250422
L26 🔴 global_write
Global write: debuglogs
Impact: low
Show code
debuglogs = false -- change to false before release
L27 🔴 global_write
Global write: verbose
Impact: low
Show code
verbose = true
L28 🔴 global_write
Global write: logprefix
Impact: low
Show code
logprefix = "[NERFS] "
L33 🔴 global_write
Global write: debuglogs
Impact: low
Show code
if (debug_en ~= nil) then debuglogs = debug_en end
L34 🔴 global_write
Global write: verbose
Impact: low
Show code
if (verbose_en ~= nil) then verbose = verbose_en end
L52 🔴 global_write
Global write: enable_acc_widget
Impact: low
Show code
enable_acc_widget = false
L53 🔴 global_write
Global write: enable_wid_pointer
Impact: low
Show code
enable_wid_pointer = false
L54 🔴 global_write
Global write: emission_functor
Impact: low
Show code
emission_functor = nil
L55 🔴 global_write
Global write: bgnoise_functor
Impact: low
Show code
bgnoise_functor = nil
L70 🔴 global_write
Global write: wid_pos
Impact: low
Show code
wid_pos = {x=491,y=670}
L77 🔴 global_write
Global write: tb_flash_time
Impact: low
Show code
tb_flash_time = 0
L78 🔴 global_write
Global write: tb_in_range
Impact: low
Show code
tb_in_range = false
L79 🔴 global_write
Global write: tb_sound_object
Impact: low
Show code
tb_sound_object = false
L99 🔴 global_write
Global write: bands
Impact: low
Show code
bands = {
L145 🔴 global_write
Global write: stalker_pda_frequencies
Impact: low
Show code
stalker_pda_frequencies = {} -- PDA frequencies of known stalkers
L149 🔴 global_write
Global write: RF_stashes
Impact: low
Show code
RF_stashes = {} -- stored stashes with RF source
L150 🔴 global_write
Global write: RF_targets
Impact: low
Show code
RF_targets = {} -- stored specific targets with RF source
L156 🔴 global_write
Global write: action_defs
Impact: low
Show code
action_defs = {}
L157 🔴 global_write
Global write: snd_emission
Impact: low
Show code
snd_emission = {}
L158 🔴 global_write
Global write: snd_random
Impact: low
Show code
snd_random = {}
L159 🔴 global_write
Global write: snd_talk
Impact: low
Show code
snd_talk = {}
L160 🔴 global_write
Global write: snd_silence
Impact: low
Show code
snd_silence = xr_sound.get_safe_sound_object(path_silence)
L161 🔴 global_write
Global write: snd_on
Impact: low
Show code
snd_on = xr_sound.get_safe_sound_object(path_sound_on)
L162 🔴 global_write
Global write: snd_off
Impact: low
Show code
snd_off = xr_sound.get_safe_sound_object(path_sound_off)
L163 🔴 global_write
Global write: snd_beep
Impact: low
Show code
snd_beep = sound_object(path_default_beep)
L164 🔴 global_write
Global write: snd_noise
Impact: low
Show code
snd_noise = xr_sound.get_safe_sound_object(path_default_noise)
L369 🔴 global_write
Global write: stalker_pda_frequencies
Impact: low
Show code
stalker_pda_frequencies = {}
L502 🔴 global_write
Global write: snd
Impact: low
Show code
snd = rft_def.snd or snd_path_table.quest_beep or path_default_beep
L512 🔴 global_write
Global write: action_defs
Impact: low
Show code
action_defs = {
L555 🔴 global_write
Global write: refresh
Impact: low
Show code
refresh = true -- require sounds update
L937 🔴 global_write
Global write: emission_functor
Impact: low
Show code
emission_functor = rfcfg["emission_functor"]
L938 🔴 global_write
Global write: bgnoise_functor
Impact: low
Show code
bgnoise_functor = bgcfg["sfx_functor"]
L1217 🔴 global_write
Global write: snd_noise
Impact: low
Show code
snd_noise = xr_sound.get_safe_sound_object(noisefx)
L1220 🔴 global_write
Global write: snd_noise
Impact: low
Show code
snd_noise = snd_silence
L1253 🔴 global_write
Global write: RF_stashes
Impact: low
Show code
RF_stashes = m_data.RF_stashes or {}
L1254 🔴 global_write
Global write: RF_targets
Impact: low
Show code
RF_targets = m_data.RF_targets or {}
L1256 🔴 global_write
Global write: stalker_pda_frequencies
Impact: low
Show code
stalker_pda_frequencies = m_data.stalker_pda_frequencies or {}
L1280 🔴 global_write
Global write: enable_acc_widget
Impact: low
Show code
enable_acc_widget = ui_mcm.get("nerfs/nerfwidget/show")
L1281 🔴 global_write
Global write: enable_wid_pointer
Impact: low
Show code
enable_wid_pointer = ui_mcm.get("nerfs/nerfwidget/pointer")
L1283 🔴 global_write
Global write: debuglogs
Impact: low
Show code
if dbg ~= nil then debuglogs = dbg end
L1438 🔴 global_write
Global write: enable_rrfr
Impact: low
Show code
enable_rrfr = onoff and true or false
L1442 🔴 global_write
Global write: rrfr_update_sources
Impact: low
Show code
if rrfr_us ~= nil then rrfr_update_sources = rrfr_us end
L1443 🔴 global_write
Global write: rrfr_must_equip_det
Impact: low
Show code
if rrfr_eq ~= nil then rrfr_must_equip_det = rrfr_eq end
L1448 🔴 global_write
Global write: dar_sound_from_inv
Impact: low
Show code
dar_sound_from_inv = (enable_rrfr and (not rrfr_must_equip_det))
L1020 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se = sim:object(id)
L1022 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local lvl = sim:level_name(gg:vertex(se.m_game_vertex_id):level_id())
L1094 🟡 potential_nil_access
Potential nil access: 'obj_det' from :active_detector() used without nil check
Impact: low
Show code
return (obj_det and obj_det:section() == _device and obj_det:condition() >= obj_det:power_critical())
L1094 🟡 potential_nil_access
Potential nil access: 'obj_det' from :active_detector() used without nil check
Impact: low
Show code
return (obj_det and obj_det:section() == _device and obj_det:condition() >= obj_det:power_critical())
L1094 🟡 potential_nil_access
Potential nil access: 'obj_det' from :active_detector() used without nil check
Impact: low
Show code
return (obj_det and obj_det:section() == _device and obj_det:condition() >= obj_det:power_critical())
L1345 🟡 potential_nil_access
Potential nil access: 'detector' from :active_detector() used without nil check
Impact: low
Show code
if detector and (detector:section() == _device) and (not wep) then
L1365 🟡 potential_nil_access
Potential nil access: 'detector' from :active_detector() used without nil check
Impact: low
Show code
if detector and (detector:section() == _device) and (not wep) then
L46 🟡 unused_local_variable
Local variable 'sfind' is assigned but never used
Impact: low
Show code
local sfind = string.find
L47 🟡 unused_local_variable
Local variable 'ssub' is assigned but never used
Impact: low
Show code
local ssub = string.sub
L463 🟡 unused_local_variable
Local variable 'matched' is assigned but never used
Impact: low
Show code
local matched = false
L1305 🟡 unused_local_variable
Local variable 'oldpos' is assigned but never used
Impact: low
Show code
local oldpos = wid_pos

pos_previewer_mcm.script

L167 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(logprefix..logtext,...)
L81 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "1.4"
L82 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20240605
L83 🔴 global_write
Global write: debuglogs
Impact: low
Show code
debuglogs = false
L84 🔴 global_write
Global write: verbose
Impact: low
Show code
verbose = true -- does nothing without debuglogs
L85 🔴 global_write
Global write: use_debug_images
Impact: low
Show code
use_debug_images = false
L119 🔴 global_write
Global write: aspects
Impact: low
Show code
aspects = {

ui_rf_widget.script

L95 🟢 uncached_globals_summary
Cache 1 globals in SetIndicatorColor
Impact: medium
Show code
L96: math.random L113: math.random
L25 🔴 global_write
Global write: color_table
Impact: low
Show code
color_table = {

utils_catspaw_common.script

L197 🟢 uncached_globals_summary
Cache 1 globals in to_bool
Impact: medium
Show code
L198: type L200: type
L274 🟢 uncached_globals_summary
Cache 1 globals in get_next_tg_interval
Impact: medium
Show code
L277: tonumber L278: tonumber
L588 🟢 uncached_globals_summary
Cache 1 globals in import_metatable
Impact: medium
Show code
L599: type L608: type
L47 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf((caller.logprefix or logprefix) .. logtext, ...)
L56 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf((caller.logprefix or logprefix) .. (caller.vprefix or vprefix) .. logtext, ...)
L66 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf((raw_prefix or "") .. logtext, ...)
L133 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( "! Modded exes not detected! No extra features available.\n" ..
L139 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(logdiv .. "@ Modded exes %s feature support (GAMMA: %s)", exes_version, using_gamma_modpack)
L141 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s %s (added %s): %s", v.enabled and "-" or "!", v.name, v.ver, v.func())
L143 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(logdiv)
L493 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! ERROR: no INI filename passed to %s.load_file_data%s, cannot continue!", script_name, args.called_by and (" by " ..args.called_by) or "")
L498 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
local function dl(s, ...) return log and printf(s, ...) end
L623 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Loaded %s v%s (rel %s)", script_name, script_version, release_date)
L4 🔴 global_write
Global write: script_name
Impact: low
Show code
script_name = "utils_catspaw_common"
L5 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "1.14"
L6 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20250419
L73 🔴 global_write
Global write: debuglogs
Impact: low
Show code
debuglogs = false
L74 🔴 global_write
Global write: verbose
Impact: low
Show code
verbose = false
L75 🔴 global_write
Global write: logprefix
Impact: low
Show code
logprefix = "[CatsyUtils] " -- gets prefixed, optional
L76 🔴 global_write
Global write: vprefix
Impact: low
Show code
vprefix = "[V] " -- gets added to verbose log entries, optional
L94 🔴 global_write
Global write: debuglogs
Impact: low
Show code
if (debug_en ~= nil) then debuglogs = debug_en end
L95 🔴 global_write
Global write: verbose
Impact: low
Show code
if (verbose_en ~= nil) then verbose = verbose_en end
L101 🔴 global_write
Global write: logdiv
Impact: low
Show code
logdiv = "~ ------------------------------------------------------------------------\n"
L107 🔴 global_write
Global write: engine_features
Impact: low
Show code
engine_features = {
L119 🔴 global_write
Global write: using_gamma_modpack
Impact: low
Show code
using_gamma_modpack = game_version:find("G.A.M.M.A.") and true or false
L121 🔴 global_write
Global write: using_modded_exes
Impact: low
Show code
using_modded_exes = using_gamma_modpack or exes_version and true or false
L245 🔴 global_write
Global write: easing
Impact: low
Show code
easing = {
L397 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
max_weight = max_weight + (outfit and outfit:get_additional_max_weight() or 0)
L400 🟡 potential_nil_access
Potential nil access: 'backpack' from :item_in_slot() used without nil check
Impact: low
Show code
max_weight = max_weight + (backpack and backpack:get_additional_max_weight() or 0)
L568 🟡 unused_local_variable
Local variable 'def_ltx' is assigned but never used
Impact: low
Show code
local def_ltx = def_ini and def_ini:get_sections(true)

z_rftip_note_spawner.script

L30 🔴 global_write
Global write: drop_chance_coef
Impact: low
Show code
drop_chance_coef = 1.0
L32 🔴 global_write
Global write: allowed_factions
Impact: low
Show code
allowed_factions = {
L46 🔴 global_write
Global write: rf_tips
Impact: low
Show code
rf_tips = {
L73 🔴 global_write
Global write: existing_spawn_logic
Impact: low
Show code
existing_spawn_logic = death_manager.spawn_cosmetics

418- Dynamic Icons Indicators - HarukaSai

1 file (🟢13 🟡0 🔴8 🔵2)

icon_overlayer_mcm.script

L195 🟢 table_insert_append
table.insert(op.gr[2].gr, v) -> op.gr[2].gr[#op.gr[2].gr+1] = v
Impact: high
Show code
table.insert(op.gr[2].gr, { id = "desc" .. kind, type = "desc", text = string_format("ui_mcm_desc_%s_prop_%s", mcm_id, kind)})
L196 🟢 table_insert_append
table.insert(op.gr[2].gr, v) -> op.gr[2].gr[#op.gr[2].gr+1] = v
Impact: high
Show code
table.insert(op.gr[2].gr, { id = "show_" .. kind, hint = string_format("%s_show", mcm_id), val = 1, type = "check", def = true })
L197 🟢 table_insert_append
table.insert(op.gr[2].gr, v) -> op.gr[2].gr[#op.gr[2].gr+1] = v
Impact: high
Show code
table.insert(op.gr[2].gr, { id = "anchor_x_" .. kind, hint = string_format("%s_anchor_x", mcm_id), type = "list", val = 0, def = defaults.anchor_x,
L203 🟢 table_insert_append
table.insert(op.gr[2].gr, v) -> op.gr[2].gr[#op.gr[2].gr+1] = v
Impact: high
Show code
table.insert(op.gr[2].gr, { id = "anchor_y_" .. kind, hint = string_format("%s_anchor_y", mcm_id), type = "list", val = 0, def = defaults.anchor_y,
L209 🟢 table_insert_append
table.insert(op.gr[2].gr, v) -> op.gr[2].gr[#op.gr[2].gr+1] = v
Impact: high
Show code
table.insert(op.gr[2].gr, { id = "offset_x_" .. kind, hint = string_format("%s_offset_x", mcm_id), type = "track", val = 2, step = 1,def = defaults.offset_x, max = 25, min = 0})
L210 🟢 table_insert_append
table.insert(op.gr[2].gr, v) -> op.gr[2].gr[#op.gr[2].gr+1] = v
Impact: high
Show code
table.insert(op.gr[2].gr, { id = "offset_y_" .. kind, hint = string_format("%s_offset_y", mcm_id), type = "track", val = 2, step = 1, def = defaults.offset_y, max = 25, min = 0})
L211 🟢 table_insert_append
table.insert(op.gr[2].gr, v) -> op.gr[2].gr[#op.gr[2].gr+1] = v
Impact: high
Show code
table.insert(op.gr[2].gr, { id = "spacing_x_" .. kind, hint = string_format("%s_spacing_x", mcm_id), type = "track", val = 2, step = 1, def = defaults.spacing_x, max = 10, min = 0})
L212 🟢 table_insert_append
table.insert(op.gr[2].gr, v) -> op.gr[2].gr[#op.gr[2].gr+1] = v
Impact: high
Show code
table.insert(op.gr[2].gr, { id = "spacing_y_" .. kind, hint = string_format("%s_spacing_y", mcm_id), type = "track", val = 2, step = 1,def = defaults.spacing_y, max = 10, min = 0})
L213 🟢 table_insert_append
table.insert(op.gr[2].gr, v) -> op.gr[2].gr[#op.gr[2].gr+1] = v
Impact: high
Show code
table.insert(op.gr[2].gr, { id = "limit_" .. kind, hint = string_format("%s_limit", mcm_id), val = 1, type = "check", def = defaults.limit })
L214 🟢 table_insert_append
table.insert(op.gr[2].gr, v) -> op.gr[2].gr[#op.gr[2].gr+1] = v
Impact: high
Show code
table.insert(op.gr[2].gr, { id = "amount_" .. kind, hint = string_format("%s_amount", mcm_id), type = "track", val = 2, step = 1, def = defaults.amount, max = size_table(props.props), min = 0 })
L215 🟢 table_insert_append
table.insert(op.gr[2].gr, v) -> op.gr[2].gr[#op.gr[2].gr+1] = v
Impact: high
Show code
table.insert(op.gr[2].gr, { id = "divider", type = "line" })
L316 🟢 table_insert_append
table.insert(op.gr[3].gr, v) -> op.gr[3].gr[#op.gr[3].gr+1] = v
Impact: high
Show code
table.insert(op.gr[3].gr, { id = tab, sh = true, gr = {
L340 🟢 table_insert_append
table.insert(op.gr[3].gr[tabs[tab].idx].gr, v) -> op.gr[3].gr[tabs[tab].idx].gr[#op.gr[3].gr[tabs[tab].idx].gr+1] = v
Impact: high
Show code
table.insert(op.gr[3].gr[tabs[tab].idx].gr, { id = "show_" .. setting, hint = string_format("%s_%s_show", mcm_id, setting), val = 1, type = "check", def = true })
L74 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Icon Overlayer: | %s | \n" .. utils_data.print_table(node, text, true), time_global(), ...)
L80 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Icon Overlayer: | %s | " .. text, time_global(), ...)
L31 🔴 global_write
Global write: anchors
Impact: low
Show code
anchors = {
L84 🔴 global_write
Global write: properties
Impact: low
Show code
properties = {}
L85 🔴 global_write
Global write: layers
Impact: low
Show code
layers = {}
L86 🔴 global_write
Global write: groups
Impact: low
Show code
groups = {}
L89 🔴 global_write
Global write: main_settings_path
Impact: low
Show code
main_settings_path = string_format("%s/%s_main_settings", mcm_id, mcm_id) .. "/%s"
L222 🔴 global_write
Global write: property_path
Impact: low
Show code
property_path = string_format("%s/%s", mcm_id, op.gr[2].id) .. "/%s_"
L464 🔴 global_write
Global write: layer_functors
Impact: low
Show code
layer_functors = {}
L589 🔴 global_write
Global write: xml
Impact: low
Show code
xml = xml or self:GetXML()

419- Artefacts Belt Scroller - Demonized

2 files (🟢0 🟡3 🔴8 🔵0)

zz_artefacts_belt_scroller_data.script

L1 🔴 global_write
Global write: artefactsOffset
Impact: low
Show code
artefactsOffset = 0
L20 🔴 global_write
Global write: artefactsOffset
Impact: low
Show code
artefactsOffset = 0
L22 🔴 global_write
Global write: artefactsOffset
Impact: low
Show code
artefactsOffset = clamp(artefactsOffset, 0, #artefacts - 5)

zz_artefacts_belt_scroller_ui.script

L5 🔴 global_write
Global write: uibelt_controls
Impact: low
Show code
uibelt_controls = item_artefact.UIBelt.InitControls
L30 🔴 global_write
Global write: uibelt_clear
Impact: low
Show code
uibelt_clear = item_artefact.UIBelt.Clear
L38 🔴 global_write
Global write: uibelt_refresh
Impact: low
Show code
uibelt_refresh = item_artefact.UIBelt.Refresh
L88 🔴 global_write
Global write: uiinventory_updatebelt
Impact: low
Show code
uiinventory_updatebelt = ui_inventory.UIInventory.UpdateBelt
L137 🔴 global_write
Global write: uiinventory_controls
Impact: low
Show code
uiinventory_controls = ui_inventory.UIInventory.InitControls
L97 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local outfit = actor:item_in_slot(7)
L98 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local cnt_arty = actor:belt_count()
L99 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local cnt_arty_slot = outfit and outfit:cast_CustomOutfit():get_artefact_count() or 0

42- Camera Reanimation INERTIA - IENCE

2 files (🟢1 🟡1 🔴4 🔵0)

camera_reanim_project.script

L71 🟢 table_getn
table.getn(fire_modes) -> #fire_modes
Impact: low
Show code
if fire_modes and table.getn(fire_modes) > 1 then
L90 🔴 global_write
Global write: tg_anim1
Impact: low
Show code
tg_anim1 = 0
L91 🔴 global_write
Global write: tg_anim1_delay
Impact: low
Show code
tg_anim1_delay = 1000
L96 🔴 global_write
Global write: tg_anim1
Impact: low
Show code
tg_anim1 = time_global() + tg_anim1_delay
L50 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
local sec = wpn:section()

camera_reanim_project_mcm.script

L15 🔴 global_write
Global write: op
Impact: low
Show code
op = { id = "crpmcm",sh = true ,gr = {

421- AK Family Reanimation - NickolasNikova

5 files (🟢4 🟡5 🔴20 🔵2)

animation_common.script

L31 🟢 table_insert_append
table.insert(anim_mutators, v) -> anim_mutators[#anim_mutators+1] = v
Impact: high
Show code
table.insert(anim_mutators, {functor=functor, priority=priority})
L88 🟢 repeated_item_section()
item:section() called 3x in actor_on_hud_animation_play
Impact: low
Show code
Cache item:section() result

aol_anim_transitions.script

L6 🟢 table_insert_append
table.insert(valid_anims, v) -> valid_anims[#valid_anims+1] = v
Impact: high
Show code
table.insert(valid_anims, anm_suffix)
L37 🟢 table_insert_append
table.insert(pattern_transitions[hud_section], v) -> pattern_transitions[hud_section][#pattern_transitions[hud_section]+1] = v
Impact: high
Show code
table.insert(pattern_transitions[hud_section], {
L99 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L128 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L15 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L32 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L3 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L10 🔴 global_write
Global write: transitions
Impact: low
Show code
transitions = {
L26 🔴 global_write
Global write: pattern_transitions
Impact: low
Show code
pattern_transitions = {
L162 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L51 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_items:r_line_ex(section,i,"","")

aol_sprint_cancel.script

L16 🔴 global_write
Global write: aol_anim_transitions_anm_transitions
Impact: low
Show code
aol_anim_transitions_anm_transitions = aol_anim_transitions.anm_transitions

shotgun_unjam_fix.script

L1 🔴 global_write
Global write: common
Impact: low
Show code
common = animation_common

uni_anim_detectors.script

L14 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = false
L18 🔴 global_write
Global write: fdda_anim_prepare
Impact: low
Show code
fdda_anim_prepare = enhanced_animations.anim_prepare
L20 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L24 🔴 global_write
Global write: fdda_call_my_slot_back
Impact: low
Show code
fdda_call_my_slot_back = enhanced_animations.call_my_slot_back
L28 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = false
L33 🔴 global_write
Global write: fdda_bp_call_my_slot_back
Impact: low
Show code
fdda_bp_call_my_slot_back = zzz_ea_addon_backpack.call_my_slot_back
L37 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = false
L50 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L63 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L71 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L85 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L98 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L113 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L167 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = false
L122 🟡 potential_nil_access
Potential nil access: 'player_detector' from :active_detector() used without nil check
Impact: low
Show code
if player_detector and item:id() == player_detector:id() then
L160 🟡 potential_nil_access
Potential nil access: 'player_wpn' from :active_item() used without nil check
Impact: low
Show code
player_wpn and is_state_valid[player_wpn:get_state()]

423- Mossberg 590 Reanimation - SoulCrystal

7 files (🟢4 🟡12 🔴22 🔵2)

animation_common.script

L31 🟢 table_insert_append
table.insert(anim_mutators, v) -> anim_mutators[#anim_mutators+1] = v
Impact: high
Show code
table.insert(anim_mutators, {functor=functor, priority=priority})
L88 🟢 repeated_item_section()
item:section() called 3x in actor_on_hud_animation_play
Impact: low
Show code
Cache item:section() result

aol_anim_transitions.script

L6 🟢 table_insert_append
table.insert(valid_anims, v) -> valid_anims[#valid_anims+1] = v
Impact: high
Show code
table.insert(valid_anims, anm_suffix)
L37 🟢 table_insert_append
table.insert(pattern_transitions[hud_section], v) -> pattern_transitions[hud_section][#pattern_transitions[hud_section]+1] = v
Impact: high
Show code
table.insert(pattern_transitions[hud_section], {
L99 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L128 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L15 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L32 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L3 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L10 🔴 global_write
Global write: transitions
Impact: low
Show code
transitions = {
L26 🔴 global_write
Global write: pattern_transitions
Impact: low
Show code
pattern_transitions = {
L162 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L51 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_items:r_line_ex(section,i,"","")

aol_sprint_cancel.script

L16 🔴 global_write
Global write: aol_anim_transitions_anm_transitions
Impact: low
Show code
aol_anim_transitions_anm_transitions = aol_anim_transitions.anm_transitions

remove_gun_from_loadout.script

L1 🔴 global_write
Global write: gunsToRemove
Impact: low
Show code
gunsToRemove = {
L12 🔴 global_write
Global write: init_settings
Impact: low
Show code
init_settings = xrs_rnd_npc_loadout.init_settings

shotgun_unjam_fix.script

L1 🔴 global_write
Global write: common
Impact: low
Show code
common = animation_common

soul_anim_mutators.script

L48 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
if (common.has_animation(item:section(), "anm_idle_jump")) then
L57 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
if (common.has_animation(item:section(), "anm_idle_jump")) then
L67 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
if (bind == key_bindings.kWPN_RELOAD and item:get_state() ~= 7 and is_first_round == false) then
L72 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
local ammocount = item:get_ammo_in_magazine()
L74 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
if (fired_empty == false and actor_menu.last_mode == 0 and item:get_state() == 0 and common.has_animation(item:section(), "anm_empty_fire")) then
L74 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
if (fired_empty == false and actor_menu.last_mode == 0 and item:get_state() == 0 and common.has_animation(item:section(), "anm_empty_fire")) then
L75 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
item:switch_state(4)

uni_anim_detectors.script

L14 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = false
L18 🔴 global_write
Global write: fdda_anim_prepare
Impact: low
Show code
fdda_anim_prepare = enhanced_animations.anim_prepare
L20 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L24 🔴 global_write
Global write: fdda_call_my_slot_back
Impact: low
Show code
fdda_call_my_slot_back = enhanced_animations.call_my_slot_back
L28 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = false
L33 🔴 global_write
Global write: fdda_bp_call_my_slot_back
Impact: low
Show code
fdda_bp_call_my_slot_back = zzz_ea_addon_backpack.call_my_slot_back
L37 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = false
L50 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L63 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L71 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L85 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L98 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L113 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L167 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = false
L122 🟡 potential_nil_access
Potential nil access: 'player_detector' from :active_detector() used without nil check
Impact: low
Show code
if player_detector and item:id() == player_detector:id() then
L160 🟡 potential_nil_access
Potential nil access: 'player_wpn' from :active_item() used without nil check
Impact: low
Show code
player_wpn and is_state_valid[player_wpn:get_state()]

424- Weapon Inertia Expanded - lizzardman

6 files (🟢3 🟡6 🔴8 🔵0)

animation_common.script

L31 🟢 table_insert_append
table.insert(anim_mutators, v) -> anim_mutators[#anim_mutators+1] = v
Impact: high
Show code
table.insert(anim_mutators, {functor=functor, priority=priority})
L88 🟢 repeated_item_section()
item:section() called 3x in actor_on_hud_animation_play
Impact: low
Show code
Cache item:section() result

liz_inertia_expanded.script

L4 🔴 global_write
Global write: animate_hand
Impact: low
Show code
animate_hand = 2
L5 🔴 global_write
Global write: wpn_all_configs
Impact: low
Show code
wpn_all_configs = {}
L6 🔴 global_write
Global write: mask_layers
Impact: low
Show code
mask_layers = {
L280 🔴 global_write
Global write: animate_hand
Impact: low
Show code
animate_hand = 0
L282 🔴 global_write
Global write: animate_hand
Impact: low
Show code
animate_hand = 2

liz_inertia_expanded_crawl.script

L3 🔴 global_write
Global write: blocked_weapons
Impact: low
Show code
blocked_weapons = {}
L117 🔴 global_write
Global write: cur_dir_side
Impact: low
Show code
cur_dir_side = vector():set(cur_dir_forward.z, cur_dir_forward.y, - cur_dir_forward.x)
L91 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local cur_pos = actor:position()
L92 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local cur_dev_obj = actor:active_detector()
L93 🟡 potential_nil_access
Potential nil access: 'cur_dev_obj' from :active_detector() used without nil check
Impact: low
Show code
local cur_dev_sec = cur_dev_obj and cur_dev_obj:section()
L111 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local cur_dir_forward = actor:direction()
L192 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local wpn = actor and actor:active_item()

liz_inertia_expanded_custom_weapon_configs.script

L21 🟡 unused_local_variable
Local variable 'c' is assigned but never used
Impact: low
Show code
local c = liz_inertia_expanded.wpn_all_configs

liz_inertia_expanded_mcm.script

L42 🔴 global_write
Global write: op
Impact: low
Show code
op = {

liz_inertia_expanded_patches.script

L67 🟢 uncached_globals_summary
Cache 1 globals in weapon_reload_tracker
Impact: medium
Show code
L104: string.find L105: string.find

425- Dynamic News Manager Fixes and Tweaks - dEmergence

1 file (🟢4 🟡2 🔴16 🔵1)

dynamic_news_manager_patch_dmg.script

L192 🟢 table_insert_append
table.insert(instance.loot, v) -> instance.loot[#instance.loot+1] = v
Impact: high
Show code
table.insert(instance.loot,item_id)
L738 🟢 uncached_globals_summary
Cache 1 globals in dynamic_news_helper.send_tip
Impact: medium
Show code
L739: tostring L739: tostring
L301 🟢 repeated_who_id()
who:id() called 3x in <global>
Impact: low
Show code
Cache who:id() result
L342 🟢 repeated_sender_id()
sender:id() called 6x in <global>
Impact: low
Show code
Cache sender:id() result
L98 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(tostring(debug_text))
L67 🔴 global_write
Global write: settings
Impact: low
Show code
settings = {
L106 🔴 global_write
Global write: orig_update_settings
Impact: low
Show code
orig_update_settings = dynamic_news_manager.update_settings
L129 🔴 global_write
Global write: orig_TickQuick
Impact: low
Show code
orig_TickQuick = dynamic_news_manager.DynamicNewsManager.TickQuick
L248 🔴 global_write
Global write: online_npc_cache
Impact: low
Show code
online_npc_cache = {
L287 🔴 global_write
Global write: orig_FindSpeakerNoVictim
Impact: low
Show code
orig_FindSpeakerNoVictim = dynamic_news_manager.DynamicNewsManager.FindSpeakerNoVictim
L347 🔴 global_write
Global write: orig_FindSpeaker
Impact: low
Show code
orig_FindSpeaker = dynamic_news_manager.DynamicNewsManager.FindSpeaker
L412 🔴 global_write
Global write: orig_FindSpeakerWithEnemy
Impact: low
Show code
orig_FindSpeakerWithEnemy = dynamic_news_manager.DynamicNewsManager.FindSpeakerWithEnemy
L474 🔴 global_write
Global write: orig_FindSpeakerRandom
Impact: low
Show code
orig_FindSpeakerRandom = dynamic_news_manager.DynamicNewsManager.FindSpeakerRandom
L482 🔴 global_write
Global write: exclude_npc_id
Impact: low
Show code
exclude_npc_id = exclude_npc_id or 0
L550 🔴 global_write
Global write: orig_FindSpeakerAndTarget
Impact: low
Show code
orig_FindSpeakerAndTarget = dynamic_news_manager.DynamicNewsManager.FindSpeakerAndTarget
L643 🔴 global_write
Global write: orig_PushToChannel
Impact: low
Show code
orig_PushToChannel = dynamic_news_manager.DynamicNewsManager.PushToChannel
L682 🔴 global_write
Global write: orig_monster_on_death_callback
Impact: low
Show code
orig_monster_on_death_callback = dynamic_news_manager.DynamicNewsManager.monster_on_death_callback
L700 🔴 global_write
Global write: orig_npc_on_death_callback
Impact: low
Show code
orig_npc_on_death_callback = dynamic_news_manager.DynamicNewsManager.npc_on_death_callback
L788 🔴 global_write
Global write: ui_sender
Impact: low
Show code
ui_sender = news_manager.tips_icons[sender]
L790 🔴 global_write
Global write: ui_sender
Impact: low
Show code
ui_sender = sender
L792 🔴 global_write
Global write: ui_sender
Impact: low
Show code
ui_sender = news_manager.tips_icons[sender]
L612 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
se_obj = sim:object(i)
L613 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
clsid = se_obj and se_obj:clsid()

426- Dynamic Emission Cover - Utjan

1 file (🟢1 🟡0 🔴27 🔵0)

dynamic_emission_cover_mcm.script

L126 🟢 uncached_globals_summary
Cache 1 globals in actor_on_update
Impact: medium
Show code
L180: string.find L180: string.find
L57 🔴 global_write
Global write: ray_count_circle
Impact: low
Show code
ray_count_circle = 16
L58 🔴 global_write
Global write: ray_count_vertical
Impact: low
Show code
ray_count_vertical = 8
L61 🔴 global_write
Global write: rays_per_update
Impact: low
Show code
rays_per_update = 10
L62 🔴 global_write
Global write: ray_range
Impact: low
Show code
ray_range = 8
L63 🔴 global_write
Global write: north_facing_bonus
Impact: low
Show code
north_facing_bonus = 0.01
L64 🔴 global_write
Global write: cover_prcnt_needed
Impact: low
Show code
cover_prcnt_needed = 0.85
L65 🔴 global_write
Global write: show_cover_bar
Impact: low
Show code
show_cover_bar = true
L66 🔴 global_write
Global write: debug_mode
Impact: low
Show code
debug_mode = false
L67 🔴 global_write
Global write: protect_companions_range
Impact: low
Show code
protect_companions_range = 15
L68 🔴 global_write
Global write: grace_period
Impact: low
Show code
grace_period = 1
L69 🔴 global_write
Global write: hud_delay
Impact: low
Show code
hud_delay = 0
L73 🔴 global_write
Global write: rays_per_update
Impact: low
Show code
rays_per_update = get_config("rays_per_update")
L74 🔴 global_write
Global write: ray_range
Impact: low
Show code
ray_range = get_config("cover_range")
L75 🔴 global_write
Global write: north_facing_bonus
Impact: low
Show code
north_facing_bonus = get_config("north_cover_bonus")
L76 🔴 global_write
Global write: cover_prcnt_needed
Impact: low
Show code
cover_prcnt_needed = get_config("distance_factor")
L77 🔴 global_write
Global write: debug_mode
Impact: low
Show code
debug_mode = get_config("debug_mode")
L78 🔴 global_write
Global write: show_cover_bar
Impact: low
Show code
show_cover_bar = get_config("show_cover_bar")
L79 🔴 global_write
Global write: protect_companions_range
Impact: low
Show code
protect_companions_range = get_config("protect_companions")
L80 🔴 global_write
Global write: grace_period
Impact: low
Show code
grace_period = get_config("grace_period")
L81 🔴 global_write
Global write: hud_delay
Impact: low
Show code
hud_delay = get_config("hud_show_delay")
L105 🔴 global_write
Global write: excluded_maps
Impact: low
Show code
excluded_maps = {
L117 🔴 global_write
Global write: dynamic_is_safe
Impact: low
Show code
dynamic_is_safe = false
L221 🔴 global_write
Global write: dynamic_is_safe
Impact: low
Show code
dynamic_is_safe = true
L232 🔴 global_write
Global write: dynamic_is_safe
Impact: low
Show code
dynamic_is_safe = false
L238 🔴 global_write
Global write: dynamic_is_safe
Impact: low
Show code
dynamic_is_safe = false
L257 🔴 global_write
Global write: dynamic_is_safe
Impact: low
Show code
dynamic_is_safe = false
L290 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "dynamic_cover",sh=true ,gr={

433- UDP-9 Carbine - Pilliii

2 files (🟢3 🟡20 🔴48 🔵2)

mags_patches.script

L205 🟢 repeated_obj_id()
obj:id() called 3x in ui_item.build_desc_header
Impact: low
Show code
Cache obj:id() result
L708 🟢 repeated_wpn_id()
wpn:id() called 3x in SwitchNextAmmo
Impact: low
Show code
Cache wpn:id() result
L743 🟢 repeated_wpn_id()
wpn:id() called 3x in OnAmmo
Impact: low
Show code
Cache wpn:id() result
L226 🟡 string_concat_in_loop
String concat in loop: _str = _str .. x
Impact: critical
Show code
_str = _str .. clr_p .. gc("st_dot") .. " ".. clr_1 .. gc("st_mag_"..k) .. " " .. utils_xml.get_color_con(color_ratio) .. v .. "/" .. total ..(total > outfit_slots[k] and string.format(gc("st_mag_bonus"),outfit_slots[k],total - outfit_slots[k] ) or "") .. "\\n"
L232 🟡 string_concat_in_loop
String concat in loop: _str = _str .. x
Impact: critical
Show code
_str = _str .. clr_p .. gc("st_dot") .. " ".. clr_1 .. gc("st_mag_"..k)..slots.. "\\n"
L298 🟡 string_concat_in_loop
String concat in loop: _str = _str .. x
Impact: critical
Show code
_str = _str .. "\\n " .. gc("st_dot").." ".. collected[#collected - i + 1]
L3 🔴 global_write
Global write: gc
Impact: low
Show code
gc = game.translate_string
L4 🔴 global_write
Global write: get_data
Impact: low
Show code
get_data = magazine_binder.get_data
L5 🔴 global_write
Global write: set_data
Impact: low
Show code
set_data = magazine_binder.set_data
L6 🔴 global_write
Global write: dump_data
Impact: low
Show code
dump_data = magazine_binder.dump_data
L7 🔴 global_write
Global write: is_supported_weapon
Impact: low
Show code
is_supported_weapon = magazine_binder.is_supported_weapon
L8 🔴 global_write
Global write: get_magazine_caliber
Impact: low
Show code
get_magazine_caliber = magazine_binder.get_magazine_caliber
L9 🔴 global_write
Global write: is_compatible
Impact: low
Show code
is_compatible = magazine_binder.is_compatible
L10 🔴 global_write
Global write: is_magazine
Impact: low
Show code
is_magazine = magazine_binder.is_magazine
L11 🔴 global_write
Global write: is_carried_mag
Impact: low
Show code
is_carried_mag = magazine_binder.is_carried_mag
L12 🔴 global_write
Global write: toggle_carried_mag
Impact: low
Show code
toggle_carried_mag = magazine_binder.toggle_carried_mag
L13 🔴 global_write
Global write: room_in_pouch
Impact: low
Show code
room_in_pouch = magazine_binder.room_in_pouch
L14 🔴 global_write
Global write: eject
Impact: low
Show code
eject = magazines.eject_magazine
L15 🔴 global_write
Global write: get_total_carried
Impact: low
Show code
get_total_carried = magazine_binder.get_total_carried
L16 🔴 global_write
Global write: get_loadout_size
Impact: low
Show code
get_loadout_size = magazine_binder.get_loadout_size
L17 🔴 global_write
Global write: weapon_default_magazine
Impact: low
Show code
weapon_default_magazine = magazine_binder.weapon_default_magazine
L18 🔴 global_write
Global write: get_mag_loaded
Impact: low
Show code
get_mag_loaded = magazine_binder.get_mag_loaded
L19 🔴 global_write
Global write: print_dbg
Impact: low
Show code
print_dbg = magazines.print_dbg
L20 🔴 global_write
Global write: has_loadout_slots
Impact: low
Show code
has_loadout_slots = magazine_binder.has_loadout_slots
L21 🔴 global_write
Global write: get_loadout_slots
Impact: low
Show code
get_loadout_slots = magazine_binder.get_loadout_slots
L22 🔴 global_write
Global write: create_mag_data
Impact: low
Show code
create_mag_data = magazine_binder.create_mag_data
L23 🔴 global_write
Global write: validate_mag
Impact: low
Show code
validate_mag = magazine_binder.validate_mag
L24 🔴 global_write
Global write: validate_wep
Impact: low
Show code
validate_wep = magazine_binder.validate_wep
L25 🔴 global_write
Global write: create_time_event
Impact: low
Show code
create_time_event = magazines.create_time_event
L26 🔴 global_write
Global write: get_sec_chambered
Impact: low
Show code
get_sec_chambered = magazines.get_sec_chambered
L27 🔴 global_write
Global write: get_config
Impact: low
Show code
get_config = magazines_mcm.get_config
L41 🔴 global_write
Global write: mousebase
Impact: low
Show code
mousebase = utils_ui.UICellContainer.On_Mouse1
L83 🔴 global_write
Global write: DisassemblyWeapon
Impact: low
Show code
DisassemblyWeapon = item_parts.disassembly_weapon
L99 🔴 global_write
Global write: WorkshopUpgrade
Impact: low
Show code
WorkshopUpgrade = ui_workshop.UIWorkshopUpgrade.Upgrade
L121 🔴 global_write
Global write: WorkshopRepair
Impact: low
Show code
WorkshopRepair = ui_workshop.UIWorkshopRepair.Repair
L142 🔴 global_write
Global write: CanRepair
Impact: low
Show code
CanRepair = inventory_upgrades.can_repair_item
L148 🔴 global_write
Global write: TechUpgrade
Impact: low
Show code
TechUpgrade = ui_inventory.UIInventory.RMode_UpgradeYes
L164 🔴 global_write
Global write: UnloadAll
Impact: low
Show code
UnloadAll = item_weapon.unload_all_weapons
L199 🔴 global_write
Global write: original_build_desc_header
Impact: low
Show code
original_build_desc_header = ui_item.build_desc_header
L273 🔴 global_write
Global write: original_build_desc_footer
Impact: low
Show code
original_build_desc_footer = ui_item.build_desc_footer
L296 🔴 global_write
Global write: collected
Impact: low
Show code
collected = collect_mag_data(mag_data, true)
L319 🔴 global_write
Global write: CloneWep
Impact: low
Show code
CloneWep = _G.alife_clone_weapon
L331 🔴 global_write
Global write: AttachScope
Impact: low
Show code
AttachScope = item_weapon.attach_scope
L340 🔴 global_write
Global write: DetachScope
Impact: low
Show code
DetachScope = item_weapon.detach_scope
L357 🔴 global_write
Global write: id_1
Impact: low
Show code
id_1 = alife_create_item(default_mag, db.actor)
L358 🔴 global_write
Global write: id_2
Impact: low
Show code
id_2 = alife_create_item(default_mag, db.actor)
L367 🔴 global_write
Global write: NewGameEquipment
Impact: low
Show code
NewGameEquipment = itms_manager.new_game_equippment
L373 🔴 global_write
Global write: AzazelDeath
Impact: low
Show code
AzazelDeath = gamemode_azazel.actor_on_before_death
L434 🔴 global_write
Global write: BarTele
Impact: low
Show code
BarTele = xr_effects.bar_arena_teleport
L491 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if wpn and IsWeapon(wpn) and (not IsItem("fake_ammo_wpn",wpn:section())) then
L683 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if wpn and (wpn:section() == self.section) then
L738 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if wpn and (wpn:section() == self.section) and self.avail[n] then
L312 🟡 unused_local_variable
Local variable 'string_find' is assigned but never used
Impact: low
Show code
local string_find = string.find
L180 🟡 unused_local_variable
Local variable 'math_ceil' is assigned but never used
Impact: low
Show code
local math_ceil = math.ceil
L184 🟡 unused_local_variable
Local variable 'clr_y' is assigned but never used
Impact: low
Show code
local clr_y = utils_xml.get_color("yellow")
L185 🟡 unused_local_variable
Local variable 'clr_o' is assigned but never used
Impact: low
Show code
local clr_o = utils_xml.get_color("d_orange")
L188 🟡 unused_local_variable
Local variable 'clr_b' is assigned but never used
Impact: low
Show code
local clr_b = utils_xml.get_color("d_cyan")
L189 🟡 unused_local_variable
Local variable 'clr_b1' is assigned but never used
Impact: low
Show code
local clr_b1 = utils_xml.get_color("pda_blue")
L190 🟡 unused_local_variable
Local variable 'clr_b2' is assigned but never used
Impact: low
Show code
local clr_b2 = utils_xml.get_color("d_blue")
L193 🟡 unused_local_variable
Local variable 'clr_w' is assigned but never used
Impact: low
Show code
local clr_w = utils_xml.get_color("pda_white")
L313 🟡 unused_local_variable
Local variable 'string_gsub' is assigned but never used
Impact: low
Show code
local string_gsub = string.gsub

utjan_mag_check.script

L14 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!Old mag check script (ammo_check_mcm) detected. Remove it to get full features of mag checks")
L90 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!Old mag check script (ammo_check_mcm) detected. Remove it to get full features of mag checks")
L3 🔴 global_write
Global write: do_ammo_check_anim
Impact: low
Show code
do_ammo_check_anim = nil
L6 🔴 global_write
Global write: base_check_Ammo
Impact: low
Show code
base_check_Ammo = ammo_check_mcm.check_Ammo
L62 🔴 global_write
Global write: do_ammo_check_anim
Impact: low
Show code
do_ammo_check_anim = 1
L66 🔴 global_write
Global write: do_ammo_check_anim
Impact: low
Show code
do_ammo_check_anim = nil
L86 🔴 global_write
Global write: do_ammo_check_anim
Impact: low
Show code
do_ammo_check_anim = 2
L27 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local currentState = weapon:get_state()
L28 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
if not (currentState == 0 or weapon:weapon_in_grenade_mode()) then
L34 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local currentAmmo = weapon:get_ammo_in_magazine()
L40 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local anm_ammo_check = common.has_animation(weapon:section(), "anm_ammo_check")
L63 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
weapon:switch_state(4)

437- Weighted NPC Random Loadouts - SD

1 file (🟢7 🟡3 🔴0 🔵6)

xrs_rnd_npc_loadout.script

L126 🟢 table_insert_append
table.insert(loadouts[section], v) -> loadouts[section][#loadouts[section]+1] = v
Impact: high
Show code
table.insert(loadouts[section], base_entry)
L229 🟢 table_insert_append
table.insert(filtered_scopes, v) -> filtered_scopes[#filtered_scopes+1] = v
Impact: high
Show code
table.insert(filtered_scopes, scopes[i])
L308 🟢 table_insert_append
table.insert(tmp, v) -> tmp[#tmp+1] = v
Impact: high
Show code
table.insert(tmp, valid_flags[i]+1)
L315 🟢 table_insert_append
table.insert(tmp, v) -> tmp[#tmp+1] = v
Impact: high
Show code
table.insert(tmp, valid_flags[i]+2)
L322 🟢 table_insert_append
table.insert(tmp, v) -> tmp[#tmp+1] = v
Impact: high
Show code
table.insert(tmp, valid_flags[i]+4)
L35 🟢 uncached_globals_summary
Cache 1 globals in init_settings
Impact: medium
Show code
L48: tonumber L56: tonumber
L159 🟢 uncached_globals_summary
Cache 1 globals in create_item_on_npc
Impact: medium
Show code
L181: math.random L217: math.random
L382 🟡 string_concat_in_loop
String concat in loop: loadout = loadout .. x
Impact: critical
Show code
loadout = loadout .. "_" .. tbl_rank[k2]
L129 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR: NPC Loadouts | something is wrong in [%s] - %s", section, tmp[1])
L270 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR: NPC Loadouts | wrong ammo_type set for [%s], missing value in ammo_class", section)
L334 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L355 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR: NPC Loadouts | section [%s] doesn't exist", slot)
L391 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR: NPC Loadouts | loadout [%s] doesn't exist", loadout)
L397 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(print_tbl[i])
L38 🟡 unused_local_variable
Local variable 'cnt' is assigned but never used
Impact: low
Show code
local cnt = 0
L41 🟡 unused_local_variable
Local variable 'sfind' is assigned but never used
Impact: low
Show code
local sfind = string.find

439- The Covenant Weapon Pack for DX9 - TCWP Team

2 files (🟢2 🟡2 🔴15 🔵0)

grok_casings_sounds.script

L175 🟢 uncached_globals_summary
Cache 1 globals in actor_on_weapon_fired
Impact: medium
Show code
L202: math.random L213: math.random
L7 🔴 global_write
Global write: mat_to_sound
Impact: low
Show code
mat_to_sound = {
L24 🔴 global_write
Global write: cal_to_sound
Impact: low
Show code
cal_to_sound = {
L75 🔴 global_write
Global write: time_table
Impact: low
Show code
time_table = {
L110 🔴 global_write
Global write: no_casing_drop
Impact: low
Show code
no_casing_drop = {
L151 🔴 global_write
Global write: mat
Impact: low
Show code
mat = "default"
L158 🔴 global_write
Global write: found_mat
Impact: low
Show code
found_mat = sf(current_material, k)
L165 🔴 global_write
Global write: material_sound
Impact: low
Show code
material_sound = mat_to_sound[current_material]
L167 🔴 global_write
Global write: material_sound
Impact: low
Show code
material_sound = mat_to_sound["default"]
L198 🔴 global_write
Global write: material_sound
Impact: low
Show code
material_sound = mat_to_sound["default"]
L202 🔴 global_write
Global write: rand
Impact: low
Show code
rand = math.random(1,100)
L204 🔴 global_write
Global write: material_sound
Impact: low
Show code
material_sound = "grass"
L206 🔴 global_write
Global write: material_sound
Impact: low
Show code
material_sound = "grass"
L208 🔴 global_write
Global write: material_sound
Impact: low
Show code
material_sound = "dirt"
L218 🔴 global_write
Global write: vol
Impact: low
Show code
vol = math.random(1,6) * 0.1
L227 🔴 global_write
Global write: vol
Impact: low
Show code
vol = math.random(1,6) * 0.1
L5 🟡 unused_local_variable
Local variable 'dte' is assigned but never used
Impact: low
Show code
local dte = demonized_time_events

lower_weapon_sprint.script

L188 🟢 repeated_wpn_section()
wpn:section() called 5x in actor_on_update
Impact: low
Show code
Cache wpn:section() result
L171 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
local state = wpn:get_state()

44- Bounty Squads Extended - Vintar0

2 files (🟢0 🟡0 🔴3 🔵0)

grok_gotta_go_fast.script

L10 🔴 global_write
Global write: run_coeff
Impact: low
Show code
run_coeff = grok_gotta_go_fast_mcm.get_config("gotta_go_fast_run")
L11 🔴 global_write
Global write: sprint_coeff
Impact: low
Show code
sprint_coeff = grok_gotta_go_fast_mcm.get_config("gotta_go_fast_sprint")

grok_gotta_go_fast_mcm.script

L12 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "gggf",sh=true ,gr={

446- Quick Action Wheel - HarukaSai

3 files (🟢13 🟡26 🔴18 🔵21)

custom_functor_autoinject.script

L114 🟢 string_len
string.len(pos) -> #pos
Impact: low
Show code
sub_print_r(val,indent..string.rep(" ",string.len(pos)+8))
L115 🟢 string_len
string.len(pos) -> #pos
Impact: low
Show code
printf(indent..string.rep(" ",string.len(pos)+6).."}")
L105 🟢 uncached_globals_summary
Cache 1 globals in sub_print_r
Impact: medium
Show code
L106: tostring L107: tostring
L128 🟢 uncached_globals_summary
Cache 1 globals in print_table
Impact: medium
Show code
L137: type L139: type
L107 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."*"..tostring(t))
L113 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."["..pos.."] => "..tostring(t).." {")
L115 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent..string.rep(" ",string.len(pos)+6).."}")
L117 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."["..pos.."] => "..tostring(val))
L121 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent..tostring(t))
L140 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = function",k)
L143 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s",k,utils_data.vector_to_string(v))
L145 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = userdata", k)
L150 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = true",k)
L152 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = true")
L156 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = false", k)
L158 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = false")
L163 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s", k,v)
L165 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = nil", k,v)
L319 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s, %s", k, v.index)
L322 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s, %s, max custom_functor reached", k, v.index)
L424 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Custom functors, processing queue")
L427 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Custom functors, type %s", v.type)
L464 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("functor slot is not valid, min 1, max 10, your slot: %s", slot)
L479 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("functor slot is not valid min 1, max 10, your slot: %s", slot)
L515 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[" .. k .. "] => ")
L98 🟡 unused_local_variable
Local variable 'table_remove' is assigned but never used
Impact: low
Show code
local table_remove = table.remove

haru_arm.script

L184 🟢 table_insert_append
table.insert(self.options, v) -> self.options[#self.options+1] = v
Impact: high
Show code
table.insert(self.options, option)
L17 🔴 global_write
Global write: p_width
Impact: low
Show code
p_width = parent_width or 1024
L18 🔴 global_write
Global write: p_center
Impact: low
Show code
p_center = p_width/2
L19 🔴 global_write
Global write: width
Impact: low
Show code
width = ele:GetWidth()
L20 🔴 global_write
Global write: pos
Impact: low
Show code
pos = ele:GetWndPos()
L21 🔴 global_write
Global write: anchorpos
Impact: low
Show code
anchorpos = {}
L25 🔴 global_write
Global write: ratio
Impact: low
Show code
ratio = (device().height / device().width) / (768 / 1024)
L26 🔴 global_write
Global write: xadjust
Impact: low
Show code
xadjust = anchorpos.left
L29 🔴 global_write
Global write: xadjust
Impact: low
Show code
xadjust = p_width - (p_width - (anchor and anchorpos[anchor] or anchorpos.left))*ratio
L31 🔴 global_write
Global write: xadjust
Impact: low
Show code
xadjust = p_center - (p_center - (anchor and anchorpos[anchor] or anchorpos.left))*ratio
L33 🔴 global_write
Global write: xadjust
Impact: low
Show code
xadjust = ratio * (anchor and anchorpos[anchor] or anchorpos.left)
L48 🔴 global_write
Global write: States
Impact: low
Show code
States = {
L55 🔴 global_write
Global write: State2Colour
Impact: low
Show code
State2Colour = {

haru_quick_action_wheel_mcm.script

L409 🟢 table_insert_append
table.insert(self.tabs[tab], v) -> self.tabs[tab][#self.tabs[tab]+1] = v
Impact: high
Show code
table.insert(self.tabs[tab], {
L1399 🟢 table_insert_append
table.insert(t, v) -> t[#t+1] = v
Impact: high
Show code
table.insert(t, get_obj_inv_slot(obj))
L1621 🟢 table_insert_append
table.insert(options.gr[2].gr, v) -> options.gr[2].gr[#options.gr[2].gr+1] = v
Impact: high
Show code
table.insert(options.gr[2].gr, category_options[i])
L1627 🟢 table_insert_append
table.insert(options.gr[1].gr, v) -> options.gr[1].gr[#options.gr[1].gr+1] = v
Impact: high
Show code
table.insert(options.gr[1].gr, quick_keys[i])
L112 🟢 uncached_globals_summary
Cache 1 globals in __init
Impact: medium
Show code
L117: ipairs L119: ipairs
L174 🟢 uncached_globals_summary
Cache 1 globals in GetItemTable
Impact: medium
Show code
L190: pairs L200: pairs
L1732 🟢 uncached_globals_summary
Cache 1 globals in on_option_change
Impact: medium
Show code
L1735: pairs L1736: pairs
L399 🟢 repeated_obj_id()
obj:id() called 3x in AddItem
Impact: low
Show code
Cache obj:id() result
L9 🔴 global_write
Global write: wheel_states
Impact: low
Show code
wheel_states = haru_arm.States
L14 🔴 global_write
Global write: override_quick_keys
Impact: low
Show code
override_quick_keys = {
L19 🔴 global_write
Global write: add_to_qaw_functor
Impact: low
Show code
add_to_qaw_functor = {
L34 🔴 global_write
Global write: tab_categories
Impact: low
Show code
tab_categories = {[2] = "devices", [3] = "attachments", [4] = "food", [5] = "meds", [6] = "grenades", [7] = "ammo", [8] = "slots"}
L85 🔴 global_write
Global write: is_magazine
Impact: low
Show code
is_magazine = magazine_binder and magazine_binder.is_magazine and function(obj)
L89 🔴 global_write
Global write: supports_magazines
Impact: low
Show code
supports_magazines = magazine_binder and magazine_binder.is_supported_weapon and function(obj)
L177 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if (not wpn) or (not IsWeapon(wpn)) or IsItem("fake_ammo_wpn",wpn:section()) then
L182 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
local sec = wpn:section()
L231 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if (not wpn) or (not IsWeapon(wpn)) or IsItem("fake_ammo_wpn",wpn:section()) then
L237 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if (supports_magazines(wpn)) and (not wpn:weapon_in_grenade_mode()) then
L245 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
local p = obj and obj:parent()
L253 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
local cwpn = wpn:cast_Weapon()
L714 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
local p = obj:parent()
L716 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if p and p:id() == AC_ID then
L774 🟡 potential_nil_access
Potential nil access: 'item_in_slot' from :item_in_slot() used without nil check
Impact: low
Show code
if item_in_slot and item_in_slot:id() == id then
L795 🟡 potential_nil_access
Potential nil access: 'item_in_slot' from :item_in_slot() used without nil check (auto-fixable)
Impact: low
Show code
self.selected_bg:Show(item_in_slot and item_in_slot:section() == self.section)
L809 🟡 potential_nil_access
Potential nil access: 'item_in_slot' from :item_in_slot() used without nil check
Impact: low
Show code
if item_in_slot and item_in_slot:section() == self.section then
L877 🟡 potential_nil_access
Potential nil access: 'device_in_slot' from :item_in_slot() used without nil check
Impact: low
Show code
if device_in_slot and device_in_slot:section() == self.section then
L1224 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
wpn:switch_state(7)
L1228 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if magazines_mcm.get_config("retain_round") and wpn:get_ammo_in_magazine() > 0 then
L1236 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
"delay_weapon"..wpn:id(),
L1239 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
MCM_SETTINGS.old_mags_compat and wpn or wpn:id(),
L1298 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if (not wpn) or (not IsWeapon(wpn)) or IsItem("fake_ammo_wpn",wpn:section()) then
L1303 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
local cwpn = wpn:cast_Weapon()
L1305 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if supports_magazines(wpn) and (not wpn:weapon_in_grenade_mode()) then
L1333 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check (auto-fixable)
Impact: low
Show code
wpn:unload_magazine(true)
L1334 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
wpn:set_ammo_type(self.ammo_type)
L1363 🟡 potential_nil_access
Potential nil access: 'item_in_slot' from :item_in_slot() used without nil check
Impact: low
Show code
if (not item_in_slot) or item_in_slot:id() ~= self.item_id then
L1394 🟡 potential_nil_access
Potential nil access: 'item_in_slot' from :item_in_slot() used without nil check (auto-fixable)
Impact: low
Show code
return item_in_slot and item_in_slot:id() == self.item_id
L1715 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if IsWeapon(wpn) and (not IsItem("fake_ammo_wpn",wpn:section())) then
L1727 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
elseif ((IsWeapon(wpn) and IsItem("fake_ammo_wpn",wpn:section())) or (IsItem("device", nil, wpn))) and tbh.slots then

447- FDDA Redone - lizzardman

21 files (🟢26 🟡31 🔴79 🔵68)

af_inspect.script

L61 🟢 uncached_globals_summary
Cache 1 globals in get_light_rgb
Impact: medium
Show code
L66: tonumber L67: tonumber
L26 🟢 repeated_itm_section()
itm:section() called 4x in inspect
Impact: low
Show code
Cache itm:section() result
L160 🟢 repeated_alife
alife called 2x in actor_on_first_update
Impact: low
Show code
local sim = alife()
L1 🔴 global_write
Global write: af_anim_item
Impact: low
Show code
af_anim_item = nil
L2 🔴 global_write
Global write: active_slot
Impact: low
Show code
active_slot = nil
L3 🔴 global_write
Global write: particle
Impact: low
Show code
particle = nil
L4 🔴 global_write
Global write: pos
Impact: low
Show code
pos = nil
L6 🔴 global_write
Global write: ini
Impact: low
Show code
ini = ini_file("mod_system_af_inspect_anim.ltx")
L7 🔴 global_write
Global write: particle
Impact: low
Show code
particle = particles_object("artefact\\effects\\af_idle_dist")
L9 🔴 global_write
Global write: containers
Impact: low
Show code
containers = {
L29 🔴 global_write
Global write: af_anim_item
Impact: low
Show code
af_anim_item = art .. "_hud"
L32 🔴 global_write
Global write: af_anim_item
Impact: low
Show code
af_anim_item = itm:section() .. "_hud"
L36 🔴 global_write
Global write: af_anim_item
Impact: low
Show code
af_anim_item = nil
L37 🔴 global_write
Global write: active_slot
Impact: low
Show code
active_slot = nil
L42 🔴 global_write
Global write: active_slot
Impact: low
Show code
active_slot = db.actor:active_slot()
L74 🔴 global_write
Global write: pos
Impact: low
Show code
pos = db.actor:bone_position("jaw_1"):add(device().cam_dir:mul(0.3))
L85 🔴 global_write
Global write: af_anim_item
Impact: low
Show code
af_anim_item = nil
L86 🔴 global_write
Global write: active_slot
Impact: low
Show code
active_slot = nil
L94 🔴 global_write
Global write: light
Impact: low
Show code
light = script_light()
L97 🔴 global_write
Global write: light_bright
Impact: low
Show code
light_bright = bright
L98 🔴 global_write
Global write: light_range
Impact: low
Show code
light_range = range
L114 🔴 global_write
Global write: light_flag
Impact: low
Show code
light_flag = true
L119 🔴 global_write
Global write: light_bright
Impact: low
Show code
light_bright = light_bright
L120 🔴 global_write
Global write: light_range
Impact: low
Show code
light_range = light_range
L142 🔴 global_write
Global write: light_flag
Impact: low
Show code
light_flag = false

custom_functor_autoinject.script

L114 🟢 string_len
string.len(pos) -> #pos
Impact: low
Show code
sub_print_r(val,indent..string.rep(" ",string.len(pos)+8))
L115 🟢 string_len
string.len(pos) -> #pos
Impact: low
Show code
printf(indent..string.rep(" ",string.len(pos)+6).."}")
L105 🟢 uncached_globals_summary
Cache 1 globals in sub_print_r
Impact: medium
Show code
L106: tostring L107: tostring
L128 🟢 uncached_globals_summary
Cache 1 globals in print_table
Impact: medium
Show code
L137: type L139: type
L107 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."*"..tostring(t))
L113 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."["..pos.."] => "..tostring(t).." {")
L115 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent..string.rep(" ",string.len(pos)+6).."}")
L117 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."["..pos.."] => "..tostring(val))
L121 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent..tostring(t))
L140 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = function",k)
L143 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s",k,utils_data.vector_to_string(v))
L145 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = userdata", k)
L150 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = true",k)
L152 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = true")
L156 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = false", k)
L158 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = false")
L163 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s", k,v)
L165 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = nil", k,v)
L319 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s, %s", k, v.index)
L322 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s, %s, max custom_functor reached", k, v.index)
L424 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Custom functors, processing queue")
L427 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Custom functors, type %s", v.type)
L464 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("functor slot is not valid, min 1, max 10, your slot: %s", slot)
L479 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("functor slot is not valid min 1, max 10, your slot: %s", slot)
L515 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[" .. k .. "] => ")
L98 🟡 unused_local_variable
Local variable 'table_remove' is assigned but never used
Impact: low
Show code
local table_remove = table.remove

enhanced_animations.script

L1 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("disabled enhanced animations in favor of Redone FDDA")

item_device.script

L236 🟢 uncached_globals_summary
Cache 1 globals in on_key_release
Impact: medium
Show code
L268: math.floor L269: math.floor
L922 🟢 uncached_globals_summary
Cache 1 globals in process_flicker
Impact: medium
Show code
L934: math.random L935: math.random
L63 🟢 repeated_device
device called 4x in <global>
Impact: low
Show code
local dev = device()
L139 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe(
L156 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("item_device | %s | " .. txt, time_global(), ...)
L246 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("beef - key on-release")
L250 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("beef - brightness adjust")
L18 🔴 global_write
Global write: dev_consumption
Impact: low
Show code
dev_consumption = {} -- [sec] = {...} | Power consumption of device per stage
L19 🔴 global_write
Global write: dev_consumption_act
Impact: low
Show code
dev_consumption_act = {} -- [sec] = {...} | Power consumption of device per action (stage 2)
L20 🔴 global_write
Global write: dev_consumption_tot
Impact: low
Show code
dev_consumption_tot = {} -- [sec] = num | Total power consumption of a device
L21 🔴 global_write
Global write: dev_critical
Impact: low
Show code
dev_critical = {} -- [sec] = num | Power limit, devices go off when their power go below this value
L40 🔴 global_write
Global write: devices
Impact: low
Show code
devices = {}
L41 🔴 global_write
Global write: device_battery
Impact: low
Show code
device_battery = nil
L42 🔴 global_write
Global write: device_geiger
Impact: low
Show code
device_geiger = nil
L43 🔴 global_write
Global write: device_npc_pda
Impact: low
Show code
device_npc_pda = {}
L61 🔴 global_write
Global write: nv_state
Impact: low
Show code
nv_state = false -- make nv_state a global variable so we can access it from beefs_nvgs
L78 🔴 global_write
Global write: dosimeter_env_rads_mode
Impact: low
Show code
dosimeter_env_rads_mode = false
L93 🔴 global_write
Global write: device_battery
Impact: low
Show code
device_battery = ini_device:r_sec_ex("settings", "battery", "batteries_dead")
L94 🔴 global_write
Global write: device_geiger
Impact: low
Show code
device_geiger = ini_device:r_sec_ex("settings", "geiger", "detector_geiger")
L261 🔴 global_write
Global write: dosimeter_env_rads_mode
Impact: low
Show code
dosimeter_env_rads_mode = not dosimeter_env_rads_mode
L262 🔴 global_write
Global write: dosimeter_mode_string
Impact: low
Show code
dosimeter_mode_string = dosimeter_env_rads_mode and game.translate_string("st_environment_rads") or
L611 🔴 global_write
Global write: nv_state
Impact: low
Show code
nv_state = true
L617 🔴 global_write
Global write: nv_state
Impact: low
Show code
nv_state = false
L230 🟡 potential_nil_access
Potential nil access: 'torch' from :item_in_slot() used without nil check
Impact: low
Show code
set_nightvision(torch and torch:section(), not nv_state)
L308 🟡 potential_nil_access
Potential nil access: 'pda' from :item_in_slot() used without nil check
Impact: low
Show code
if pda and (not temp_con[pda:id()]) then
L314 🟡 potential_nil_access
Potential nil access: 'det' from :item_in_slot() used without nil check
Impact: low
Show code
if det and (not temp_con[det:id()]) then
L320 🟡 potential_nil_access
Potential nil access: 'torch' from :item_in_slot() used without nil check
Impact: low
Show code
if torch and (not temp_con[torch:id()]) then
L331 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if (p and p:id() == AC_ID) then
L381 🟡 potential_nil_access
Potential nil access: 'obj' from :item_in_slot() used without nil check
Impact: low
Show code
if obj and IsItem("device", obj:section()) then
L388 🟡 potential_nil_access
Potential nil access: 'torch' from :item_in_slot() used without nil check
Impact: low
Show code
if torch and torch:torch_enabled() then
L443 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L454 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then
L545 🟡 potential_nil_access
Potential nil access: 'torch' from :item_in_slot() used without nil check
Impact: low
Show code
local id = torch and torch:id()
L588 🟡 potential_nil_access
Potential nil access: 'torch' from :item_in_slot() used without nil check
Impact: low
Show code
local torch_sec = torch and torch:section()
L648 🟡 potential_nil_access
Potential nil access: 'pda' from :item_in_slot() used without nil check
Impact: low
Show code
if actor_only and device_npc_pda[pda:section()] then
L712 🟡 potential_nil_access
Potential nil access: 'parent' from :parent() used without nil check
Impact: low
Show code
if parent and (parent:id() ~= AC_ID) then
L147 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, sec, value = ini_device:r_line_ex("npc_pda", i, "", "")

lam2.script

L662 🟢 table_insert_append
table.insert(self.transitions[from], v) -> self.transitions[from][#self.transitions[from]+1] = v
Impact: high
Show code
table.insert(self.transitions[from], { predicate = predicate, to = to })
L103 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[CORE] Add action called. Action tag is %s", action.tag or "nil")
L115 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[CORE] Add action first called. Action tag is %s", action.tag or "nil")
L128 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[CORE] Push action called. Action tag is %s", action.tag or "nil")
L151 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[CORE] Stop all actions function called")
L166 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[CORE] Abort function called")
L213 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[CORE] Get action with tag called: %s is found", tag)
L218 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[CORE] Get action with tag called: %s is found", tag)
L222 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[CORE] Get action with tag called: %s is nil", tag)
L244 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[CORE] Trying to get next action")
L251 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[CORE] Action requires free hand: %s", next_action.hands)
L253 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[CORE] Hands are busy, try to free them")
L260 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[CORE] Get new action with tag %s, setting it in", next_action.tag and next_action.tag or "nil")
L263 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[CORE] No actions left")
L272 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[CORE] LAM2 Update: Action count %s | Current action tag %s | Current action name %s",
L298 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[LIZ.LAM2] " .. message, ...)
L443 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[CORE] Play animation state update: animation time %s | duration %s", time, self.duration)
L483 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[CORE] Hide weapons state: on enter")
L495 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[CORE] Hide weapons state: on enter: hide detector")
L500 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[CORE] Hide weapons state: on enter: hide weapon")
L502 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[CORE] Hide weapons state: on enter result: cur_slot %s | det_active %s | self.hand %s", cur_slot, det_active, self.hand)
L507 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[CORE] On execute: wpn %s | det %s | self.hand %s", wpn, det, self.hand)
L526 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[CORE] Restore weapons state")
L531 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[CORE] Restore weapons state: restore body search: inventory gui npc id is %s", inv_gui.npc_id)
L540 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[CORE] Restore weapons state: try open backpack")
L546 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[CORE] Restore weapons state: show detector")
L552 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[CORE] Restore weapons state: show weapon")
L569 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[CORE] Stop LAM2 State: on actions left, shutting down...")
L10 🔴 global_write
Global write: cur_slot
Impact: low
Show code
cur_slot = nil
L11 🔴 global_write
Global write: det_active
Impact: low
Show code
det_active = nil
L12 🔴 global_write
Global write: snd_obj
Impact: low
Show code
snd_obj = nil
L13 🔴 global_write
Global write: states
Impact: low
Show code
states = { running = 0, success = 1, fail = 2 }
L39 🔴 global_write
Global write: cur_slot
Impact: low
Show code
cur_slot = nil
L40 🔴 global_write
Global write: det_active
Impact: low
Show code
det_active = nil
L184 🔴 global_write
Global write: cur_slot
Impact: low
Show code
cur_slot = nil
L185 🔴 global_write
Global write: det_active
Impact: low
Show code
det_active = nil
L227 🔴 global_write
Global write: result
Impact: low
Show code
result = list_get_next_action() and true or false
L486 🔴 global_write
Global write: cur_slot
Impact: low
Show code
cur_slot = wpn
L487 🔴 global_write
Global write: det_active
Impact: low
Show code
det_active = det
L489 🔴 global_write
Global write: cur_slot
Impact: low
Show code
if self.hand == 1 then cur_slot = nil end
L490 🔴 global_write
Global write: det_active
Impact: low
Show code
if self.hand == 0 then det_active = nil end
L549 🔴 global_write
Global write: det_active
Impact: low
Show code
det_active = nil
L554 🔴 global_write
Global write: cur_slot
Impact: low
Show code
cur_slot = nil

liz_fdda_input_manager.script

L81 🔴 global_write
Global write: is_input_disabled
Impact: low
Show code
is_input_disabled = false

liz_fdda_redone_animation_mutator.script

L4 🟢 table_insert_append
table.insert(mutators, v) -> mutators[#mutators+1] = v
Impact: high
Show code
table.insert(mutators, { priority, mutator })
L11 🔴 global_write
Global write: section
Impact: low
Show code
section = mutator[2](section)

liz_fdda_redone_backpack.script

L2 🔴 global_write
Global write: is_ui_inventory_open
Impact: low
Show code
is_ui_inventory_open = false
L47 🔴 global_write
Global write: is_ui_inventory_open
Impact: low
Show code
is_ui_inventory_open = true
L55 🔴 global_write
Global write: is_ui_inventory_open
Impact: low
Show code
is_ui_inventory_open = false
L103 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check (auto-fixable)
Impact: low
Show code
speed = ini_sys:r_float_ex(obj:section(), "bonus_open_speed") or mcm_backpack_min_speed

liz_fdda_redone_backpack_equip.script

L109 🟡 potential_nil_access
Potential nil access: 'item_obj' from :item_in_slot() used without nil check
Impact: low
Show code
if item_obj and item_obj:id() == self.obj_id then

liz_fdda_redone_body_search.script

L77 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
lam2.log("[BODY SEARCH] haruka patch timed event called")
L88 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
lam2.log("[BODY SEARCH] event on inventory open called")
L89 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
lam2.log("[BODY SEARCH] skill add variable: %s | npc variable: %s", is_haruka_scav_skill_add, haruka_scav_skill_npc and "true" or "nil")
L164 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
lam2.log("[BODY SEARCH] Start check: %s", lam2.get_action_with_tag("body_search"))
L4 🔴 global_write
Global write: is_looting
Impact: low
Show code
is_looting = false
L66 🔴 global_write
Global write: originalCRI
Impact: low
Show code
originalCRI = haru_skills.CreateReleaseItem
L103 🔴 global_write
Global write: wpn
Impact: low
Show code
wpn = active_slot ~= 0 and active_slot ~= 15 -- support for wpn_hands
L104 🔴 global_write
Global write: detector
Impact: low
Show code
detector = db.actor:active_detector()

liz_fdda_redone_consumables.script

L65 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("detector pressed")
L75 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
lam2.log("[CONSUMABLES] Item play fx fucntion called: %s", item)
L134 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
lam2.log("[CONSUMABLES] actor on item before use EOF. flag state is: %s", flags.ret_value)
L183 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
lam2.log("[CONSUMABLES] Self.tm: %s | duration: %s", self.tm, self.duration)
L311 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
lam2.log("[CONSUMABLES] FDDA item speed is: %s", self.speed)
L340 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
lam2.log("[CONSUMABLES] Animation time: %s | duration: %s", time, self.duration)
L99 🔴 global_write
Global write: originalAOIBU
Impact: low
Show code
originalAOIBU = itms_manager.actor_on_item_before_use
L100 🔴 global_write
Global write: modifiedAOIBU
Impact: low
Show code
modifiedAOIBU = function (obj, flags)
L345 🔴 global_write
Global write: callback_result
Impact: low
Show code
callback_result = self:on_execute(time)

liz_fdda_redone_headgear_animations.script

L282 🟢 repeated_item_obj_equip_section()
item_obj_equip:section() called 3x in ta_equip
Impact: low
Show code
Cache item_obj_equip:section() result
L293 🟢 repeated_item_obj_uneqiup_section()
item_obj_uneqiup:section() called 4x in ta_equip
Impact: low
Show code
Cache item_obj_uneqiup:section() result
L233 🟡 potential_nil_access
Potential nil access: 'torch' from :item_in_slot() used without nil check (auto-fixable)
Impact: low
Show code
r_nvg.set_nightvision_animated(torch and torch:section(), not item_device.nv_state)
L324 🟡 potential_nil_access
Potential nil access: 'item_obj' from :item_in_slot() used without nil check
Impact: low
Show code
if item_obj and item_obj:id() == self.obj_id then

liz_fdda_redone_headgear_animations_hotkey.script

L107 🟡 potential_nil_access
Potential nil access: 'currentHelmet' from :item_in_slot() used without nil check
Impact: low
Show code
if currentHelmet and ini_blacklist:section_exist(currentHelmet:section()) then return end

liz_fdda_redone_item_pickup.script

L101 🟢 table_insert_append
table.insert(items, v) -> items[#items+1] = v
Impact: high
Show code
table.insert(items, item:id())
L146 🟢 table_insert_append
table.insert(item_table, v) -> item_table[#item_table+1] = v
Impact: high
Show code
table.insert(item_table, obj:id())
L39 🟢 repeated_item_id()
item:id() called 3x in actor_on_item_before_pickup
Impact: low
Show code
Cache item:id() result
L166 🔴 global_write
Global write: att_hand
Impact: low
Show code
att_hand = db.actor:add_attachment("liz_pickup", world_model)
L117 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:take_item(item_obj)

liz_fdda_redone_mutant_skinning.script

L165 🟢 repeated_obj_clsid()
obj:clsid() called 3x in get_knife_object
Impact: low
Show code
Cache obj:clsid() result
L77 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
lam2.log("[MUTANT SKINNING] Monster part taken. anm section name: %s", anim_sec_name) --will check how many times it will be called
L132 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
lam2.log("[MUTANT SKINNING] Play blood fx called on object: %s", target:id())
L263 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
lam2.log("[MUTANT SKINNING] Knife Degrade applied")
L165 🟡 potential_nil_access
Potential nil access: 'obj' from :active_item() used without nil check
Impact: low
Show code
if obj and obj:clsid() == clsid.wpn_knife_s then
L174 🟡 potential_nil_access
Potential nil access: 'item' from :item_in_slot() used without nil check
Impact: low
Show code
local section = item and item:section() or ""

liz_fdda_redone_outfit.script

L176 🟡 potential_nil_access
Potential nil access: 'item_obj' from :item_in_slot() used without nil check
Impact: low
Show code
if item_obj and item_obj:id() == self.obj_id then

rax_persistent_highlight.script

L24 🟢 table_insert_append
table.insert(persistent_highlights[name], v) -> persistent_highlights[name][#persistent_highlights[name]+1] = v
Impact: high
Show code
table.insert(persistent_highlights[name], functor)
L57 🟢 uncached_globals_summary
Cache 1 globals in change_alpha
Impact: medium
Show code
L61: bit.band L62: bit.band
L44 🔴 global_write
Global write: persistant_highlight
Impact: low
Show code
persistant_highlight = self:GetPersistantHighlight()
L47 🔴 global_write
Global write: color
Impact: low
Show code
color = main_clr and change_alpha(persistant_highlight, 255) or persistant_highlight -- if main_clr set the alpha to max for reasons.
L55 🔴 global_write
Global write: clr_cache
Impact: low
Show code
clr_cache = {}
L61 🔴 global_write
Global write: b
Impact: low
Show code
b = bit.band(clr, 255)
L62 🔴 global_write
Global write: g
Impact: low
Show code
g = bit.band(bit.rshift(clr, 8), 255)
L63 🔴 global_write
Global write: r
Impact: low
Show code
r = bit.band(bit.rshift(clr, 16), 255)

z_beefs_nvgs.script

L93 🟢 uncached_globals_summary
Cache 2 globals in pack_nvg_data
Impact: medium
Show code
L94: tostring L95: tostring L96: math.floor L97: math.floor
L107 🟢 uncached_globals_summary
Cache 1 globals in pack_nvg_data_2
Impact: medium
Show code
L108: tostring L109: tostring
L122 🟢 repeated_get_console
get_console called 3x in update_nvgs
Impact: low
Show code
local console = get_console()
L449 🟢 repeated_get_console
get_console called 4x in actor_on_weapon_zoom_in
Impact: low
Show code
local console = get_console()
L158 🔴 global_write
Global write: play_animation
Impact: low
Show code
play_animation = false
L161 🔴 global_write
Global write: play_animation
Impact: low
Show code
play_animation = false
L535 🔴 global_write
Global write: tg
Impact: low
Show code
tg = time_global()
L454 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if wpn:weapon_scope_status() == 2 then
L455 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if wpn:weapon_is_scope() then
L457 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
scopeName = utils_item.get_param(scope, wpn:id(), "scope_texture", "string")
L460 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
scopeName = utils_item.get_param(wpn:section(), wpn:id(), "scope_texture", "string")
L460 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
scopeName = utils_item.get_param(wpn:section(), wpn:id(), "scope_texture", "string")
L136 🟡 unused_local_variable
Local variable 'lowered_anm_kinds' is assigned but never used
Impact: low
Show code
local lowered_anm_kinds = {
L143 🟡 unused_local_variable
Local variable 'lowered_anm_classes' is assigned but never used
Impact: low
Show code
local lowered_anm_classes = {

z_liz_fdda_redone_mask_clean.script

L14 🟢 repeated_itm_active_section()
itm_active:section() called 3x in <global>
Impact: low
Show code
Cache itm_active:section() result

zz_liz_fdda_redone_outfit_patches.script

L117 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
lam2.log("[PATCH ANIMATION] On Skip called: Patch action done: %s", self.patch_action_done)
L55 🔴 global_write
Global write: InventoryClick
Impact: low
Show code
InventoryClick = ui_inventory.UIInventory.On_CC_Mouse1

zzzz_liz_fdda_redone_ui_inventory.script

L38 🟢 repeated_obj_id()
obj:id() called 3x in <global>
Impact: low
Show code
Cache obj:id() result
L95 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
lam2.log("FFUIINV")
L26 🔴 global_write
Global write: obj
Impact: low
Show code
obj = self:CheckItem(obj, "Action_Equip")
L53 🔴 global_write
Global write: obj
Impact: low
Show code
obj = self:CheckItem(obj, "Action_UnEquip")
L74 🔴 global_write
Global write: obj
Impact: low
Show code
obj = self:CheckItem(obj, "Action_Drop")

448- New Player Experience - strangerism

13 files (🟢22 🟡40 🔴35 🔵11)

check_anim.script

L1 🔴 global_write
Global write: anim_playing
Impact: low
Show code
anim_playing = false
L3 🔴 global_write
Global write: anim_playing
Impact: low
Show code
function anim_start_func() anim_playing = true end
L5 🔴 global_write
Global write: anim_playing
Impact: low
Show code
function anim_stop_func() anim_playing = false end

npe_actions.script

L140 🟢 uncached_globals_summary
Cache 1 globals in create_task
Impact: medium
Show code
L141: tostring L141: tostring
L1 🟡 unused_local_variable
Local variable 'printlog' is assigned but never used
Impact: low
Show code
local printlog = npe_logging.Printlog_npe
L3 🟡 unused_local_variable
Local variable 'printtrace' is assigned but never used
Impact: low
Show code
local printtrace = npe_logging.Printtrace_npe
L4 🟡 unused_local_variable
Local variable 'print_table' is assigned but never used
Impact: low
Show code
local print_table = npe_logging.Print_table_npe
L5 🟡 unused_local_variable
Local variable 'debug_table' is assigned but never used
Impact: low
Show code
local debug_table = npe_logging.Debug_table_npe
L206 🟡 unused_local_variable
Local variable 'se_itm' is assigned but never used
Impact: low
Show code
local se_itm = alife_create_item(k, db.actor)

npe_dialog.script

L182 🟢 table_insert_append
table.insert(played_sounds, v) -> played_sounds[#played_sounds+1] = v
Impact: high
Show code
table.insert(played_sounds, snd)
L105 🔴 global_write
Global write: Sounds
Impact: low
Show code
Sounds = {
L1 🟡 unused_local_variable
Local variable 'printlog' is assigned but never used
Impact: low
Show code
local printlog = npe_logging.Printlog_npe
L2 🟡 unused_local_variable
Local variable 'printdebug' is assigned but never used
Impact: low
Show code
local printdebug = npe_logging.Printdebug_npe
L4 🟡 unused_local_variable
Local variable 'print_table' is assigned but never used
Impact: low
Show code
local print_table = npe_logging.Print_table_npe
L5 🟡 unused_local_variable
Local variable 'debug_table' is assigned but never used
Impact: low
Show code
local debug_table = npe_logging.Debug_table_npe
L6 🟡 unused_local_variable
Local variable 'print_functor' is assigned but never used
Impact: low
Show code
local print_functor = npe_logging.Print_functor_npe
L18 🟡 unused_local_variable
Local variable 'finish' is assigned but never used
Impact: low
Show code
local start, finish = path:find('[%w%s!-={-|]+[_%.].+')

npe_dialog_codec.script

L327 🟢 uncached_globals_summary
Cache 1 globals in change_alpha
Impact: medium
Show code
L331: bit.band L332: bit.band
L13 🔴 global_write
Global write: Sounds
Impact: low
Show code
Sounds = npe_dialog.Sounds
L18 🔴 global_write
Global write: Runner
Impact: low
Show code
Runner ={
L325 🔴 global_write
Global write: clr_cache
Impact: low
Show code
clr_cache = {}
L331 🔴 global_write
Global write: b
Impact: low
Show code
b = bit.band(clr, 255)
L332 🔴 global_write
Global write: g
Impact: low
Show code
g = bit.band(bit.rshift(clr, 8), 255)
L333 🔴 global_write
Global write: r
Impact: low
Show code
r = bit.band(bit.rshift(clr, 16), 255)
L361 🔴 global_write
Global write: Portraits
Impact: low
Show code
Portraits = {
L5 🟡 unused_local_variable
Local variable 'print_table' is assigned but never used
Impact: low
Show code
local print_table = npe_logging.Print_table_npe
L6 🟡 unused_local_variable
Local variable 'debug_table' is assigned but never used
Impact: low
Show code
local debug_table = npe_logging.Debug_table_npe
L7 🟡 unused_local_variable
Local variable 'print_functor' is assigned but never used
Impact: low
Show code
local print_functor = npe_logging.Print_functor_npe
L1085 🟡 unused_local_variable
Local variable 'context' is assigned but never used
Impact: low
Show code
local context = self.set.save_context

npe_dialog_tutorial.script

L12 🔴 global_write
Global write: unsquish_ratio
Impact: low
Show code
unsquish_ratio = 1
L13 🔴 global_write
Global write: token_handler
Impact: low
Show code
token_handler = parse_colors or parse_vanilla
L19 🔴 global_write
Global write: unsquish_ratio
Impact: low
Show code
unsquish_ratio = (device().height / device().width) / (768 / 1024)
L43 🔴 global_write
Global write: Sounds
Impact: low
Show code
Sounds = npe_dialog.Sounds
L4 🟡 unused_local_variable
Local variable 'print_table' is assigned but never used
Impact: low
Show code
local print_table = npe_logging.Print_table_npe
L5 🟡 unused_local_variable
Local variable 'debug_table' is assigned but never used
Impact: low
Show code
local debug_table = npe_logging.Debug_table_npe
L6 🟡 unused_local_variable
Local variable 'print_functor' is assigned but never used
Impact: low
Show code
local print_functor = npe_logging.Print_functor_npe
L180 🟡 unused_local_variable
Local variable 'current_gametime_state' is assigned but never used
Impact: low
Show code
local current_gametime_state = npe_dialog.Get_game_time()

npe_director.script

L588 🟢 table_insert_append
table.insert(setsKeys, v) -> setsKeys[#setsKeys+1] = v
Impact: high
Show code
table.insert(setsKeys, setKey)
L627 🟢 table_insert_append
table.insert(playableHighPrioQueue.setsKeys, v) -> playableHighPrioQueue.setsKeys[#playableHighPrioQueue.setsKeys+1] = v
Impact: high
Show code
table.insert(playableHighPrioQueue.setsKeys, key)
L630 🟢 table_insert_append
table.insert(playableOnCountdownQueue.setsKeys, v) -> playableOnCountdownQueue.setsKeys[#playableOnCountdownQueue.setsKeys+1] = v
Impact: high
Show code
table.insert(playableOnCountdownQueue.setsKeys, key)
L634 🟢 table_insert_append
table.insert(playableQueue.setsKeys, v) -> playableQueue.setsKeys[#playableQueue.setsKeys+1] = v
Impact: high
Show code
table.insert(playableQueue.setsKeys, key)
L660 🟢 table_insert_append
table.insert(npeExecutionQueue.handlers, v) -> npeExecutionQueue.handlers[#npeExecutionQueue.handlers+1] = v
Impact: high
Show code
table.insert(npeExecutionQueue.handlers, handler)
L668 🟢 table_insert_append
table.insert(npeActionsQueue.actions, v) -> npeActionsQueue.actions[#npeActionsQueue.actions+1] = v
Impact: high
Show code
table.insert(npeActionsQueue.actions, action)
L883 🟢 table_insert_append
table.insert(playableHighPrioQueue.setsKeys, v) -> playableHighPrioQueue.setsKeys[#playableHighPrioQueue.setsKeys+1] = v
Impact: high
Show code
table.insert(playableHighPrioQueue.setsKeys, setKey)
L885 🟢 table_insert_append
table.insert(playableQueue.setsKeys, v) -> playableQueue.setsKeys[#playableQueue.setsKeys+1] = v
Impact: high
Show code
table.insert(playableQueue.setsKeys, setKey)
L926 🟢 table_insert_append
table.insert(npeExecutionQueue.handlers, v) -> npeExecutionQueue.handlers[#npeExecutionQueue.handlers+1] = v
Impact: high
Show code
table.insert(npeExecutionQueue.handlers, handler)
L300 🟢 repeated_obj_section()
obj:section() called 3x in iterate_nearests
Impact: low
Show code
Cache obj:section() result
L1114 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(" Settings:")
L1123 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent .. '' .. key .. ':')
L1126 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent .. key .. ': ' .. tostring(value))
L1244 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("$ NPE Save State")
L1258 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("$ NPE Load State")
L97 🔴 global_write
Global write: Settings
Impact: low
Show code
Settings = {
L108 🔴 global_write
Global write: RegisteredCustomCallbacks
Impact: low
Show code
RegisteredCustomCallbacks = {}
L111 🔴 global_write
Global write: Dialog_in_use
Impact: low
Show code
Dialog_in_use = false
L112 🔴 global_write
Global write: Dialog_name
Impact: low
Show code
Dialog_name = nil
L706 🔴 global_write
Global write: Dialog_name
Impact: low
Show code
Dialog_name = dialog
L707 🔴 global_write
Global write: Dialog_in_use
Impact: low
Show code
Dialog_in_use = true
L710 🔴 global_write
Global write: Dialog_name
Impact: low
Show code
Dialog_name = nil
L711 🔴 global_write
Global write: Dialog_in_use
Impact: low
Show code
Dialog_in_use = false
L1104 🔴 global_write
Global write: Dialog_in_use
Impact: low
Show code
Dialog_in_use = false
L1105 🔴 global_write
Global write: Dialog_name
Impact: low
Show code
Dialog_name = nil
L325 🟡 unused_local_variable
Local variable 'se_obj' is assigned but never used
Impact: low
Show code
local se_obj = alife_object(obj:id())

npe_events.script

L179 🔴 global_write
Global write: Last_npc_talked
Impact: low
Show code
Last_npc_talked = nil
L4 🟡 unused_local_variable
Local variable 'print_table' is assigned but never used
Impact: low
Show code
local print_table = npe_logging.Print_table_npe
L5 🟡 unused_local_variable
Local variable 'debug_table' is assigned but never used
Impact: low
Show code
local debug_table = npe_logging.Debug_table_npe
L6 🟡 unused_local_variable
Local variable 'print_functor' is assigned but never used
Impact: low
Show code
local print_functor = npe_logging.Print_functor_npe

npe_execution.script

L715 🟢 table_insert_append
table.insert(members, v) -> members[#members+1] = v
Impact: high
Show code
table.insert(members, new_runner_instance.name)
L718 🟢 table_insert_append
table.insert(Execution_group[new_runner_instance.group_name].members, v) -> Execution_group[new_runner_instance.group_name].members[#Execution_group[new_runner_instance.group_name].members+1] = v
Impact: high
Show code
table.insert(Execution_group[new_runner_instance.group_name].members, new_runner_instance.name)
L251 🟢 uncached_globals_summary
Cache 1 globals in validate_functor
Impact: medium
Show code
L258: type L267: type
L570 🟢 uncached_globals_summary
Cache 1 globals in execution_watch
Impact: medium
Show code
L586: tostring L587: tostring
L7 🟡 unused_local_variable
Local variable 'debug_table' is assigned but never used
Impact: low
Show code
local debug_table = npe_logging.Debug_table_npe
L8 🟡 unused_local_variable
Local variable 'print_functor' is assigned but never used
Impact: low
Show code
local print_functor = npe_logging.Print_functor_npe

npe_logging.script

L43 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
if select('#', ...) ~= 0 then printf(string.format(msg,...))
L44 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
else printf(msg)
L107 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Log level: %s", tostring(LEVEL))
L109 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("CONF enabled: %s", tostring(CONF.enabled))
L52 🔴 global_write
Global write: Printlog_npe
Impact: low
Show code
Printlog_npe = printlog
L53 🔴 global_write
Global write: Printdebug_npe
Impact: low
Show code
Printdebug_npe = printdebug
L58 🔴 global_write
Global write: Printtrace_npe
Impact: low
Show code
Printtrace_npe = printtrace
L74 🔴 global_write
Global write: Print_table_npe
Impact: low
Show code
Print_table_npe = print_table
L90 🔴 global_write
Global write: Debug_table_npe
Impact: low
Show code
Debug_table_npe = debug_table
L102 🔴 global_write
Global write: Print_functor_npe
Impact: low
Show code
Print_functor_npe = print_functor

npe_logging_mcm.script

L11 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "logs", sh=true, text="ui_mcm_npe_logs", gr ={

npe_mcm.script

L96 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr, { id = v.id, type = "check", val = 1, def = false } )
L43 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("//[NPE][MCM] npe_get_setting %s %s", module_name, var_name)
L52 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("-[NPE][MCM] npe_set_setting %s %s", module_name, var_name)
L1 🔴 global_write
Global write: npe_default_settings
Impact: low
Show code
npe_default_settings = {
L20 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "general", sh=true, text="ui_mcm_npe_general", gr ={

npe_utils.script

L188 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local device_in_slot = actor:item_in_slot(9)
L189 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local active_device = actor:active_detector()
L190 🟡 potential_nil_access
Potential nil access: 'device_in_slot' from :item_in_slot() used without nil check
Impact: low
Show code
if device_in_slot and devices[device_in_slot:section()] then
L195 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:iterate_inventory(function(owner, obj)
L212 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:move_to_slot(devices_ruck[1].object, 9)
L249 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local device_in_slot = actor:item_in_slot(9)
L1 🟡 unused_local_variable
Local variable 'printlog' is assigned but never used
Impact: low
Show code
local printlog = npe_logging.Printlog_npe
L3 🟡 unused_local_variable
Local variable 'printtrace' is assigned but never used
Impact: low
Show code
local printtrace = npe_logging.Printtrace_npe
L4 🟡 unused_local_variable
Local variable 'print_table' is assigned but never used
Impact: low
Show code
local print_table = npe_logging.Print_table_npe
L5 🟡 unused_local_variable
Local variable 'debug_table' is assigned but never used
Impact: low
Show code
local debug_table = npe_logging.Debug_table_npe
L6 🟡 unused_local_variable
Local variable 'print_functor' is assigned but never used
Impact: low
Show code
local print_functor = npe_logging.Print_functor_npe
L22 🟡 unused_local_variable
Local variable 'NERFS_DAR' is assigned but never used
Impact: low
Show code
local NERFS_DAR = "1.5-DAR"

test_npe_execution_client.script

L67 🟢 table_insert_append
table.insert(my_decks_queue.decks, v) -> my_decks_queue.decks[#my_decks_queue.decks+1] = v
Impact: high
Show code
table.insert(my_decks_queue.decks, item)
L174 🟢 table_insert_append
table.insert(my_items_queue.items, v) -> my_items_queue.items[#my_items_queue.items+1] = v
Impact: high
Show code
table.insert(my_items_queue.items, "item" .. tostring(i))
L184 🟢 table_insert_append
table.insert(my_items_queue.items, v) -> my_items_queue.items[#my_items_queue.items+1] = v
Impact: high
Show code
table.insert(my_items_queue.items, "item" .. tostring(i))
L189 🟢 table_insert_append
table.insert(my_cards_queue.cards, v) -> my_cards_queue.cards[#my_cards_queue.cards+1] = v
Impact: high
Show code
table.insert(my_cards_queue.cards, "card" .. tostring(i))
L4 🟡 unused_local_variable
Local variable 'printtrace' is assigned but never used
Impact: low
Show code
local printtrace = npe_logging.Printtrace_npe
L6 🟡 unused_local_variable
Local variable 'debug_table' is assigned but never used
Impact: low
Show code
local debug_table = npe_logging.Debug_table_npe
L7 🟡 unused_local_variable
Local variable 'print_functor' is assigned but never used
Impact: low
Show code
local print_functor = npe_logging.Print_functor_npe

449- Dynamic Aspect Ratio Tweaks (fixes for widescreen) - bellyillish

23 files (🟢2 🟡21 🔴14 🔵6)

dart_ammo_wheel_mcm.script

L3 🟡 unused_local_variable
Local variable 'Utils' is assigned but never used
Impact: low
Show code
local Utils = dart_utils

dart_bhs_mcm.script

L3 🟡 unused_local_variable
Local variable 'Utils' is assigned but never used
Impact: low
Show code
local Utils = dart_utils

dart_companion_list_mcm.script

L3 🟡 unused_local_variable
Local variable 'Utils' is assigned but never used
Impact: low
Show code
local Utils = dart_utils

dart_companion_wheel_mcm.script

L3 🟡 unused_local_variable
Local variable 'Utils' is assigned but never used
Impact: low
Show code
local Utils = dart_utils

dart_core.script

L5 🔴 global_write
Global write: config
Impact: low
Show code
config = {logLimit = 10, safezone = 0}
L8 🔴 global_write
Global write: state
Impact: low
Show code
state = {}
L11 🔴 global_write
Global write: baseWidth
Impact: low
Show code
baseWidth = 1024
L12 🔴 global_write
Global write: baseHeight
Impact: low
Show code
baseHeight = 768
L13 🔴 global_write
Global write: ratio4x3
Impact: low
Show code
ratio4x3 = 4 / 3
L14 🔴 global_write
Global write: ratio16x9
Impact: low
Show code
ratio16x9 = 16 / 9
L15 🔴 global_write
Global write: ratio21x9
Impact: low
Show code
ratio21x9 = 21 / 9
L16 🔴 global_write
Global write: ratio32x9
Impact: low
Show code
ratio32x9 = 32 / 9
L19 🔴 global_write
Global write: screenBounds
Impact: low
Show code
screenBounds = {
L27 🔴 global_write
Global write: defaultScaleSettings
Impact: low
Show code
defaultScaleSettings = {
L37 🔴 global_write
Global write: xmlFileSuffixes
Impact: low
Show code
xmlFileSuffixes = {
L44 🔴 global_write
Global write: xmlAspectRatios
Impact: low
Show code
xmlAspectRatios = {
L49 🔴 global_write
Global write: xmlFileReplacements
Impact: low
Show code
xmlFileReplacements = {
L55 🔴 global_write
Global write: scopeFillerTemplate
Impact: low
Show code
scopeFillerTemplate = [[
L1 🟡 unused_local_variable
Local variable 'MCM' is assigned but never used
Impact: low
Show code
local MCM = dart_mcm

dart_dxml.script

L116 🟢 table_insert_append
table.insert(results, v) -> results[#results+1] = v
Impact: high
Show code
table.insert(results, result)
L204 🟡 unused_local_variable
Local variable 'alias' is assigned but never used
Impact: low
Show code
local file, alias, ratio = splitPath(path)

dart_messages_mcm.script

L3 🟡 unused_local_variable
Local variable 'Utils' is assigned but never used
Impact: low
Show code
local Utils = dart_utils

dart_minimap_mcm.script

L3 🟡 unused_local_variable
Local variable 'Utils' is assigned but never used
Impact: low
Show code
local Utils = dart_utils

dart_module.script

L116 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("Replacing %s with %s", path, replacement)
L119 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("Done with %s", path)
L122 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("Unable to replace %s with %s", path, replacement)
L139 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("Parsed %s (%s) in %.3fs", path, ratioLabel, os.clock() - clock)

dart_patches_mcm.script

L3 🟡 unused_local_variable
Local variable 'Utils' is assigned but never used
Impact: low
Show code
local Utils = dart_utils

dart_status_icons_mcm.script

L3 🟡 unused_local_variable
Local variable 'Utils' is assigned but never used
Impact: low
Show code
local Utils = dart_utils

dart_utils.script

L20 🟢 table_insert_append
table.insert(results, v) -> results[#results+1] = v
Impact: high
Show code
table.insert(results, rvalue)

modxml_z_dart_ammo_wheel.script

L1 🟡 unused_local_variable
Local variable 'Dart' is assigned but never used
Impact: low
Show code
local Dart = dart_core

modxml_z_dart_bhs.script

L1 🟡 unused_local_variable
Local variable 'Dart' is assigned but never used
Impact: low
Show code
local Dart = dart_core

modxml_z_dart_companion_list.script

L2 🟡 unused_local_variable
Local variable 'Utils' is assigned but never used
Impact: low
Show code
local Utils = dart_utils

modxml_z_dart_companion_wheel.script

L1 🟡 unused_local_variable
Local variable 'Dart' is assigned but never used
Impact: low
Show code
local Dart = dart_core

modxml_z_dart_markers.script

L66 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("Removing duplicate marker %s", name)
L126 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
return log("Disabled because the 3D PDA is not being used")
L1 🟡 unused_local_variable
Local variable 'Dart' is assigned but never used
Impact: low
Show code
local Dart = dart_core

modxml_z_dart_messages.script

L1 🟡 unused_local_variable
Local variable 'Dart' is assigned but never used
Impact: low
Show code
local Dart = dart_core

modxml_z_dart_patches.script

L1 🟡 unused_local_variable
Local variable 'Dart' is assigned but never used
Impact: low
Show code
local Dart = dart_core

modxml_z_dart_status_icons.script

L1 🟡 unused_local_variable
Local variable 'Dart' is assigned but never used
Impact: low
Show code
local Dart = dart_core

ui_minimap_counter.script

L2 🟡 unused_local_variable
Local variable 'stub' is assigned but never used
Impact: low
Show code
local stub = true

zzz_dart_patches.script

L1 🟡 unused_local_variable
Local variable 'Dart' is assigned but never used
Impact: low
Show code
local Dart = dart_core

zzz_dart_status_icons.script

L1 🟡 unused_local_variable
Local variable 'Dart' is assigned but never used
Impact: low
Show code
local Dart = dart_core

45- Stealth Overhaul - xcvb

6 files (🟢9 🟡26 🔴13 🔵20)

camp_lum.script

L3 🔴 global_write
Global write: luminocity_inc
Impact: low
Show code
luminocity_inc = 0
L20 🔴 global_write
Global write: luminocity_inc
Impact: low
Show code
luminocity_inc = 0.45
L22 🔴 global_write
Global write: luminocity_inc
Impact: low
Show code
luminocity_inc = 0.15
L24 🔴 global_write
Global write: luminocity_inc
Impact: low
Show code
luminocity_inc = 0

light_gem_mcm.script

L45 🟡 potential_nil_access
Potential nil access: 'torch' from :item_in_slot() used without nil check
Impact: low
Show code
if (torch and torch:torch_enabled()) then
L47 🟡 potential_nil_access
Potential nil access: 'flash' from :item_in_slot() used without nil check
Impact: low
Show code
elseif (flash and (flash:section() == "device_flashlight") and db.actor:active_detector()) then

stealth_mcm.script

L20 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "stealth",sh=true ,gr={

visual_memory_manager.script

L68 🟢 repeated_who_id()
who:id() called 7x in get_visible_value
Impact: low
Show code
Cache who:id() result
L68 🟢 repeated_db_actor_id()
db.actor:id() called 5x in get_visible_value
Impact: low
Show code
Cache db.actor:id() result
L105 🟢 repeated_npc_id()
npc:id() called 10x in get_visible_value
Impact: low
Show code
Cache npc:id() result
L156 🟢 repeated_obj_id()
obj:id() called 4x in get_visible_value
Impact: low
Show code
Cache obj:id() result
L237 🟢 repeated_outfit_section()
outfit:section() called 3x in slot_in_out
Impact: low
Show code
Cache outfit:section() result
L257 🟢 repeated_npc_id()
npc:id() called 2x in npc_on_before_hit
Impact: low
Show code
Cache npc:id() result
L263 🟢 repeated_member_id()
member:id() called 2x in npc_on_before_hit
Impact: low
Show code
Cache member:id() result
L164 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('---------------------------------------------------------------')
L165 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Weather is: " .. (wthrs))
L166 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("1. Luminocity ---------- %s", Luminocity)
L167 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("1.a) luminocity --------- %s", luminocity)
L168 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("1.b) lights_lum() ------- %s", lights_lum())
L169 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("1.c) who:get_lum() ---- %s", who:get_luminocity())
L170 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("2. Velocity ------------- %s", Velocity)
L171 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("3. dist_original --------- %s", distance)
L172 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("4. weight&outfit ------- %s", weight)
L173 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("5. crouch ------------- %s", crouch)
L174 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("6.a) shot_mult --------- %s", shot_mult)
L175 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("6.b) danger ------------ %s", danger_mult)
L176 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("6.c) camo ------------- %s", camo_x)
L177 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("6.d) ai scheme --------- %s", scheme_mult)
L178 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("6.e) get_camo_k ------ %s", get_camo_k)
L179 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("6.f) jacketmult --------- %s", jacketmult)
L180 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("7. memory ------------- %s", memory_factor)
L181 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("8. Step incr --- %s", step_incr)
L133 🔴 global_write
Global write: actor_marked
Impact: low
Show code
actor_marked = 50000
L135 🔴 global_write
Global write: actor_marked
Impact: low
Show code
actor_marked = 0
L68 🟡 potential_nil_access
Potential nil access: 'torch' from :item_in_slot() used without nil check
Impact: low
Show code
local actor_torch_active = (who and (who:id() == db.actor:id()) and ( (torch and torch:torch_enabled()) or (flash and (flash:section() == "device_flashlight") and db.actor:active_detector()) ))
L68 🟡 potential_nil_access
Potential nil access: 'flash' from :item_in_slot() used without nil check
Impact: low
Show code
local actor_torch_active = (who and (who:id() == db.actor:id()) and ( (torch and torch:torch_enabled()) or (flash and (flash:section() == "device_flashlight") and db.actor:active_detector()) ))
L156 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
if (obj and (obj:alive()) and (who and (who:id() == db.actor:id() or who:id() == obj:id() ) and npc and (npc:id() == db.actor:id() or npc:id() == obj:id() ))) and (not obj:see(db.actor)) then
L156 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
if (obj and (obj:alive()) and (who and (who:id() == db.actor:id() or who:id() == obj:id() ) and npc and (npc:id() == db.actor:id() or npc:id() == obj:id() ))) and (not obj:see(db.actor)) then
L156 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
if (obj and (obj:alive()) and (who and (who:id() == db.actor:id() or who:id() == obj:id() ) and npc and (npc:id() == db.actor:id() or npc:id() == obj:id() ))) and (not obj:see(db.actor)) then
L156 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
if (obj and (obj:alive()) and (who and (who:id() == db.actor:id() or who:id() == obj:id() ) and npc and (npc:id() == db.actor:id() or npc:id() == obj:id() ))) and (not obj:see(db.actor)) then
L158 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
elseif obj and obj:see(db.actor) then
L213 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if not (IsWeapon(wpn)) or IsMelee(wpn) or wpn:weapon_is_silencer() then return end
L237 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local kind = outfit and ini_sys:r_string_ex(outfit:section(),"kind")
L238 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local get_camo_get_line = outfit and ini_sys:line_exist(outfit:section(), "npc_blindness_koeff")
L239 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
get_camo_k = get_camo_get_line and ini_sys:r_float(outfit:section(), "npc_blindness_koeff") or 0
L262 🟡 potential_nil_access
Potential nil access: 'member' from level.object_by_id() used without nil check
Impact: low
Show code
if member and member.alive and member:alive() then

xr_combat_ignore.script

L25 🟢 repeated_who_id()
who:id() called 2x in npc_on_hit_callback
Impact: low
Show code
Cache who:id() result
L399 🟢 repeated_obj_id()
obj:id() called 3x in hit_callback
Impact: low
Show code
Cache obj:id() result
L438 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("xr_combat_ignore: reset_generic_scheme storage is nil! npc=%s scheme=%s section=%s",npc and npc:name(),scheme,section)
L7 🔴 global_write
Global write: fighting_with_actor_npcs
Impact: low
Show code
fighting_with_actor_npcs = {}
L8 🔴 global_write
Global write: safe_zone_npcs
Impact: low
Show code
safe_zone_npcs = {}
L182 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(id)
L399 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(obj:id())
L401 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local squad = se_obj.group_id and se_obj.group_id ~= 65535 and sim:object(se_obj.group_id)

xr_danger.script

L905 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("xr_danger: no action id p[%s]",i)
L8 🔴 global_write
Global write: evaid
Impact: low
Show code
evaid = 188113
L9 🔴 global_write
Global write: actid
Impact: low
Show code
actid = 188113
L16 🔴 global_write
Global write: DangerInertion
Impact: low
Show code
DangerInertion = utils_data.collect_section(ini,"danger_inertion",true)
L17 🔴 global_write
Global write: DangerIgnore
Impact: low
Show code
DangerIgnore = utils_data.collect_section(ini,"danger_object",true)
L76 🟡 potential_nil_access
Potential nil access: 'corpse_object' from :object() used without nil check (auto-fixable)
Impact: low
Show code
return corpse_object and corpse_object:death_time() or 0
L187 🟡 potential_nil_access
Potential nil access: 'best_danger_object' from :object() used without nil check
Impact: low
Show code
local corpse_st = db.storage[best_danger_object:id()]
L277 🟡 potential_nil_access
Potential nil access: 'danger' from :best_danger() used without nil check
Impact: low
Show code
local bd_type = danger:type()
L708 🟡 potential_nil_access
Potential nil access: 'best_danger' from :best_danger() used without nil check
Impact: low
Show code
local best_danger_object = best_danger:object()
L709 🟡 potential_nil_access
Potential nil access: 'best_danger' from :best_danger() used without nil check
Impact: low
Show code
local bd_type = best_danger:type()
L710 🟡 potential_nil_access
Potential nil access: 'best_danger' from :best_danger() used without nil check
Impact: low
Show code
local dependent_object = best_danger:dependent_object()
L785 🟡 potential_nil_access
Potential nil access: 'bd' from :best_danger() used without nil check
Impact: low
Show code
local bd_type = bd:type()
L901 🟡 potential_nil_access
Potential nil access: 'manager' from :motivation_action_manager() used without nil check
Impact: low
Show code
action = manager:action(p[i])
L658 🟡 unused_local_variable
Local variable 'dist_to_bdo' is assigned but never used
Impact: low
Show code
local dist_to_bdo = st.last_pos and npc:position():distance_to_sqr(st.last_pos) or 30

450- Useful Idiots - bellyillish

22 files (🟢38 🟡42 🔴2 🔵0)

a_idiots_mdata.script

L159 🟢 repeated_npc_id()
npc:id() called 3x in onNpcSpawn
Impact: low
Show code
Cache npc:id() result

idiots_combat_assault.script

L6 🟡 unused_local_variable
Local variable 'WPN' is assigned but never used
Impact: low
Show code
local WPN = require "illish.lib.weapon"

idiots_keybinds.script

L91 🟢 uncached_globals_summary
Cache 1 globals in onKeybindEvent
Impact: medium
Show code
L136: ipairs L180: ipairs

idiots_surge.script

L197 🟡 potential_nil_access
Potential nil access: 'manager' from :motivation_action_manager() used without nil check (auto-fixable)
Impact: low
Show code
manager:add_evaluator(EVAL_ID, evaluator_surge("idiots_surge", storage))
L210 🟡 potential_nil_access
Potential nil access: 'manager' from :motivation_action_manager() used without nil check
Impact: low
Show code
manager:add_action(ACTION_ID, temp.action)
L227 🟡 potential_nil_access
Potential nil access: 'manager' from :motivation_action_manager() used without nil check
Impact: low
Show code
local action = manager:action(id)

idiots_ui.script

L719 🟢 repeated_npc_id()
npc:id() called 3x in OnClickButton
Impact: low
Show code
Cache npc:id() result
L803 🔴 global_write
Global write: onUpdateIndexers
Impact: low
Show code
onUpdateIndexers = UTIL.throttle(function()
L812 🔴 global_write
Global write: onUpdateButtons
Impact: low
Show code
onUpdateButtons = UTIL.throttle(function()
L91 🟡 unused_local_variable
Local variable 'aFade' is assigned but never used
Impact: low
Show code
local aFade = self.xml:ReadAttribute("dialog:fade", 0, "a") or 255

combat.lua

L184 🟡 unused_local_variable
Local variable 'be' is assigned but never used
Impact: low
Show code
local be = NPC.get(enemy.id)

dxml.lua

L42 🟢 table_insert_append
table.insert(results, v) -> results[#results+1] = v
Impact: high
Show code
table.insert(results, result)

npc.lua

L204 🟢 table_insert_append
table.insert(guns, v) -> guns[#guns+1] = v
Impact: high
Show code
table.insert(guns, item)
L328 🟢 table_insert_append
table.insert(companions, v) -> companions[#companions+1] = v
Impact: high
Show code
table.insert(companions, companion)
L374 🟢 table_insert_append
table.insert(companions, v) -> companions[#companions+1] = v
Impact: high
Show code
table.insert(companions, npc)
L419 🟢 table_insert_append
table.insert(companions, v) -> companions[#companions+1] = v
Impact: high
Show code
table.insert(companions, npc)
L516 🟢 table_insert_append
table.insert(angles, v) -> angles[#angles+1] = v
Impact: high
Show code
table.insert(angles, randomFlip * (options.range / options.directions * i - options.range / 2))
L358 🟢 uncached_globals_summary
Cache 1 globals in NPC.getBlockingCompanions
Impact: medium
Show code
L368: math.deg L369: math.deg
L496 🟢 uncached_globals_summary
Cache 1 globals in NPC.moveOutOfTheWay
Impact: medium
Show code
L520: math.abs L520: math.abs
L430 🟢 repeated_npc_id()
npc:id() called 3x in NPC.select
Impact: low
Show code
Cache npc:id() result
L188 🟡 potential_nil_access
Potential nil access: 'squad' from :object() used without nil check
Impact: low
Show code
local newSquad = alife_create(squad:section_name(), pos, lvid, gvid)
L190 🟡 potential_nil_access
Potential nil access: 'squad' from :object() used without nil check
Impact: low
Show code
squad:unregister_member(se.id)

pos.lua

L301 🟢 table_insert_append
table.insert(positions, v) -> positions[#positions+1] = v
Impact: high
Show code
table.insert(positions, thing:position())
L302 🟢 table_insert_append
table.insert(grenades, v) -> grenades[#grenades+1] = v
Impact: high
Show code
table.insert(grenades, thing:id())
L370 🟢 table_insert_append
table.insert(__debug, v) -> __debug[#__debug+1] = v
Impact: high
Show code
table.insert(__debug, {pos = pos, dir = dir, cast = cast})
L393 🟢 table_insert_append
table.insert(scores, v) -> scores[#scores+1] = v
Impact: high
Show code
table.insert(scores, {score = score, vid = vid})
L428 🟢 table_insert_append
table.insert(vids, v) -> vids[#vids+1] = v
Impact: high
Show code
table.insert(vids, vid)

surge.lua

L55 🟢 table_insert_append
table.insert(points, v) -> points[#points+1] = v
Impact: high
Show code
table.insert(points, headPos)
L70 🟢 table_insert_append
table.insert(__debug, v) -> __debug[#__debug+1] = v
Impact: high
Show code
table.insert(__debug, {
L98 🟢 table_insert_append
table.insert(objects, v) -> objects[#objects+1] = v
Impact: high
Show code
table.insert(objects, {
L109 🟢 table_insert_append
table.insert(objects, v) -> objects[#objects+1] = v
Impact: high
Show code
table.insert(objects, {
L121 🟢 table_insert_append
table.insert(areas, v) -> areas[#areas+1] = v
Impact: high
Show code
table.insert(areas, obj)
L145 🟢 table_insert_append
table.insert(points, v) -> points[#points+1] = v
Impact: high
Show code
table.insert(points, pos)
L150 🟢 table_insert_append
table.insert(covers, v) -> covers[#covers+1] = v
Impact: high
Show code
table.insert(covers, vid)
L172 🟢 table_insert_append
table.insert(areas, v) -> areas[#areas+1] = v
Impact: high
Show code
table.insert(areas, actorArea)

table.lua

L58 🟢 table_insert_append
table.insert(results, v) -> results[#results+1] = v
Impact: high
Show code
table.insert(results, rvalue)

axr_beh.lua

L167 🟡 potential_nil_access
Potential nil access: 'manager' from :motivation_action_manager() used without nil check
Impact: low
Show code
local action = manager:action(axr_beh.beh_actid)
L2 🟡 unused_local_variable
Local variable 'UTIL' is assigned but never used
Impact: low
Show code
local UTIL = require "illish.lib.util"

axr_companions.lua

L66 🟢 repeated_npc_id()
npc:id() called 3x in axr_companions.add_to_actor_squad
Impact: low
Show code
Cache npc:id() result
L84 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se = sim:object(id)
L86 🟡 potential_nil_access
Potential nil access: 'se' from :object() used without nil check
Impact: low
Show code
if se and se_load_var(se.id, se:name(), "companion_cannot_teleport") then
L92 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
if action.teleport == false and sim:has_info(id, action.info) then

rx_ff.lua

L49 🟡 unused_local_variable
Local variable 'enemyDist' is assigned but never used
Impact: low
Show code
local enemyDist = pos:distance_to(enemyPos)

sr_light.lua

L23 🟡 potential_nil_access
Potential nil access: 'torch' from :object() used without nil check
Impact: low
Show code
torch:enable_attachable_item(state == "on")
L37 🟡 potential_nil_access
Potential nil access: 'actorTorch' from :item_in_slot() used without nil check
Impact: low
Show code
local actorEnabled = actorTorch and actorTorch:torch_enabled() or false
L39 🟡 potential_nil_access
Potential nil access: 'torch' from :object() used without nil check
Impact: low
Show code
torch:enable_attachable_item(actorEnabled)

state_mgr.lua

L6 🟡 unused_local_variable
Local variable 'PATCH' is assigned but never used
Impact: low
Show code
local PATCH = {}

surge_manager.lua

L1 🟡 unused_local_variable
Local variable 'POS' is assigned but never used
Impact: low
Show code
local POS = require "illish.lib.pos"

xr_combat.lua

L72 🟢 repeated_item_id()
item:id() called 3x in PATCH.onChooseWeapon
Impact: low
Show code
Cache item:id() result
L72 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
flags.gun_id = item:id()
L73 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
if item:get_state() == 7 then
L74 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
item:switch_state(0)
L81 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
if WPN.isGun(item) and item:get_state() == 7 then
L84 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
item:switch_state(0)
L101 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
if item:get_state() == 7 then
L103 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
flags.gun_id = item:id()
L112 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
flags.gun_id = item:id()
L113 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
item:switch_state(7)
L5 🟡 unused_local_variable
Local variable 'SURGE' is assigned but never used
Impact: low
Show code
local SURGE = require "illish.lib.surge"

xr_combat_ignore.lua

L205 🟢 uncached_globals_summary
Cache 1 globals in PATCH.getNightMultiplier
Impact: medium
Show code
L212: math.abs L213: math.abs
L22 🟢 repeated_enemy_id()
enemy:id() called 9x in xr_combat_ignore.is_enemy
Impact: low
Show code
Cache enemy:id() result
L64 🟢 repeated_npc_id()
npc:id() called 9x in xr_combat_ignore.is_enemy
Impact: low
Show code
Cache npc:id() result

xr_danger.lua

L40 🟢 repeated_npc_id()
npc:id() called 3x in xr_danger.is_danger
Impact: low
Show code
Cache npc:id() result
L70 🟢 repeated_dangerObject_id()
dangerObject:id() called 3x in xr_danger.is_danger
Impact: low
Show code
Cache dangerObject:id() result
L19 🟡 potential_nil_access
Potential nil access: 'corpse' from :object() used without nil check (auto-fixable)
Impact: low
Show code
return IsStalker(corpse) and corpse:death_time() or 0
L70 🟡 potential_nil_access
Potential nil access: 'dangerObject' from :object() used without nil check
Impact: low
Show code
local corpse = db.storage[dangerObject:id()]

xr_weapon_jam.lua

L24 🟢 repeated_weapon_id()
weapon:id() called 8x in xr_weapon_jam.npc_on_update
Impact: low
Show code
Cache weapon:id() result
L24 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
if not TRACKING[weapon:id()] then
L25 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
TRACKING[weapon:id()] = {ammo_last_update = 0, rounds_since_jam = 0}
L29 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local prevAmmo = TRACKING[weapon:id()].ammo_last_update
L30 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
TRACKING[weapon:id()].ammo_last_update = ammo.current
L36 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local totalSpent = TRACKING[weapon:id()].rounds_since_jam + prevAmmo - ammo.current
L37 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
TRACKING[weapon:id()].rounds_since_jam = totalSpent
L47 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
weapon:unload_magazine()
L48 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
TRACKING[weapon:id()].ammo_last_update = 0
L49 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
TRACKING[weapon:id()].rounds_since_jam = 0

modxml_idiots_ui.script

L144 🟢 uncached_globals_summary
Cache 1 globals in finalizeAll
Impact: medium
Show code
L153: tonumber L157: tonumber
L175 🟢 uncached_globals_summary
Cache 1 globals in cleanupAll
Impact: medium
Show code
L187: tonumber L206: tonumber
L290 🟢 uncached_globals_summary
Cache 1 globals in layoutChildren
Impact: medium
Show code
L335: tonumber L335: tonumber
L627 🟢 uncached_globals_summary
Cache 1 globals in onReadHUDXML
Impact: medium
Show code
L660: ipairs L663: ipairs
L1 🟡 unused_local_variable
Local variable 'CONFIG' is assigned but never used
Impact: low
Show code
local CONFIG = a_idiots_config
L7 🟡 unused_local_variable
Local variable 'MAX_TABS' is assigned but never used
Impact: low
Show code
local MAX_TABS = 10

452- Interaction Dot Marks - Catspaw

18 files (🟢35 🟡38 🔴148 🔵124)

dotmarks_hideout_furniture_mcm.script

L124 🟢 table_insert_append
table.insert(generated_menu, v) -> generated_menu[#generated_menu+1] = v
Impact: high
Show code
table.insert(generated_menu, v)
L132 🟢 uncached_globals_summary
Cache 1 globals in on_game_start
Impact: medium
Show code
L214: string.format L248: string.format
L38 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
if logtext and (ui_hud_dotmarks and ui_hud_dotmarks.debuglogs) then printf(logprefix .. logtext, ...) end
L80 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[%s][dotmarks_hideout_furniture] Suspending DotMarks operation for Hideout Furniture placement mode", time_global())
L83 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[%s][dotmarks_hideout_furniture] Placement mode over, resuming normal DotMarks operation", time_global())
L97 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("dotmarks_hideout_furniture.script is injecting blank functors into dotmarks_main.cfg.scan")
L149 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[%s][dotmarks_on_new_object_scan] Hideout Furniture patch is checking %s", time_global(), nameid(obj))
L286 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[%s][dotmarks_on_setup_pri_interact] Hideout Furniture patch is checking for a custom primary action on %s", time_global(), mark.name)
L289 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("Setting up primary primary interaction as a placeable radio")
L294 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("Setting primary interaction text for placeable light")
L298 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("Setting up primary interaction as a placeable fan")
L302 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("Setting up primary interaction as a placeable bed")
L306 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("Setting up primary interaction as a placeable stove")
L310 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("Setting up primary interaction text for placeable piano")
L314 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("Primary pickup prompt is disabled for HF props")
L319 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("Setting up default interaction text for a static prop")
L322 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("No customization found, returning mark unaltered")
L336 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[%s][dotmarks_on_setup_sec_interact] Hideout Furniture patch is setting up the secondary action for %s", time_global(), mark.name)
L354 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[%s][dotmarks_on_manual_interact_release] Hideout Furniture patch is checking whether to handle interaction with %s | primary take enabled: %s", time_global(), mark.name, cfg.hf_add_primary_pickup)
L356 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("No special handling for HF stashes")
L359 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("%s has a custom primary interaction functor, executing it now", mark.name)
L362 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("Triggering take animation and notifying HF to pick up %s when complete", mark.name)
L29 🔴 global_write
Global write: placement_mode
Impact: low
Show code
placement_mode = false
L31 🔴 global_write
Global write: resume_delay
Impact: low
Show code
resume_delay = 0.25
L33 🔴 global_write
Global write: delaying
Impact: low
Show code
delaying = false
L73 🔴 global_write
Global write: placement_mode
Impact: low
Show code
placement_mode = placeable_furniture.in_placing_state()
L87 🔴 global_write
Global write: delaying
Impact: low
Show code
delaying = false
L107 🔴 global_write
Global write: mcm_menu_additions
Impact: low
Show code
mcm_menu_additions = {

dotmarks_main.script

L114 🟢 repeated_obj_clsid()
obj:clsid() called 19x in <global>
Impact: low
Show code
Cache obj:clsid() result
L175 🟢 repeated_obj_section()
obj:section() called 27x in <global>
Impact: low
Show code
Cache obj:section() result
L222 🟢 repeated_obj_id()
obj:id() called 20x in <global>
Impact: low
Show code
Cache obj:id() result
L4 🔴 global_write
Global write: script_name
Impact: low
Show code
script_name = "dotmarks_main"
L5 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "1.4.0"
L6 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20250721.1
L76 🔴 global_write
Global write: dotmarks_config_file
Impact: low
Show code
dotmarks_config_file = "scripts\\dotmarks_defaults.ltx"
L82 🔴 global_write
Global write: cfg
Impact: low
Show code
cfg = nil
L1028 🔴 global_write
Global write: r
Impact: low
Show code
if r == "" then r = nil end
L1329 🔴 global_write
Global write: cfg
Impact: low
Show code
cfg = dup_table(base_config)
L1486 🔴 global_write
Global write: fonts
Impact: low
Show code
fonts = {
L77 🟡 unused_local_variable
Local variable 'nameid' is assigned but never used
Impact: low
Show code
local nameid = obj_name_and_id
L1208 🟡 unused_local_variable
Local variable 'recipe_is_known' is assigned but never used
Impact: low
Show code
local recipe_is_known

dotmarks_mcm.script

L434 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr, get_argb_input_element(opt_id))
L439 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr, { id = "divider", type= "line" })
L463 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr,
L472 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr,
L476 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr, get_argb_input_element(argb_id))
L479 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr, { id = "divider", type= "line" })
L510 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr, { id = opt_id, type= "check", val = 1, def = enabled })
L512 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr, { id = "divider", type= "line" })
L64 🟢 uncached_globals_summary
Cache 1 globals in valid_mcm_version
Impact: medium
Show code
L69: tonumber L70: tonumber
L73 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
local _ = log and printf("[DotMarks] MCM version string: %s | major %s | minor %s | patch %s | functors exist: %s", MCM_VERSION, maj, min, pat, UI_FUNCTORS)
L76 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
_ = log and printf(pre.." MCM version check: %s", inv and "FAILED" or "Passed")
L21 🔴 global_write
Global write: script_name
Impact: low
Show code
script_name = "dotmarks_mcm"
L22 🔴 global_write
Global write: debuglogs
Impact: low
Show code
debuglogs = false
L37 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = dotmarks_main.script_version or "ersion not found!"
L39 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = tostring(dotmarks_main.release_date) or "date not found! Was ui_hud_dotmarks.script overwritten or disabled?"
L47 🔴 global_write
Global write: color_tokens
Impact: low
Show code
color_tokens = {
L501 🔴 global_write
Global write: tbl
Impact: low
Show code
tbl = {}
L739 🔴 global_write
Global write: color_tokens
Impact: low
Show code
color_tokens = utils_catspaw_text.get_color_tokens() or color_tokens
L747 🔴 global_write
Global write: op
Impact: low
Show code
op = { id = "dotmarks", gr = {
L26 🟡 unused_local_variable
Local variable 'headers' is assigned but never used
Impact: low
Show code
local headers = {}
L32 🟡 unused_local_variable
Local variable 'sfind' is assigned but never used
Impact: low
Show code
local sfind = string.find
L33 🟡 unused_local_variable
Local variable 'ssub' is assigned but never used
Impact: low
Show code
local ssub = string.sub
L35 🟡 unused_local_variable
Local variable 'nocolor_desc' is assigned but never used
Impact: low
Show code
local nocolor_desc = "ui_mcm_dotmarks_header_main_nocolor"
L137 🟡 unused_local_variable
Local variable 'ctrls' is assigned but never used
Impact: low
Show code
local ctrls = {}
L157 🟡 unused_local_variable
Local variable 'argb_ctrl' is assigned but never used
Impact: low
Show code
local argb_ctrl

modxml_maingame_no_item_icons.script

L55 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
local _ = DEV_DEBUG and printf("Processing DXML in %s for %s", xml_file_name, script_name)
L4 🔴 global_write
Global write: script_name
Impact: low
Show code
script_name = "modxml_maingame16_no_item_icons"
L5 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "1.0"
L6 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20250305

modxml_tutorial_hooks.script

L192 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
_ = DEV_DEBUG and printf("Processing DXML functor hooks in %s for %s", xml_file_name, script_name)
L221 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[TutorialMonitor] Began tutorial state %s at %s", tut, time_global())
L235 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[TutorialMonitor] Ended tutorial state %s at %s", tut, time_global())
L4 🔴 global_write
Global write: script_name
Impact: low
Show code
script_name = "modxml_tutorial_hooks"
L5 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "2.0"
L6 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20250410
L99 🔴 global_write
Global write: static_xmlfile
Impact: low
Show code
static_xmlfile = "maingame.xml"
L100 🔴 global_write
Global write: static_xmlnode
Impact: low
Show code
static_xmlnode = "quick_info"
L101 🔴 global_write
Global write: replacements_enabled
Impact: low
Show code
replacements_enabled = true -- killswitch
L102 🔴 global_write
Global write: callbacks_enabled
Impact: low
Show code
callbacks_enabled = true -- killswitch
L103 🔴 global_write
Global write: UIStaticTutorials
Impact: low
Show code
UIStaticTutorials = nil
L104 🔴 global_write
Global write: monitors
Impact: low
Show code
monitors = {}
L105 🔴 global_write
Global write: exceptions
Impact: low
Show code
exceptions = {
L256 🔴 global_write
Global write: UIStaticTutorials
Impact: low
Show code
UIStaticTutorials = xml:InitTextWnd(static_xmlnode, maingameui)

ui_hud_dotmarks.script

L127 🟢 uncached_globals_summary
Cache 1 globals in dump_debug_trace
Impact: medium
Show code
L130: pairs L133: pairs
L2080 🟢 uncached_globals_summary
Cache 1 globals in SetConditionText
Impact: medium
Show code
L2087: string.format L2091: string.format
L2378 🟢 uncached_globals_summary
Cache 1 globals in eleSetCurrentColor
Impact: medium
Show code
L2384: tonumber L2385: tonumber
L3352 🟢 uncached_globals_summary
Cache 1 globals in check_for_dependencies
Impact: medium
Show code
L3404: string.format L3408: string.format
L3589 🟢 uncached_globals_summary
Cache 1 globals in setup_pri_interact_prompt
Impact: medium
Show code
L3609: string.format L3612: string.format
L3643 🟢 uncached_globals_summary
Cache 1 globals in setup_sec_interact_prompt
Impact: medium
Show code
L3698: string.format L3711: string.format
L5234 🟢 uncached_globals_summary
Cache 1 globals in actor_on_update
Impact: medium
Show code
L5238: tostring L5265: tostring
L5599 🟢 uncached_globals_summary
Cache 1 globals in parse_file_data
Impact: medium
Show code
L5601: pairs L5608: pairs
L5754 🟢 uncached_globals_summary
Cache 1 globals in on_option_change
Impact: medium
Show code
L5780: pairs L5783: pairs
L4628 🟢 repeated_obj_section()
obj:section() called 5x in replace_invitem_with_bomb
Impact: low
Show code
Cache obj:section() result
L5801 🟡 string_concat_in_loop
String concat in loop: mcm_path = mcm_path .. x
Impact: critical
Show code
mcm_path = mcm_path .. k
L70 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Interaction Dot Marks %s (rel %s) began initialization at %s", script_version or "(version not found)", release_date or "missing", time_global())
L94 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
return debug_dump and logtext and printf(logprefix .. logtext, ...)
L124 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s [%s][%s] Trace: [%s][%s] %s", logprefix, ts, i, fn, ev, val or "")
L129 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(logprefix.."Dumping runtime metrics for %s", script_name)
L135 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("[%s][%s] [%s][%s] %s", t, i, f, e, v or "")
L251 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
local _ = (not hide) and dump("[%s][%s] Visibility and UI checks for %s | dist %s", mark.id, now, mark.name or mark.tutorial or mark.text, dist)
L296 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
_=dd and dump("Checking whether to show pri interact prompt for %s | targeted %s | in_range %s", mark.name, targeted, in_range)
L407 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
_=dd and dump("Final primary interact state: %s | %s", show_pri, nameid(mark.name, mark.id))
L417 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
_=dd and dump("Secondary interactions disabled via config, hiding UI for %s", mark.name)
L420 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
_=dd and dump("No ammo in weapon, hiding secondary interact")
L423 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
_=dd and dump("No battery or charge in device, hiding secondary interact")
L427 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
_=dd and dump("No items in container, no need to show secondary interact")
L431 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
_=dd and dump("Checking whether to show alt interact prompt for %s | show_pri %s | targeted %s", mark.name, show_pri, targeted)
L439 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
_=dd and dump("[%s][%s] Done with both prompt checks:\n* final state: %s | show_pri %s | show_sec %s | forced %s", time_global(), mark.name, prompts_shown, show_pri, show_sec, forced_on)
L458 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
_=dd and dump("Mark is hidden (%s) clearing texture", hide_reason or "no reason set")
L521 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Condition %s loaded for degraded world item [%s] from loot spot [%s]", cond, nameid(obj), name)
L596 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("[%s][UIHUDMarker:ActiveSwap] for %s: %s", time_global(), self.name or self.tutorial, state)
L1036 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("get_ied_text: mode %s | timer %s | str %s | text %s", cfg.mine_mode, timer, iedstr, iedtext)
L1100 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Suspending marker for %s", mark.name or mark.tutorial)
L1196 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("item_pickup_intercept fired | ret: %s | force: %s", flags and flags.ret_value, flags and flags.force)
L1228 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("flags.ret_value is true, setting to false")
L1242 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("flags.ret_value was false, returning object")
L1661 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("InteractPrompt:on_before_key_press | key %s | bind %s", key, bind)
L1683 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("[InteractPrompt] Passed args:")
L1684 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
for k,v in pairs(args) do dump("|| %s = %s", k, v) end
L2479 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("[%s][InteractPrompt:on_key_hold] Beginning hold of key %s", now, self.args.key)
L2499 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Sending callback dotmarks_on_before_marker_init for %s", nameid(get_mark_name(id), id))
L2872 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Sending callback dotmarks_on_prompt_visibility_change for prompt %s", self.uid)
L2884 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Sending callback dotmarks_on_before_prompt_visibility_change for prompt %s | %s", self.uid, nameid(get_mark_name(self.args.id), self.args.id))
L3069 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("InteractPrompt:CheckForWoundedStalkers found no health items")
L3243 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("current target: %s | L %s | T %s", locked_id or targeted_id, locked_id, targeted_id)
L3527 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Sending callback dotmarks_on_new_object_scan for %s", nameid(obj))
L3630 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Sending callback dotmarks_on_setup_pri_interact for %s", nameid(mark.name, mark.id))
L3665 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Sending callback dotmarks_on_setup_sec_interact for %s | verb_secondary: %s\n"..
L3692 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Setting up unload_and_take_ammo secondary action")
L3709 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Setting up take_and_inspect secondary action for artefact")
L3716 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Setting up plant_bomb secondary action")
L3726 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Setting up help_wounded_stalker secondary action")
L3734 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Setting up pick_up_backpack secondary action")
L3739 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Setting up trigger_autoloot secondary action")
L3747 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Setting up take_all_from_box secondary action")
L3757 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Setting up take_and_read secondary action")
L3767 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Setting up unpack_batteries secondary action")
L3777 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Setting up take_and_use secondary action for tool")
L3786 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Setting up take_and_use secondary action for consumable")
L3800 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Setting up deploy_backpack secondary action")
L3810 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Falling back to generic usage secondary action")
L4020 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Sending dotmarks_on_marker_init for %s", nameid(args.name, id))
L4121 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Sending dotmarks_on_before_marker_init for %s", nameid(args.name, id))
L4166 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("[%s] update_targeted_object: no longer targeting %s", time_global(), nameid(target))
L4176 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("[%s] update_targeted_object: targeted_id is now %s (%s) | method %s", time_global(), targeted_id, target and target:name(), method_txt)
L4263 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("FDDAR found No action with item_pickup tag")
L4268 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("FDDAR has an active body search animation, aborting take")
L4952 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Executing func_pickup for marker %s", mark.name)
L5129 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("State monitor for %s: %s", k, state_monitor(k))
L5213 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("[%s] Hint filter update%s", time_global(), text and (" - text is: "..text) or ", no text")
L5227 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("[Targets] Lookat curr: %s last %s | Pickup curr: %s last %s | Xhair curr: %s last %s", hmm.curr_target, hmm.last_target, hmm.curr_pickup, hmm.last_pickup, hmm.curr_crosshair, hmm.last_crosshair)
L5236 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("")
L5389 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Sending callback dotmarks_on_manual_interact_release | %s | %s | %s", id, nameid(mark and mark.name, id), flags and flags.ret_value)
L5392 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Further handling aborted by callback")
L5398 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("[%s] No completed hold action, item pickup should occur", time_global())
L5457 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("[%s] use key released%s | set at %s | dur held %s | hold time %s", time_global(), action_text, cfg.use_released, dur, time)
L5480 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Actor just took %s, unregistering scanned object", nameid(obj, id))
L5762 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
local _ = log and printf("Debug logging enabled: %s | verbose %s | debug_dump %s | DEV_DEBUG %s", debuglogs, verbose, debug_dump, DEV_DEBUG)
L5770 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
_=log and printf("No previous DotMarks version information found in MCM, setting to current version")
L5776 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
_=log and printf(vtext, last_version, last_release)
L5782 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Existing release %s is older than %s, adding opts to reset table", last_release, rel)
L5784 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Will reset opt %s", k)
L5898 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Storing found stash data for %s", nameid(v.name, id))
L4 🔴 global_write
Global write: script_name
Impact: low
Show code
script_name = "ui_hud_dotmarks"
L73 🔴 global_write
Global write: logprefix
Impact: low
Show code
logprefix = "[DotMarks] "
L74 🔴 global_write
Global write: debuglogs
Impact: low
Show code
debuglogs = false
L75 🔴 global_write
Global write: verbose
Impact: low
Show code
verbose = false
L76 🔴 global_write
Global write: debug_dump
Impact: low
Show code
debug_dump = false
L103 🔴 global_write
Global write: debuglogs
Impact: low
Show code
if (debug_en ~= nil) then debuglogs = debug_en end
L104 🔴 global_write
Global write: verbose
Impact: low
Show code
if (verbose_en ~= nil) then verbose = verbose_en end
L105 🔴 global_write
Global write: debug_dump
Impact: low
Show code
if (dump_en ~= nil) then debug_dump = dump_en end
L159 🔴 global_write
Global write: valid_mcm_version
Impact: low
Show code
valid_mcm_version = dotmarks_mcm.valid_mcm_version
L160 🔴 global_write
Global write: targeted_id
Impact: low
Show code
targeted_id, locked_id = nil
L160 🔴 global_write
Global write: locked_id
Impact: low
Show code
targeted_id, locked_id = nil
L161 🔴 global_write
Global write: scanning
Impact: low
Show code
scanning = false
L162 🔴 global_write
Global write: pickup_index
Impact: low
Show code
pickup_index = {}
L163 🔴 global_write
Global write: nearby_pickups
Impact: low
Show code
nearby_pickups = {}
L164 🔴 global_write
Global write: active_anims
Impact: low
Show code
active_anims = {}
L943 🔴 global_write
Global write: eased
Impact: low
Show code
eased = easing.easeOutElastic(cycle)
L1147 🔴 global_write
Global write: scanning
Impact: low
Show code
scanning = false
L1157 🔴 global_write
Global write: scanning
Impact: low
Show code
scanning = true
L2267 🔴 global_write
Global write: cls
Impact: low
Show code
cls = obj and obj:clsid()
L3394 🔴 global_write
Global write: cfg
Impact: low
Show code
cfg = cfg or {}
L3469 🔴 global_write
Global write: scanning
Impact: low
Show code
scanning = true
L3477 🔴 global_write
Global write: scanning
Impact: low
Show code
scanning = false
L3851 🔴 global_write
Global write: locked_id
Impact: low
Show code
locked_id = nil
L3854 🔴 global_write
Global write: targeted_id
Impact: low
Show code
targeted_id = nil
L4208 🔴 global_write
Global write: targeted_id
Impact: low
Show code
targeted_id = cfg.racked_items[id]
L4211 🔴 global_write
Global write: targeted_id
Impact: low
Show code
targeted_id = id
L4219 🔴 global_write
Global write: targeted_id
Impact: low
Show code
targeted_id = nil
L4224 🔴 global_write
Global write: targeted_id
Impact: low
Show code
targeted_id = best_hovered_id()
L4819 🔴 global_write
Global write: se_mag
Impact: low
Show code
se_mag = alife_create_item(mag_data.section, db.actor)
L5061 🔴 global_write
Global write: locked_id
Impact: low
Show code
locked_id = nearby_pickups[ind_new]
L5068 🔴 global_write
Global write: locked_id
Impact: low
Show code
locked_id = nil
L5070 🔴 global_write
Global write: nearby_pickups
Impact: low
Show code
nearby_pickups = {}
L5071 🔴 global_write
Global write: pickup_index
Impact: low
Show code
pickup_index = {}
L5076 🔴 global_write
Global write: actor_moving
Impact: low
Show code
actor_moving = (level.actor_moving_state() > 0)
L5082 🔴 global_write
Global write: actor_moving
Impact: low
Show code
actor_moving = dist > (cfg.actor_move_threshold or 0.1)
L5759 🔴 global_write
Global write: debuglogs
Impact: low
Show code
debuglogs = get_mcm("dotmarks/dmarkadv/debuglogs", debuglogs)
L5760 🔴 global_write
Global write: verbose
Impact: low
Show code
verbose = get_mcm("dotmarks/dmarkadv/verbose", verbose)
L5906 🔴 global_write
Global write: valid_mcm_version
Impact: low
Show code
valid_mcm_version = dotmarks_mcm and dotmarks_mcm.valid_mcm_version
L5914 🔴 global_write
Global write: mags_installed
Impact: low
Show code
mags_installed = (magazines and magazine_binder)
L5945 🔴 global_write
Global write: cfg
Impact: low
Show code
cfg = nil
L5950 🔴 global_write
Global write: cfg
Impact: low
Show code
cfg = nil
L4362 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local se_obj = actor and alife_create("inv_backpack", pos, actor:level_vertex_id(), actor:game_vertex_id())
L4362 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local se_obj = actor and alife_create("inv_backpack", pos, actor:level_vertex_id(), actor:game_vertex_id())
L4642 🟡 potential_nil_access
Potential nil access: 'npc' from level.object_by_id() used without nil check
Impact: low
Show code
if npc and IsStalker(npc) and npc:alive() then
L925 🟡 unused_local_variable
Local variable 'tooclose' is assigned but never used
Impact: low
Show code
local tooclose = mark.last_dist and mark.last_dist < dgr
L1697 🟡 unused_local_variable
Local variable 'pxoff' is assigned but never used
Impact: low
Show code
local pxoff = cfg.pri_use_x_offset
L1699 🟡 unused_local_variable
Local variable 'sxoff' is assigned but never used
Impact: low
Show code
local sxoff = cfg.sec_use_x_offset
L2639 🟡 unused_local_variable
Local variable 'fade_dir' is assigned but never used
Impact: low
Show code
local fade_dir = (alpha_start > alpha_end) and "out" or "in"
L5356 🟡 unused_local_variable
Local variable 'mkey' is assigned but never used
Impact: low
Show code
local mkey =
L5501 🟡 unused_local_variable
Local variable 'was_items' is assigned but never used
Impact: low
Show code
local was_items = mark.has_items
L5808 🟡 unused_local_variable
Local variable 'foo' is assigned but never used
Impact: low
Show code
local foo = ui_mcm.get(mcm_path)

ui_mcm_argb_input.script

L198 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Setting up colorblind control")
L25 🔴 global_write
Global write: script_name
Impact: low
Show code
script_name = "ui_mcm_argb_input"
L26 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "2.1.1"
L27 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20250428

utils_catspaw_common.script

L197 🟢 uncached_globals_summary
Cache 1 globals in to_bool
Impact: medium
Show code
L198: type L200: type
L278 🟢 uncached_globals_summary
Cache 1 globals in get_next_tg_interval
Impact: medium
Show code
L281: tonumber L282: tonumber
L592 🟢 uncached_globals_summary
Cache 1 globals in import_metatable
Impact: medium
Show code
L603: type L612: type
L47 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf((caller.logprefix or logprefix) .. logtext, ...)
L56 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf((caller.logprefix or logprefix) .. (caller.vprefix or vprefix) .. logtext, ...)
L66 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf((raw_prefix or "") .. logtext, ...)
L133 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( "! Modded exes not detected! No extra features available.\n" ..
L139 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(logdiv .. "@ Modded exes %s feature support (GAMMA: %s)", exes_version, using_gamma_modpack)
L141 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s %s (added %s): %s", v.enabled and "-" or "!", v.name, v.ver, v.func())
L143 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(logdiv)
L497 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! ERROR: no INI filename passed to %s.load_file_data%s, cannot continue!", script_name, args.called_by and (" by " ..args.called_by) or "")
L502 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
local function dl(s, ...) return log and printf(s, ...) end
L627 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Loaded %s v%s (rel %s)", script_name, script_version, release_date)
L4 🔴 global_write
Global write: script_name
Impact: low
Show code
script_name = "utils_catspaw_common"
L5 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "1.15"
L6 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20250530
L73 🔴 global_write
Global write: debuglogs
Impact: low
Show code
debuglogs = false
L74 🔴 global_write
Global write: verbose
Impact: low
Show code
verbose = false
L75 🔴 global_write
Global write: logprefix
Impact: low
Show code
logprefix = "[CatsyUtils] " -- gets prefixed, optional
L76 🔴 global_write
Global write: vprefix
Impact: low
Show code
vprefix = "[V] " -- gets added to verbose log entries, optional
L94 🔴 global_write
Global write: debuglogs
Impact: low
Show code
if (debug_en ~= nil) then debuglogs = debug_en end
L95 🔴 global_write
Global write: verbose
Impact: low
Show code
if (verbose_en ~= nil) then verbose = verbose_en end
L101 🔴 global_write
Global write: logdiv
Impact: low
Show code
logdiv = "~ ------------------------------------------------------------------------\n"
L107 🔴 global_write
Global write: engine_features
Impact: low
Show code
engine_features = {
L119 🔴 global_write
Global write: using_gamma_modpack
Impact: low
Show code
using_gamma_modpack = game_version:find("G.A.M.M.A.") and true or false
L121 🔴 global_write
Global write: using_modded_exes
Impact: low
Show code
using_modded_exes = using_gamma_modpack or exes_version and true or false
L245 🔴 global_write
Global write: easing
Impact: low
Show code
easing = {
L401 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
max_weight = max_weight + (outfit and outfit:get_additional_max_weight() or 0)
L404 🟡 potential_nil_access
Potential nil access: 'backpack' from :item_in_slot() used without nil check
Impact: low
Show code
max_weight = max_weight + (backpack and backpack:get_additional_max_weight() or 0)
L572 🟡 unused_local_variable
Local variable 'def_ltx' is assigned but never used
Impact: low
Show code
local def_ltx = def_ini and def_ini:get_sections(true)

utils_catspaw_hudmarks.script

L405 🟢 math_pow_simple
math.pow(dist_prog, 2) -> dist_prog*dist_prog
Impact: high
Show code
dist_coef = math.abs(math.sqrt(math.pow(dist_prog, 2)))
L345 🟢 repeated_se_obj_clsid()
se_obj:clsid() called 3x in get_screen_coords
Impact: low
Show code
Cache se_obj:clsid() result
L465 🟢 repeated_obj_id()
obj:id() called 2x in actor_on_update
Impact: low
Show code
Cache obj:id() result
L281 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[utils_catspaw_hudmarks.fade_by_dist] Fading elements by dist %s:\n"..
L1427 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
local _ = debug_dump and printf("[UIHUDMarker:Update][%s][%s] Killswitch checks passed", self.mark_id, time_global())
L1529 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ ========================================================================")
L1530 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[UIHUDMarker:Update][First update for ID %s]%s", self.mark_id, typedata)
L1531 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
_ = self.custom_argb and printf("Found custom_argb: %s,%s,%s,%s", self.custom_argb.a, self.custom_argb.r, self.custom_argb.g, self.custom_argb.b)
L1532 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("HUD Marker %s (%s) | obj %s - online: %s\n* Level: %s | Dist: %sm%s",
L1535 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ ========================================================================")
L1695 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Loaded %s v%s (rel %s)", script_name, script_version, release_date)
L4 🔴 global_write
Global write: script_name
Impact: low
Show code
script_name = "utils_catspaw_hudmarks"
L5 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "1.3"
L6 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20250717
L54 🔴 global_write
Global write: debug_dump
Impact: low
Show code
debug_dump = false -- flag used to dump one-time detailed info for certain things
L55 🔴 global_write
Global write: debuglogs
Impact: low
Show code
debuglogs = false
L56 🔴 global_write
Global write: verbose
Impact: low
Show code
verbose = false
L57 🔴 global_write
Global write: logprefix
Impact: low
Show code
logprefix = ""
L58 🔴 global_write
Global write: vprefix
Impact: low
Show code
vprefix = ""
L74 🔴 global_write
Global write: debuglogs
Impact: low
Show code
if (debug_en ~= nil) then debuglogs = debug_en end
L75 🔴 global_write
Global write: verbose
Impact: low
Show code
if (verbose_en ~= nil) then verbose = verbose_en end
L76 🔴 global_write
Global write: debug_dump
Impact: low
Show code
if (debug_dump ~= nil) then debug_dump = dump_en end
L118 🔴 global_write
Global write: marker_presets
Impact: low
Show code
marker_presets = {
L465 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
self.current_crosshair = obj and obj:id() or nil
L96 🟡 unused_local_variable
Local variable 'gts' is assigned but never used
Impact: low
Show code
local gts = game.translate_string
L932 🟡 unused_local_variable
Local variable 'preset_args' is assigned but never used
Impact: low
Show code
local preset_args = nil
L1591 🟡 unused_local_variable
Local variable 'szx' is assigned but never used
Impact: low
Show code
local szx, szy = self:ScaleMarkerByDistance()
L1603 🟡 unused_local_variable
Local variable 'd_nhide' is assigned but never used
Impact: low
Show code
local d_nhide = self.d_near_hide_dist or self.near_hide_dist
L1604 🟡 unused_local_variable
Local variable 'd_near' is assigned but never used
Impact: low
Show code
local d_near = self.d_near_fade_dist or self.near_fade_dist
L1605 🟡 unused_local_variable
Local variable 'd_far' is assigned but never used
Impact: low
Show code
local d_far = self.d_far_fade_dist or self.far_fade_dist
L1606 🟡 unused_local_variable
Local variable 'd_fhide' is assigned but never used
Impact: low
Show code
local d_fhide = self.d_far_hide_dist or self.far_hide_dist
L1636 🟡 unused_local_variable
Local variable 'dx' is assigned but never used
Impact: low
Show code
local nx,ny,dx,dy,tw
L1636 🟡 unused_local_variable
Local variable 'dy' is assigned but never used
Impact: low
Show code
local nx,ny,dx,dy,tw

utils_catspaw_mapspots.script

L154 🟢 uncached_globals_summary
Cache 1 globals in get_argb
Impact: medium
Show code
L158: tonumber L159: tonumber
L217 🟢 uncached_globals_summary
Cache 1 globals in get_mapspot_texture_data
Impact: medium
Show code
L267: tonumber L268: tonumber
L279 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Loaded %s v%s (rel %s)", script_name, script_version, release_date)
L4 🔴 global_write
Global write: script_name
Impact: low
Show code
script_name = "utils_catspaw_mapspots"
L5 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "1.1"
L6 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20250406
L35 🔴 global_write
Global write: logprefix
Impact: low
Show code
logprefix = "[Catsy:Mapspots] "
L36 🔴 global_write
Global write: debuglogs
Impact: low
Show code
debuglogs = false
L37 🔴 global_write
Global write: verbose
Impact: low
Show code
verbose = false
L38 🔴 global_write
Global write: vprefix
Impact: low
Show code
vprefix = ""
L54 🔴 global_write
Global write: debuglogs
Impact: low
Show code
if (debug_en ~= nil) then debuglogs = debug_en end
L55 🔴 global_write
Global write: verbose
Impact: low
Show code
if (verbose_en ~= nil) then verbose = verbose_en end
L66 🔴 global_write
Global write: task_mapspot_whitelist
Impact: low
Show code
task_mapspot_whitelist = {
L73 🔴 global_write
Global write: mapspot_data_cache
Impact: low
Show code
mapspot_data_cache = {}
L219 🔴 global_write
Global write: mapspot_data_cache
Impact: low
Show code
mapspot_data_cache = {}

utils_catspaw_taskmonitor.script

L63 🟢 uncached_globals_summary
Cache 1 globals in update_current_task_target
Impact: medium
Show code
L70: tonumber L71: tonumber
L4 🔴 global_write
Global write: script_name
Impact: low
Show code
script_name = "utils_catspaw_taskmonitor"
L5 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "1.0"
L6 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20250324

utils_catspaw_text.script

L221 🟢 uncached_globals_summary
Cache 1 globals in csv_argb_to_tbl
Impact: medium
Show code
L230: tonumber L231: tonumber
L330 🟢 uncached_globals_summary
Cache 2 globals in int_to_rgba
Impact: medium
Show code
L338: bit.band L339: bit.band L338: bit.rshift L339: bit.rshift
L794 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Loaded %s v%s (rel %s)", script_name, script_version, release_date)
L4 🔴 global_write
Global write: script_name
Impact: low
Show code
script_name = "utils_catspaw_text"
L5 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "1.11"
L6 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20250717
L37 🔴 global_write
Global write: debuglogs
Impact: low
Show code
debuglogs = false
L38 🔴 global_write
Global write: verbose
Impact: low
Show code
verbose = false
L39 🔴 global_write
Global write: logprefix
Impact: low
Show code
logprefix = "[CatsyText] "
L40 🔴 global_write
Global write: vprefix
Impact: low
Show code
vprefix = ""
L56 🔴 global_write
Global write: debuglogs
Impact: low
Show code
if (debug_en ~= nil) then debuglogs = debug_en end
L57 🔴 global_write
Global write: verbose
Impact: low
Show code
if (verbose_en ~= nil) then verbose = verbose_en end
L82 🔴 global_write
Global write: tokens_generated
Impact: low
Show code
tokens_generated = false
L296 🔴 global_write
Global write: state_tokens
Impact: low
Show code
state_tokens = {}
L297 🔴 global_write
Global write: state_colors
Impact: low
Show code
state_colors = {
L420 🔴 global_write
Global write: wpo_thresholds
Impact: low
Show code
wpo_thresholds = {
L768 🔴 global_write
Global write: safename
Impact: low
Show code
safename = bestname -- alias for backwards compatibility
L75 🟡 unused_local_variable
Local variable 'sfind' is assigned but never used
Impact: low
Show code
local sfind = string.find
L138 🟡 unused_local_variable
Local variable 'custom_tokens' is assigned but never used
Impact: low
Show code
local custom_tokens = args and args.tokens or {}
L195 🟡 unused_local_variable
Local variable 'nfirst' is assigned but never used
Impact: low
Show code
local nfirst, nlast = get_firstname_lastname(npcname)
L195 🟡 unused_local_variable
Local variable 'nlast' is assigned but never used
Impact: low
Show code
local nfirst, nlast = get_firstname_lastname(npcname)
L686 🟡 unused_local_variable
Local variable 'st_id' is assigned but never used
Impact: low
Show code
local st_id = tostring(id)

z_apm_popup_pickup_dotmarks.script

L29 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
local _ = (DEV_DEBUG or (ui_hud_dotmarks and ui_hud_dotmarks.debuglogs)) and printf("z_apm_popup_pickup_dotmarks is monkeypatching APM to fix duplicate pop-up messages")
L25 🔴 global_write
Global write: timeout
Impact: low
Show code
timeout = 2000
L26 🔴 global_write
Global write: pickups
Impact: low
Show code
pickups = {}

z_fdda_pickup_intercept_dotmarks.script

L19 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
local _ = (DEV_DEBUG or (ui_hud_dotmarks and ui_hud_dotmarks.debuglogs)) and printf("[DotMarks] FDDA Redone detected, patching liz_fdda_redone_item_pickups.actor_on_item_before_pickup")
L31 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
local _ = (DEV_DEBUG or (ui_hud_dotmarks and ui_hud_dotmarks.debuglogs)) and printf("[DotMarks] FDDA detected, patching take_item_anim.actor_on_item_before_pickup")
L13 🔴 global_write
Global write: fddar_oibp
Impact: low
Show code
fddar_oibp = liz_fdda_redone_item_pickup and liz_fdda_redone_item_pickup.actor_on_item_before_pickup
L14 🔴 global_write
Global write: fdda_oibp
Impact: low
Show code
fdda_oibp = take_item_anim and take_item_anim.actor_on_item_before_pickup
L15 🔴 global_write
Global write: patched
Impact: low
Show code
patched = false
L18 🔴 global_write
Global write: patched
Impact: low
Show code
patched = true
L30 🔴 global_write
Global write: patched
Impact: low
Show code
patched = true

z_hf_furniture_types_init_stash_name.script

L44 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
local _ = (DEV_DEBUG or (ui_hud_dotmarks and ui_hud_dotmarks.debuglogs)) and printf("z_hf_furniture_types_init_stash_name is monkeypatching hf_furniture types to give stashes more useful names")

z_ui_inventory_dotmarks.script

L18 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
local _ = log and printf("[%s] Trying to start inventory in %s mode for container %s (%s)", time_global(), mode, obj and obj:name(), obj and obj:id())
L26 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
_ = log and printf("[%s][z_ui_inventory_dotmarks] cfg.block_loot_window is true, blocking access to container %s (%s)", time_global(), obj and obj:name(), obj and obj:id())

zz_autoloot_dotmarks.script

L44 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
local _ = (DEV_DEBUG or (ui_hud_dotmarks and ui_hud_dotmarks.debuglogs)) and printf("zz_autoloot_dotmarks is monkeypatching z_auto_looter")
L39 🔴 global_write
Global write: override_id
Impact: low
Show code
override_id = nil
L40 🔴 global_write
Global write: last_loot_remote
Impact: low
Show code
last_loot_remote = false
L47 🔴 global_write
Global write: last_loot_remote
Impact: low
Show code
last_loot_remote = false
L49 🔴 global_write
Global write: last_loot_remote
Impact: low
Show code
last_loot_remote = true
L51 🔴 global_write
Global write: override_id
Impact: low
Show code
override_id = nil
L69 🔴 global_write
Global write: last_loot_remote
Impact: low
Show code
last_loot_remote = true
L63 🟡 potential_nil_access
Potential nil access: 'target' from level.get_target_obj() used without nil check
Impact: low
Show code
if target and (IsStalker(target) and not target:alive() or IsInvbox(target)) then

zzzz_wounded_heal_anim_dotmarks.script

L26 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
local _ = (DEV_DEBUG or (ui_hud_dotmarks and ui_hud_dotmarks.debuglogs)) and printf("zzzz_wounded_heal_anim_dotmarks is monkeypatching zzz_wounded_heal_anim to allow integration")

453- Items Model Drop After Usage - Kute

2 files (🟢9 🟡2 🔴0 🔵14)

demonized_time_events.script

L23 🟢 uncached_globals_summary
Cache 1 globals in print_table
Impact: medium
Show code
L32: type L34: type
L35 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = function",k)
L38 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s",k,utils_data.vector_to_string(v))
L40 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = userdata", k)
L45 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = true",k)
L47 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = true")
L51 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = false", k)
L53 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = false")
L58 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s", k,v)
L60 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = nil", k,v)
L121 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("refreshing time events")
L202 🟡 unused_local_variable
Local variable 'tg_past' is assigned but never used
Impact: low
Show code
local tg_past = 0

model_dropper_mcm.script

L143 🟢 table_insert_append
table.insert(dropper_id, v) -> dropper_id[#dropper_id+1] = v
Impact: high
Show code
table.insert(dropper_id, { id, getActorPos() })
L159 🟢 table_insert_append
table.insert(drop_queue, v) -> drop_queue[#drop_queue+1] = v
Impact: high
Show code
table.insert(drop_queue,"cigbutt")
L162 🟢 table_insert_append
table.insert(drop_queue, v) -> drop_queue[#drop_queue+1] = v
Impact: high
Show code
table.insert(drop_queue,"cigbutt1")
L165 🟢 table_insert_append
table.insert(drop_queue, v) -> drop_queue[#drop_queue+1] = v
Impact: high
Show code
table.insert(drop_queue,"medkit_needle")
L168 🟢 table_insert_append
table.insert(drop_queue, v) -> drop_queue[#drop_queue+1] = v
Impact: high
Show code
table.insert(drop_queue,"medkit_needle1")
L171 🟢 table_insert_append
table.insert(drop_queue, v) -> drop_queue[#drop_queue+1] = v
Impact: high
Show code
table.insert(drop_queue,section)
L66 🟢 uncached_globals_summary
Cache 1 globals in print
Impact: medium
Show code
L67: type L69: type
L97 🟢 uncached_globals_summary
Cache 1 globals in apply_force
Impact: medium
Show code
L100: math.random L100: math.random
L68 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("ze table\n%s", utils_data.print_table(a, false, true))
L70 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(tostring(a))
L73 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("("..a.x.." , "..a.y.." , "..a.z..") ")
L148 🔵 debug_statement
Debug call: print()
Impact: medium
Show code
print("obj search timeout")
L192 🟡 unused_local_variable
Local variable 'pos_removed' is assigned but never used
Impact: low
Show code
local pos_removed = {}

454- Spawning Shenanigans Prevention - Kute

1 file (🟢1 🟡1 🔴0 🔵2)

safe_start_mcm.script

L26 🟢 table_insert_append
table.insert(sorted_order, v) -> sorted_order[#sorted_order+1] = v
Impact: high
Show code
table.insert(sorted_order,v.order)
L48 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("ze table\n%s", utils_data.print_table(a, false, true))
L50 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(tostring(a))
L55 🟡 unused_local_variable
Local variable 'sys_param_types' is assigned but never used
Impact: low
Show code
local sys_param_types = {

458- Repair Notifications - SaloEater

4 files (🟢27 🟡25 🔴1 🔵33)

custom_functor_autoinject.script

L114 🟢 string_len
string.len(pos) -> #pos
Impact: low
Show code
sub_print_r(val,indent..string.rep(" ",string.len(pos)+8))
L115 🟢 string_len
string.len(pos) -> #pos
Impact: low
Show code
printf(indent..string.rep(" ",string.len(pos)+6).."}")
L105 🟢 uncached_globals_summary
Cache 1 globals in sub_print_r
Impact: medium
Show code
L106: tostring L107: tostring
L128 🟢 uncached_globals_summary
Cache 1 globals in print_table
Impact: medium
Show code
L137: type L139: type
L107 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."*"..tostring(t))
L113 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."["..pos.."] => "..tostring(t).." {")
L115 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent..string.rep(" ",string.len(pos)+6).."}")
L117 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."["..pos.."] => "..tostring(val))
L121 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent..tostring(t))
L140 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = function",k)
L143 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s",k,utils_data.vector_to_string(v))
L145 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = userdata", k)
L150 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = true",k)
L152 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = true")
L156 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = false", k)
L158 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = false")
L163 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s", k,v)
L165 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = nil", k,v)
L319 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s, %s", k, v.index)
L322 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s, %s, max custom_functor reached", k, v.index)
L424 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Custom functors, processing queue")
L427 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Custom functors, type %s", v.type)
L464 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("functor slot is not valid, min 1, max 10, your slot: %s", slot)
L479 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("functor slot is not valid min 1, max 10, your slot: %s", slot)
L515 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[" .. k .. "] => ")
L98 🟡 unused_local_variable
Local variable 'table_remove' is assigned but never used
Impact: low
Show code
local table_remove = table.remove

item_parts_repair_notifications.script

L61 🟢 table_insert_append
table.insert(parts_tbl, v) -> parts_tbl[#parts_tbl+1] = v
Impact: high
Show code
table.insert(parts_tbl, parts_tbl[math.random(#parts_tbl)])
L140 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details, with_scope:sub(2))
L146 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details, scope)
L150 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details, sil)
L154 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details, gl)
L174 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details,item_parts.spare_parts[i])
L185 🟢 table_insert_append
table.insert(upgr_tools, v) -> upgr_tools[#upgr_tools+1] = v
Impact: high
Show code
table.insert(upgr_tools,tool)
L190 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details,upgr_tools[i])
L281 🟢 table_insert_append
table.insert(upgr_tools, v) -> upgr_tools[#upgr_tools+1] = v
Impact: high
Show code
table.insert(upgr_tools,tool)
L286 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details,upgr_tools[i])
L41 🟢 repeated_obj_id()
obj:id() called 3x in <global>
Impact: low
Show code
Cache obj:id() result
L43 🟢 repeated_obj_section()
obj:section() called 3x in <global>
Impact: low
Show code
Cache obj:section() result
L65 🟢 repeated_obj_d_section()
obj_d:section() called 6x in <global>
Impact: low
Show code
Cache obj_d:section() result
L78 🟢 repeated_npc_id()
npc:id() called 3x in <global>
Impact: low
Show code
Cache npc:id() result
L321 🟡 string_concat_in_loop
String concat in loop: items = items .. x
Impact: critical
Show code
items = items .. (items ~= "" and ", " or "") .. ui_item.get_sec_name(sec)
L6 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ item_parts timer | no owner found")
L49 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ item_parts | no owner found for [%s]", obj:name())
L85 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ item_parts timer | no owner found")
L126 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ item_parts | no owner found for [%s]", obj:name())
L217 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ item_parts timer | no owner found")
L258 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ item_parts | no owner found for [%s]", obj:name())
L78 🟡 potential_nil_access
Potential nil access: 'npc' from :parent() used without nil check
Impact: low
Show code
CreateTimeEvent(0,"delay_disassembly" .. id, delay, timer_disassembly_item, npc:id(), parts_tbl, sec, con, name, obj_d:section(), new_con)
L100 🟡 potential_nil_access
Potential nil access: 'npc' from :parent() used without nil check
Impact: low
Show code
local se_result = alife_create(result_details[i], npc:position(), npc:level_vertex_id(), npc:game_vertex_id(), npc:id(), false)
L100 🟡 potential_nil_access
Potential nil access: 'npc' from :parent() used without nil check
Impact: low
Show code
local se_result = alife_create(result_details[i], npc:position(), npc:level_vertex_id(), npc:game_vertex_id(), npc:id(), false)
L100 🟡 potential_nil_access
Potential nil access: 'npc' from :parent() used without nil check
Impact: low
Show code
local se_result = alife_create(result_details[i], npc:position(), npc:level_vertex_id(), npc:game_vertex_id(), npc:id(), false)
L100 🟡 potential_nil_access
Potential nil access: 'npc' from :parent() used without nil check
Impact: low
Show code
local se_result = alife_create(result_details[i], npc:position(), npc:level_vertex_id(), npc:game_vertex_id(), npc:id(), false)
L210 🟡 potential_nil_access
Potential nil access: 'npc' from :parent() used without nil check
Impact: low
Show code
CreateTimeEvent(0,"delay_disassembly" .. id, delay, timer_disassembly_weapon, npc:id(), result_details, result_conditions, name, obj_d:section(), new_con)
L235 🟡 potential_nil_access
Potential nil access: 'npc' from :parent() used without nil check
Impact: low
Show code
local se_result = alife_create(result_details[i], npc:position(), npc:level_vertex_id(), npc:game_vertex_id(), npc:id(), false)
L235 🟡 potential_nil_access
Potential nil access: 'npc' from :parent() used without nil check
Impact: low
Show code
local se_result = alife_create(result_details[i], npc:position(), npc:level_vertex_id(), npc:game_vertex_id(), npc:id(), false)
L235 🟡 potential_nil_access
Potential nil access: 'npc' from :parent() used without nil check
Impact: low
Show code
local se_result = alife_create(result_details[i], npc:position(), npc:level_vertex_id(), npc:game_vertex_id(), npc:id(), false)
L235 🟡 potential_nil_access
Potential nil access: 'npc' from :parent() used without nil check
Impact: low
Show code
local se_result = alife_create(result_details[i], npc:position(), npc:level_vertex_id(), npc:game_vertex_id(), npc:id(), false)
L307 🟡 potential_nil_access
Potential nil access: 'npc' from :parent() used without nil check
Impact: low
Show code
CreateTimeEvent(0,"delay_disassembly" .. id, delay, timer_disassembly_outfit, npc:id(), result_details, result_conditions, name, obj_d:section(), new_con)
L39 🟡 unused_local_variable
Local variable 'old_item_parts_disassembly_item' is assigned but never used
Impact: low
Show code
local old_item_parts_disassembly_item = item_parts.disassembly_item
L113 🟡 unused_local_variable
Local variable 'old_item_parts_disassembly_weapon' is assigned but never used
Impact: low
Show code
local old_item_parts_disassembly_weapon = item_parts.disassembly_weapon
L132 🟡 unused_local_variable
Local variable 'get_ammo' is assigned but never used
Impact: low
Show code
local get_ammo = {}
L248 🟡 unused_local_variable
Local variable 'old_item_parts_disassembly_outfit' is assigned but never used
Impact: low
Show code
local old_item_parts_disassembly_outfit = item_parts.disassembly_outfit
L310 🟡 unused_local_variable
Local variable 'old_item_parts_func_disassembly' is assigned but never used
Impact: low
Show code
local old_item_parts_func_disassembly = item_parts.func_disassembly

zzz_dit_repair_notifications.script

L7 🟢 uncached_globals_summary
Cache 1 globals in get_suitable_dtool
Impact: medium
Show code
L10: pairs L13: pairs
L43 🟢 repeated_obj_d_section()
obj_d:section() called 3x in <global>
Impact: low
Show code
Cache obj_d:section() result
L53 🟡 string_concat_in_loop
String concat in loop: items = items .. x
Impact: critical
Show code
items = items .. (items ~= "" and ", " or "") .. ui_item.get_sec_name(sec)
L2 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ zzz_dit not found | unloading module")
L5 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("loading module: zzz_dit_repair_notifications")
L41 🔴 global_write
Global write: obj_d
Impact: low
Show code
obj_d = obj_d or get_suitable_dtool(obj)

zzzz_arti_jamming_repairs_repair_notifications.script

L95 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details, with_scope:sub(2))
L101 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details, scope)
L105 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details, sil)
L109 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details, gl)
L129 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details,zzzz_arti_jamming_repairs.spare_parts[i])
L140 🟢 table_insert_append
table.insert(upgr_tools, v) -> upgr_tools[#upgr_tools+1] = v
Impact: high
Show code
table.insert(upgr_tools,tool)
L145 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details,upgr_tools[i])
L2 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("zzzz_arti_jamming_repairs not found | unloading module")
L5 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("loading module: zzzz_arti_jamming_repairs_repair_notifications")
L40 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ item_parts timer | no owner found")
L81 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ item_parts | no owner found for [%s]", obj:name())
L26 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check (auto-fixable)
Impact: low
Show code
wpn:set_condition( clamp(wpn:condition() + 0.1, 0, 0.999) )
L26 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check (auto-fixable)
Impact: low
Show code
wpn:set_condition( clamp(wpn:condition() + 0.1, 0, 0.999) )
L165 🟡 potential_nil_access
Potential nil access: 'npc' from :parent() used without nil check
Impact: low
Show code
CreateTimeEvent(0,"delay_disassembly" .. id, delay, timer_disassembly_weapon, npc:id(), result_details, result_conditions, name, obj_d:section(), new_con)
L7 🟡 unused_local_variable
Local variable 'old_zzzz_arti_jamming_repairs_replace_part' is assigned but never used
Impact: low
Show code
local old_zzzz_arti_jamming_repairs_replace_part = zzzz_arti_jamming_repairs.replace_part
L68 🟡 unused_local_variable
Local variable 'old_zzzz_arti_jamming_repairs_custom_disassembly_weapon' is assigned but never used
Impact: low
Show code
local old_zzzz_arti_jamming_repairs_custom_disassembly_weapon = zzzz_arti_jamming_repairs.custom_disassembly_weapon
L87 🟡 unused_local_variable
Local variable 'get_ammo' is assigned but never used
Impact: low
Show code
local get_ammo = {}

46- Outfits Affects Movespeed - arti

3 files (🟢0 🟡10 🔴9 🔵5)

monke_patch_ui.script

L3 🔴 global_write
Global write: old_prep_table
Impact: low
Show code
old_prep_table = utils_ui.prepare_stats_table

outfit_speed_mcm.script

L6 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("speed | %s | " .. txt, time_global(), ...)
L74 🔴 global_write
Global write: weapon_sec
Impact: low
Show code
weapon_sec = (weapon and IsWeapon(weapon)) and weapon:section() or "no weapon"
L167 🔴 global_write
Global write: result
Impact: low
Show code
result, id, value = speed_table:r_line_ex("speed",i,"","")
L167 🔴 global_write
Global write: id
Impact: low
Show code
result, id, value = speed_table:r_line_ex("speed",i,"","")
L167 🔴 global_write
Global write: value
Impact: low
Show code
result, id, value = speed_table:r_line_ex("speed",i,"","")
L174 🔴 global_write
Global write: result
Impact: low
Show code
result, id, value = speed_table:r_line_ex("sprint_speed",i,"","")
L174 🔴 global_write
Global write: id
Impact: low
Show code
result, id, value = speed_table:r_line_ex("sprint_speed",i,"","")
L174 🔴 global_write
Global write: value
Impact: low
Show code
result, id, value = speed_table:r_line_ex("sprint_speed",i,"","")
L202 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "speed",sh=true ,gr={
L49 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local outfit_id = outfit and outfit:id() or 0
L70 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local weapon_id = weapon and weapon:id() or 0
L115 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local tot_weight = actor:get_total_weight()
L116 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local max_weight = actor:get_actor_max_weight()
L118 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local outfit = actor:item_in_slot(7)
L119 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local backpack = actor:item_in_slot(13)
L120 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
max_weight = max_weight + (outfit and outfit:get_additional_max_weight() or 0)
L121 🟡 potential_nil_access
Potential nil access: 'backpack' from :item_in_slot() used without nil check
Impact: low
Show code
max_weight = max_weight + (backpack and backpack:get_additional_max_weight() or 0)
L122 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:iterate_belt( function(owner, obj)
L126 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:cast_Actor():conditions():BoosterForEach( function(booster_type, booster_time, booster_value)

speed.script

L84 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Run modifier %s, val %s", k, v)
L87 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("final run: %s", run_coef)
L91 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Sprint modifier %s, val %s", k, v)
L94 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("final sprint: %s", spr_coef)

47- Powered Exos - arti

4 files (🟢2 🟡17 🔴12 🔵2)

exo_loot.script

L110 🟢 uncached_globals_summary
Cache 1 globals in spawn_gear
Impact: medium
Show code
L115: math.random L120: math.random
L1 🔴 global_write
Global write: get_data
Impact: low
Show code
get_data = item_exo_device.get_data
L2 🔴 global_write
Global write: set_data
Impact: low
Show code
set_data = item_exo_device.set_data
L3 🔴 global_write
Global write: init_data
Impact: low
Show code
init_data = item_exo_device.init_data
L4 🔴 global_write
Global write: get_config
Impact: low
Show code
get_config = exo_mcm.get_config
L95 🔴 global_write
Global write: SpawnCosmetics
Impact: low
Show code
SpawnCosmetics = death_manager.spawn_cosmetics
L136 🔴 global_write
Global write: bar_tele
Impact: low
Show code
bar_tele = xr_effects.bar_arena_teleport

exo_mcm.script

L14 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "exo",sh=true ,gr={

exo_powers.script

L17 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Building sound table for %s", section)
L192 🔴 global_write
Global write: sounds
Impact: low
Show code
sounds = st[power_active]
L94 🟡 potential_nil_access
Potential nil access: 'exosuit' from :item_in_slot() used without nil check
Impact: low
Show code
local id = exosuit:id()
L270 🟡 potential_nil_access
Potential nil access: 'suit' from :item_in_slot() used without nil check
Impact: low
Show code
local is_rhino = suit and string.find(suit:section(), "nosorog") or false
L279 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
obj:hit(h)
L150 🟡 unused_local_variable
Local variable 'active_power' is assigned but never used
Impact: low
Show code
local active_power
L164 🟡 unused_local_variable
Local variable 'sec' is assigned but never used
Impact: low
Show code
local sec = exosuit:section()

item_exo_device.script

L27 🟢 uncached_globals_summary
Cache 1 globals in init
Impact: medium
Show code
L38: tonumber L39: tonumber
L22 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("arti_exo | %s | " .. txt, time_global(), ...)
L381 🔴 global_write
Global write: CanRepair
Impact: low
Show code
CanRepair = inventory_upgrades.can_repair_item
L387 🔴 global_write
Global write: NameCustom
Impact: low
Show code
NameCustom = ui_inventory.UIInventory.Name_Custom
L398 🔴 global_write
Global write: ActionCustom
Impact: low
Show code
ActionCustom = ui_inventory.UIInventory.Action_Custom
L413 🔴 global_write
Global write: original_build_desc_header
Impact: low
Show code
original_build_desc_header = ui_item.build_desc_header
L105 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return false end
L176 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then
L181 🟡 potential_nil_access
Potential nil access: 'suit' from :item_in_slot() used without nil check
Impact: low
Show code
local id = suit:id()
L192 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then
L197 🟡 potential_nil_access
Potential nil access: 'suit' from :item_in_slot() used without nil check
Impact: low
Show code
local id = suit:id()
L206 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then
L212 🟡 potential_nil_access
Potential nil access: 'suit' from :item_in_slot() used without nil check
Impact: low
Show code
local id = suit:id()
L219 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then
L224 🟡 potential_nil_access
Potential nil access: 'suit' from :item_in_slot() used without nil check
Impact: low
Show code
local data = get_data(suit:id())
L225 🟡 potential_nil_access
Potential nil access: 'suit' from :item_in_slot() used without nil check
Impact: low
Show code
if not data then data = init_data(suit:id()) end
L50 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, sec, value = ini_exo_device:r_line_ex("suit_drain",i,"","")
L249 🟡 unused_local_variable
Local variable 'current_outfit' is assigned but never used
Impact: low
Show code
local current_outfit

48- Powered Exos ExoServomotorSounds patch - arti

2 files (🟢0 🟡5 🔴3 🔵0)

exo_servo_sounds.script

L31 🔴 global_write
Global write: is_exo
Impact: low
Show code
is_exo = item_exo_device.is_exo
L32 🔴 global_write
Global write: get_data
Impact: low
Show code
get_data = item_exo_device.get_data
L51 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local exosuit = actor:item_in_slot(7)
L53 🟡 potential_nil_access
Potential nil access: 'exosuit' from :item_in_slot() used without nil check
Impact: low
Show code
local id = exosuit:id()
L55 🟡 potential_nil_access
Potential nil access: 'exosuit' from :item_in_slot() used without nil check
Impact: low
Show code
local sec = exosuit:section()
L67 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local exosuit = actor:item_in_slot(7)
L68 🟡 potential_nil_access
Potential nil access: 'exosuit' from :item_in_slot() used without nil check
Impact: low
Show code
local id = exosuit:id()

exo_servo_sounds_mcm.script

L2 🔴 global_write
Global write: op
Impact: low
Show code
op ={ id= "exo_servo_sounds", sh=true ,gr =

49- Skill System - Haruka

5 files (🟢2 🟡12 🔴18 🔵6)

haru_skills.script

L272 🟢 uncached_globals_summary
Cache 1 globals in on_game_load
Impact: medium
Show code
L283: pairs L289: pairs
L161 🟢 repeated_item_section()
item:section() called 4x in scavanger_effect
Impact: low
Show code
Cache item:section() result
L20 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("<HARU> | %s | " .. msg, time_global(), ...)
L249 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Could not exec function %s", str)
L1 🔴 global_write
Global write: skills_ini
Impact: low
Show code
skills_ini = ini_file_ex("plugins\\skills\\skills_base.ltx")
L2 🔴 global_write
Global write: skills_levels
Impact: low
Show code
skills_levels = {}
L3 🔴 global_write
Global write: skills_stats
Impact: low
Show code
skills_stats = {}
L4 🔴 global_write
Global write: skills_increments
Impact: low
Show code
skills_increments = {}
L5 🔴 global_write
Global write: options
Impact: low
Show code
options = {}
L143 🔴 global_write
Global write: CreateReleaseItem
Impact: low
Show code
CreateReleaseItem = death_manager.create_release_item
L259 🔴 global_write
Global write: skills_levels
Impact: low
Show code
skills_levels = m_data.skills_levels or {}
L26 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local tot_weight = actor:get_total_weight()
L27 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local max_weight = actor:get_actor_max_weight()
L28 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local outfit = actor:item_in_slot(7)
L29 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local backpack = actor:item_in_slot(13)
L30 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
max_weight = max_weight + (outfit and outfit:get_additional_max_weight() or 0)
L31 🟡 potential_nil_access
Potential nil access: 'backpack' from :item_in_slot() used without nil check
Impact: low
Show code
max_weight = max_weight + (backpack and backpack:get_additional_max_weight() or 0)
L33 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:iterate_belt(function(owner, obj)
L38 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:cast_Actor():conditions():BoosterForEach(function(booster_type, booster_time, booster_value)
L16 🟡 unused_local_variable
Local variable 'inv_active' is assigned but never used
Impact: low
Show code
local inv_active = false
L276 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = death_ini:r_line_ex("keep_items",i,"","")

haru_skills_mcm.script

L4 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "skill_system", sh=true ,gr =

speed.script

L80 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Run modifier %s, val %s", k, v)
L83 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("final run: %s", run_coef)
L87 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Sprint modifier %s, val %s", k, v)
L90 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("final sprint: %s", spr_coef)

ui_haru_skills.script

L217 🔴 global_write
Global write: p_width
Impact: low
Show code
p_width = parent_width or 1024
L218 🔴 global_write
Global write: p_center
Impact: low
Show code
p_center = p_width/2
L219 🔴 global_write
Global write: width
Impact: low
Show code
width = ele:GetWidth()
L220 🔴 global_write
Global write: pos
Impact: low
Show code
pos = ele:GetWndPos()
L221 🔴 global_write
Global write: anchorpos
Impact: low
Show code
anchorpos = {}
L225 🔴 global_write
Global write: ratio
Impact: low
Show code
ratio = (device().height / device().width) / (768 / 1024)
L226 🔴 global_write
Global write: xadjust
Impact: low
Show code
xadjust = anchorpos.left
L229 🔴 global_write
Global write: xadjust
Impact: low
Show code
xadjust = p_width - (p_width - (anchor and anchorpos[anchor] or anchorpos.left))*ratio
L231 🔴 global_write
Global write: xadjust
Impact: low
Show code
xadjust = p_center - (p_center - (anchor and anchorpos[anchor] or anchorpos.left))*ratio
L233 🔴 global_write
Global write: xadjust
Impact: low
Show code
xadjust = ratio * (anchor and anchorpos[anchor] or anchorpos.left)

weight.script

L39 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check (auto-fixable)
Impact: low
Show code
actor:set_actor_max_weight(result_weight)
L40 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:set_actor_max_walk_weight(max_walk_weight)

5- Anomaly Radio Extended - DesmanMetzger

1 file (🟢1 🟡0 🔴0 🔵0)

ph_sound.script

L62 🟢 repeated_device
device called 4x in update
Impact: low
Show code
local dev = device()

51- Tougher important NPCs and companions - hexef

1 file (🟢1 🟡2 🔴0 🔵0)

hxf_tough_important_npcs.script

L223 🟢 repeated_shit_draftsman_id()
shit.draftsman:id() called 2x in npc_on_before_hit
Impact: low
Show code
Cache shit.draftsman:id() result
L239 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(id_or_mod)
L240 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
se_obj = se_obj and se_obj.group_id ~= 65535 and sim:object(se_obj.group_id) or nil

52- Perk-Based Artefacts - Demonized

9 files (🟢18 🟡64 🔴39 🔵229)

custom_functor_autoinject.script

L114 🟢 string_len
string.len(pos) -> #pos
Impact: low
Show code
sub_print_r(val,indent..string.rep(" ",string.len(pos)+8))
L115 🟢 string_len
string.len(pos) -> #pos
Impact: low
Show code
printf(indent..string.rep(" ",string.len(pos)+6).."}")
L105 🟢 uncached_globals_summary
Cache 1 globals in sub_print_r
Impact: medium
Show code
L106: tostring L107: tostring
L128 🟢 uncached_globals_summary
Cache 1 globals in print_table
Impact: medium
Show code
L137: type L139: type
L107 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."*"..tostring(t))
L113 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."["..pos.."] => "..tostring(t).." {")
L115 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent..string.rep(" ",string.len(pos)+6).."}")
L117 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."["..pos.."] => "..tostring(val))
L121 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent..tostring(t))
L140 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = function",k)
L143 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s",k,utils_data.vector_to_string(v))
L145 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = userdata", k)
L150 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = true",k)
L152 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = true")
L156 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = false", k)
L158 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = false")
L163 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s", k,v)
L165 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = nil", k,v)
L319 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s, %s", k, v.index)
L322 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s, %s, max custom_functor reached", k, v.index)
L424 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Custom functors, processing queue")
L427 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Custom functors, type %s", v.type)
L464 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("functor slot is not valid, min 1, max 10, your slot: %s", slot)
L479 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("functor slot is not valid min 1, max 10, your slot: %s", slot)
L515 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[" .. k .. "] => ")
L98 🟡 unused_local_variable
Local variable 'table_remove' is assigned but never used
Impact: low
Show code
local table_remove = table.remove

demonized_time_events.script

L24 🟢 uncached_globals_summary
Cache 1 globals in print_table
Impact: medium
Show code
L33: type L35: type
L36 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = function",k)
L39 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s",k,utils_data.vector_to_string(v))
L41 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = userdata", k)
L46 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = true",k)
L48 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = true")
L52 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = false", k)
L54 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = false")
L59 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s", k,v)
L61 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = nil", k,v)
L205 🟡 unused_local_variable
Local variable 'tg_past' is assigned but never used
Impact: low
Show code
local tg_past = 0

perk_based_artefacts.script

L171 🟢 uncached_globals_summary
Cache 1 globals in print_table
Impact: medium
Show code
L180: type L182: type
L775 🟢 repeated_obj_id()
obj:id() called 4x in <global>
Impact: low
Show code
Cache obj:id() result
L775 🟢 repeated_enemy_id()
enemy:id() called 3x in <global>
Impact: low
Show code
Cache enemy:id() result
L918 🟢 repeated_who_id()
who:id() called 4x in <global>
Impact: low
Show code
Cache who:id() result
L2414 🟢 repeated_obj_section()
obj:section() called 6x in <global>
Impact: low
Show code
Cache obj:section() result
L3192 🟢 repeated_get_console
get_console called 6x in <global>
Impact: low
Show code
local console = get_console()
L3788 🟢 repeated_obj_2_section()
obj_2:section() called 5x in <global>
Impact: low
Show code
Cache obj_2:section() result
L3163 🟢 repeated_get_console
get_console called 3x in af_serofim_cheat_death
Impact: low
Show code
local console = get_console()
L4422 🟢 repeated_monster_section()
monster:section() called 2x in monster_on_before_hit
Impact: low
Show code
Cache monster:section() result
L4444 🟢 repeated_monster_section()
monster:section() called 2x in monster_on_hit_callback
Impact: low
Show code
Cache monster:section() result
L4472 🟢 repeated_obj_1_section()
obj_1:section() called 3x in on_item_drag_dropped
Impact: low
Show code
Cache obj_1:section() result
L4472 🟢 repeated_obj_2_section()
obj_2:section() called 3x in on_item_drag_dropped
Impact: low
Show code
Cache obj_2:section() result
L183 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = function",k)
L186 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s",k,utils_data.vector_to_string(v))
L188 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = userdata", k)
L193 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = true",k)
L195 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = true")
L199 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = false", k)
L201 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = false")
L206 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s", k,v)
L208 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = nil", k,v)
L217 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Perk Based Artefacts: " .. str, ...)
L231 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Perk Based Artefacts: Table Print")
L318 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("snd is nil")
L443 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("lucifer exists, %s, %s", af_lucifer:id(), af_lucifer:name())
L479 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("refresh artefacts triggered")
L482 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("artefacts are different, refreshing")
L487 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("artefacts are same")
L512 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("registering callback %s, key %s", callback, key)
L523 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("unregistering callback %s, %s", key, callbacks[key].callback)
L552 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("added cooldown, name %s, time %s, current_time %s", name, time_elapsed + (cooldown or 0), time_elapsed)
L562 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("cooldown not expired yet, name %s, time %s, current_time %s", name, cooldowns[name], time_elapsed)
L584 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("can't add effect, already existing with timer")
L585 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("effect %s, timer %s, remaining_time %s, new timer %s", key, status_effects[key].timer, remaining_time, timer)
L588 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("can't add effect, already existing with bigger timer")
L589 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("effect %s, timer %s, remaining_time %s, new timer %s", key, status_effects[key].timer, remaining_time, timer)
L604 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("added status_effect, key %s, time %s, current_time %s", key, time_elapsed + (timer or 0), time_elapsed)
L617 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("status_effect active, key %s, time %s, current_time %s", key, status_effects[key].timer, time_elapsed)
L633 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("removing status effect, key %s, time %s, current_time %s", key, status_effects[key].timer, time_elapsed)
L653 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("current_time %s, adding effect %s", time_elapsed, time_elapsed + (timer or 0))
L662 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
effect_function = effect_function and dump(effect_function),
L667 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
on_end_function = on_end_function and dump(on_end_function),
L681 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("current_time %s, adding effect %s", time_elapsed, time_elapsed + (timer or 0))
L690 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("effect has on end function %s", effect.on_end)
L702 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("removing effect, key %s", key)
L704 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("removing effect, firing on end, key %s", key)
L717 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("effect %s, timer %s, current_time %s", key, props.timer, time_elapsed)
L719 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("removing effect, effect timer %s, current_time %s", props.timer, time_elapsed)
L784 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Medallion, former companions are dead")
L792 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Medallion, Registering former companions callbacks")
L818 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Teleporting actor")
L912 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Monster %s near Tapeworm, stun", obj:name())
L969 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("time %s, hit %s, last_hit %s", time, s_hit.power, last_hit.power)
L991 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("time %s, hit %s", time, s_hit.power)
L1076 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Claw, not a valid hit type %s", s_hit.type)
L1108 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Overpowered Claw, dice_roll %s, chance %s", self.dice_roll, lucifer_bonus)
L1118 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("gibs not found")
L1126 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Claw not triggered")
L1180 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Lamp, adding stash %s", id)
L1183 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Lamp, no active stashes on a level")
L1196 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Lamp, adding target %s", id)
L1204 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Lamp, no active targets on level")
L1217 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Lamp, creating light")
L1302 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Phantom Star, weapon hidden, hidden_num %s", self.hidden_num)
L1308 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Phantom Star, weapon restroed, hidden_num %s", self.hidden_num)
L1312 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Phantom Star, resetting num, hidden_num %s", self.hidden_num)
L1337 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Dragon's Eye, no current_weapon")
L1343 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Dragon's Eye, no casted weapon")
L1348 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("ammo type %s", ammo_type)
L1352 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Dragon's Eye, no valid ammo type")
L1360 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Dragon Eye not triggered, dice roll %s, chance %s", self.dice_roll, chance)
L1368 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Dragon Eye not triggered, dice roll %s, chance %s", self.dice_roll, chance)
L1373 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Victim's id: %s", npc_id)
L1383 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("explode_obj spawned")
L1387 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("explode obj exploded")
L1395 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("gibs not found")
L1399 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("explode_obj not spawned yet")
L1488 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Spike, Final Damage %s, bonus %s", s_hit.power, self.damage_multiplier)
L1561 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Sandstone, no active item")
L1567 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Sandstone, weapon %s not infused", actor_weapon)
L1578 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Sandstone, effect power %s, hit_type %s", elemental_hit.power, elemental_hit.type)
L1599 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Thistle, npc health %s", npc.health)
L1636 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Cocoon: stack reset")
L1642 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Cocoon, stacks %s, reduction %s", self.protection_stacks, self.protection_bonus[self.protection_stacks])
L1663 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("af_moh remove speed")
L1670 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("af_moh remove effect")
L1677 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("af_moh unregister callback")
L1681 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("af_moh reset")
L1732 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("pseudodog hit %s", hit.telepatic)
L1823 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("snork meat active")
L1875 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Moss, Eating food %s", food_section)
L1881 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("actor satiety %s", satiety)
L2355 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Bat, too many tries to find random artefact, returning same section %s", sec)
L2370 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Bat, upgrade artefact table not found for %s", sec)
L2383 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Bat, upgrade artefact not found for %s", sec)
L2417 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Bat, transforming perk artefact %s", sec)
L2422 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Bat, transforming artefact %s to different kind", sec)
L2425 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Bat, upgrading artefact %s", sec)
L2429 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Bat, resulting artefact %s", new_sec)
L2539 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("lucifer id %s", id)
L2540 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("condition %s", self.condition)
L2546 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("new condition %s", af_lucifer:condition())
L2602 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
_G.printf("p %s, t %s, i %s, d %s, dm %s", s_hit.power, s_hit.type, s_hit.impulse, s_hit.direction, s_hit.draftsman)
L2642 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Dark time penalty, time %s, level %s, health %s, power %s", hours, actor_level, actor.health, actor.power)
L2646 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Sun: Weather not defined")
L2653 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Clear boost, time %s, current_weather %s, health %s, power %s", hours, current_weather, actor.health, actor.power)
L2656 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Partly boost, time %s, current_weather %s, health %s, power %s", hours, current_weather, actor.health, actor.power)
L2659 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Not clear penalty, time %s, current_weather %s, health %s, power %s", hours, current_weather, actor.health, actor.power)
L2669 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Tapeworm not triggered, cooldown active")
L2688 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("firing Will to Live, health %s", health)
L2724 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("firing Signet, health %s", actor.health)
L2763 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("before bleeding %s", actor.bleeding)
L2766 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("after bleeding %s", actor.bleeding)
L2773 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Chain, actor community %s", actor_community)
L2787 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Chain, no companions alive")
L2799 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("found companion %s, community %s, health %s", id, obj_community, heal_companion_min_health)
L2804 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Chain, no companions need healing")
L2808 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Chain, healing companion %s", heal_companion:id())
L2841 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Scar, action not triggered, dice roll %s, chance %s", dice_roll, chance)
L2913 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("sky color %s, %s, %s", mod_R, mod_G, mod_B)
L3030 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Lucifer, time %s, last time %s, degradation %s, cond %s, new_cond %s", time_elapsed, saved_time_elapsed, round_idp(adjust_condition, 8), round_idp(condition, 4), round_idp(_self.condition, 4))
L3092 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Spike, on_weapon_fired weapon_shot %s", af_spaika.weapon_shot)
L3101 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Spike, Creating time event")
L3111 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Sandstone, weapon %s not infused", actor_weapon)
L3127 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Food object not found")
L3138 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
_G.printf("health increased by %s", satiety_increase)
L3146 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Food object not found")
L3234 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("ironman is active, death count %s, new_count %s, limit %s", ironman.death_count, new_ironman_death_count, ironman.death_limit)
L3245 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("unregistering callback")
L3274 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Black Angel, not a valid hit type %s", s_hit.type)
L3288 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Medallion, not a valid hit type %s", s_hit.type)
L3294 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Medallion, perk not triggered, dice_roll %s, chance %s", dice_roll, af_medallion.reflect_chance[artefact_count])
L3302 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Medallion, has non_task_companions")
L3305 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Medallion, has companion_squads")
L3320 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Medallion, doesn't have both companion_squads, non_task_companions")
L3325 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Medallion, no companion found")
L3329 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Medallion, current companion %s", companion.id)
L3336 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Medallion, hitting companion %s, power %s", member:name(), redirect_hit.power)
L3340 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Medallion, squad %s became enemy", squad_id)
L3346 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Medallion, squad companion %s became enemy", k)
L3354 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Medallion, companion became enemy")
L3358 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Medallion, member %s became enemy", member:id())
L3374 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Electron, hit draftsman is actor")
L3379 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Electron, not a valid hit type %s", s_hit.type)
L3413 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Cell, not a valid hit type %s", s_hit.type)
L3422 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Cell: resulted radiation %s", rad_amount)
L3440 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Cocoon, not a valid hit type %s", s_hit.type)
L3451 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Scar, not a valid hit type %s", s_hit.type)
L3461 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Sun, not under Lucifer effect")
L3467 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Sun, not a valid hit type %s", s_hit.type)
L3477 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Sun, Lucifer effect active, hitting with fire coeff %s, damage %s", fire_damage, fire_hit.power)
L3498 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Black Angel not triggered, dice roll %s, chance %s", af_black_angel.dice_roll, af_black_angel.reflect_chance[artefact_count])
L3507 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Black Angel not triggered, not valid hit")
L3516 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("hit %s, last_hit %s", s_hit.power, last_hit.power)
L3523 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Tapeworm not triggered, cooldown active")
L3534 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Tapeworm not triggered, not valid hit")
L3545 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Sandstone, not valid hit type")
L3550 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Sandstone, not Anomaly %s", who:section())
L3556 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Sandstone, no active actor_weapon")
L3615 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Miser's Skull not triggered, bone index %s", last_npc_hit_bone_index)
L3629 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("money spawned")
L3637 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("money not spawned yet")
L3739 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Fountain not fired, selling item")
L3748 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Fountain fired")
L3752 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Actor last money %s, actor current money %s", actor_last_money, money)
L3755 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Fountain not fired, not enough money")
L3760 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Fountain, Money given %s", cashback)
L3788 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Sandstone, target is not weapon, %s", obj_2:section())
L3794 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Sandstone, target is knife or binocs, %s", obj_2:section())
L3800 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Sandstone, target is throwable, %s", obj_2:section())
L3862 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("ironman is active, saving death count %s, death limit %s", ironman.death_count, ironman.death_limit)
L3876 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("stash id %s, freq %s, coords %s %s %s", k, v, pos.x, pos.y, pos.z)
L3994 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("monster dead, physics shell works")
L4028 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("monster not dead yet")
L4071 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("restoring item")
L4081 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("hiding item")
L4223 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("artefact %s", artefact)
L4249 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("actor_on_item_use, item %s", obj:section())
L4284 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("%s is valid for degradation, cond %s, new_cond %s", sec, cond * 100, new_cond * 100)
L4287 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("%s is critical, releasing, cond %s", sec, obj:condition() * 100)
L4325 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("weapon fired %s", wpn:section())
L4332 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("actor_on_before hit, draftsman not defined")
L4336 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("actor_on_before_hit damage type %s", s_hit.type)
L4344 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("actor_on_hit_callback not triggered, who not defined")
L4348 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("actor_on_hit_callback, %s, %s, %s", obj:section(), amount, who:section())
L4354 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("actor_on_before_death triggered")
L4360 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("actor_on_item_buy triggered")
L4366 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("actor_on_item_sell triggered")
L4373 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("npc_on_before hit, draftsman not defined")
L4378 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("npc_on_before_hit not triggered %s, %s", npc:section(), s_hit.draftsman:section())
L4389 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("on_hit_callback not triggered, who not defined")
L4394 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("npc_on_hit_callback not triggered %s, %s, %s", npc:section(), amount, who:section())
L4403 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("on_death_callback not triggered, who not defined")
L4408 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("npc_on_death_callback not triggered %s, %s", npc:section(), who:section())
L4417 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("monster_on_before hit, draftsman not defined")
L4422 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("monster_on_before_hit not triggered %s, %s", monster:section(), s_hit.draftsman:section())
L4427 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("monster_on_before_hit not triggered, monster %s not alive anymore", monster:section())
L4439 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("on_hit_callback not triggered, who not defined")
L4444 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("monster_on_hit_callback not triggered %s, %s, %s", monster:section(), amount, who:section())
L4449 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("monster_on_hit not triggered, monster %s not alive anymore", monster:section())
L4458 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("on_death_callback not triggered, who not defined")
L4463 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("monster_on_death_callback not triggered %s, %s", monster:section(), who:section())
L4472 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("No obj_1 or obj_2 found, o1 %s, o2 %s", obj_1 and obj_1:section(), obj_2 and obj_2:section())
L4490 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("tg_now %s, tg_add %s", tg_now, tg_add)
L4605 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Registering")
L4607 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("tg_on_game_start %s", tg_lag)
L133 🔴 global_write
Global write: hud_state
Impact: low
Show code
hud_state = 1
L382 🔴 global_write
Global write: virtual_artefacts
Impact: low
Show code
virtual_artefacts = {}
L436 🔴 global_write
Global write: iterate_belt
Impact: low
Show code
iterate_belt = function(actor)
L478 🔴 global_write
Global write: refresh_artefacts
Impact: low
Show code
refresh_artefacts = function(force)
L492 🔴 global_write
Global write: refresh_artefacts_time_event_func
Impact: low
Show code
refresh_artefacts_time_event_func = function(force)
L498 🔴 global_write
Global write: callbacks
Impact: low
Show code
callbacks = {}
L550 🔴 global_write
Global write: cooldowns
Impact: low
Show code
cooldowns = {} -- Table of cooldowns of artefacts (["artefact"] = time_elapsed + cooldown)
L570 🔴 global_write
Global write: status_effects
Impact: low
Show code
status_effects = {} -- Table of status effects of artefacts (["artefact"] = time_elapsed + cooldown)
L651 🔴 global_write
Global write: timed_effects
Impact: low
Show code
timed_effects = {}
L728 🔴 global_write
Global write: speed_boosts
Impact: low
Show code
speed_boosts = { -- Table of speed boosts for different artefacts
L755 🔴 global_write
Global write: artefact_props
Impact: low
Show code
artefact_props = { -- Special props of artefacts that are used in processing
L2628 🔴 global_write
Global write: artefact_on_update_functions
Impact: low
Show code
artefact_on_update_functions = {
L3037 🔴 global_write
Global write: artefact_on_weapon_fired_functions
Impact: low
Show code
artefact_on_weapon_fired_functions = {
L3122 🔴 global_write
Global write: artefact_on_item_use_functions
Impact: low
Show code
artefact_on_item_use_functions = {
L3175 🔴 global_write
Global write: artefact_on_before_death_functions
Impact: low
Show code
artefact_on_before_death_functions = {
L3192 🔴 global_write
Global write: hud_state
Impact: low
Show code
hud_state = get_console():get_bool("hud_draw") and 1 or 0
L3268 🔴 global_write
Global write: artefact_on_before_hit_functions
Impact: low
Show code
artefact_on_before_hit_functions = {
L3492 🔴 global_write
Global write: artefact_on_hit_functions
Impact: low
Show code
artefact_on_hit_functions = {
L3569 🔴 global_write
Global write: artefact_on_npc_before_hit_functions
Impact: low
Show code
artefact_on_npc_before_hit_functions = {
L3599 🔴 global_write
Global write: artefact_on_npc_hit_functions
Impact: low
Show code
artefact_on_npc_hit_functions = {
L3609 🔴 global_write
Global write: artefact_on_npc_death_functions
Impact: low
Show code
artefact_on_npc_death_functions = {
L3673 🔴 global_write
Global write: artefact_on_monster_before_hit_functions
Impact: low
Show code
artefact_on_monster_before_hit_functions = {
L3703 🔴 global_write
Global write: artefact_on_monster_hit_functions
Impact: low
Show code
artefact_on_monster_hit_functions = {
L3713 🔴 global_write
Global write: artefact_on_monster_death_functions
Impact: low
Show code
artefact_on_monster_death_functions = {
L3733 🔴 global_write
Global write: artefact_on_trade_functions
Impact: low
Show code
artefact_on_trade_functions = {
L3784 🔴 global_write
Global write: artefact_on_item_drag_dropped_functions
Impact: low
Show code
artefact_on_item_drag_dropped_functions = {
L3829 🔴 global_write
Global write: artefact_on_equip_functions
Impact: low
Show code
artefact_on_equip_functions = {
L3918 🔴 global_write
Global write: bat_transmutate_func
Impact: low
Show code
bat_transmutate_func = {
L3938 🔴 global_write
Global write: lucifer_sacrifice_func
Impact: low
Show code
lucifer_sacrifice_func = {
L4220 🔴 global_write
Global write: process_artefacts
Impact: low
Show code
process_artefacts = function(artefacts_table, ...)
L4267 🔴 global_write
Global write: degradation_valid_artys
Impact: low
Show code
degradation_valid_artys = (function()
L4587 🔴 global_write
Global write: timed_effects
Impact: low
Show code
timed_effects = t
L4588 🔴 global_write
Global write: cooldowns
Impact: low
Show code
cooldowns = m_data.perk_based_artefacts_cooldowns or {}
L4589 🔴 global_write
Global write: status_effects
Impact: low
Show code
status_effects = m_data.perk_based_artefacts_status_effects or {}
L4591 🔴 global_write
Global write: virtual_artefacts
Impact: low
Show code
virtual_artefacts = m_data.perk_based_artefacts_virtual_artefacts or {}
L1110 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check (auto-fixable)
Impact: low
Show code
sim:release(sim:object(monster_id))
L1110 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check (auto-fixable)
Impact: low
Show code
sim:release(sim:object(monster_id))
L1190 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(id)
L1192 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local lvl = sim:level_name(gg:vertex(se_obj.m_game_vertex_id):level_id())
L1385 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check (auto-fixable)
Impact: low
Show code
sim:release(sim:object(npc_id))
L1385 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check (auto-fixable)
Impact: low
Show code
sim:release(sim:object(npc_id))
L2391 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local af_bat = actor:object("af_bat")
L2397 🟡 potential_nil_access
Potential nil access: 'af_bat' from :object() used without nil check
Impact: low
Show code
alife_release_id(af_bat:id())
L2641 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_power(power_not_clear_penalty * artefact_count)
L2651 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_health(health_boost * artefact_count)
L2652 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_power(power_clear_boost * artefact_count)
L2655 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_power(power_partly_boost * artefact_count)
L2658 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_power(power_not_clear_penalty * artefact_count)
L2673 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
iterate_nearest(actor:position(), af_tapeworm.iterate_func_radius, function(obj)
L2687 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_health(health)
L2719 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_health(health_boost)
L2734 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_power(radiation * power_boost * artefact_count)
L2735 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_radiation(radiation_cure * artefact_count)
L2746 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local item = actor:item_in_slot(i)
L2765 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_satiety(satiety_drain)
L2772 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local actor_community = actor:character_community()
L2779 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_health(health_boost)
L2780 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_power(power_boost)
L2814 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_health(health_boost)
L2815 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_power(power_boost)
L2827 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_health(health_boost)
L2884 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_health(health_boost * normal_condition + health_boost * 0.5 * overcharge)
L2885 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_power(power_boost * normal_condition + power_boost * overcharge)
L2892 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_power(power_boost * normal_condition * 0.5)
L2894 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_health(health_boost * normal_condition * 0.27)
L2899 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:set_health_ex(0)
L3109 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local actor_weapon = actor:active_item():name()
L3188 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
if actor:is_talking() then
L3189 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:stop_talk()
L3195 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local actor_weapon = actor:active_item()
L3198 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:drop_item(actor_weapon)
L3221 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:set_health_ex(0.5)
L3384 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local item = actor:item_in_slot(i)
L3389 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:iterate_inventory(function(npc, item)
L3423 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_radiation(rad_amount)
L3478 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:hit(fire_hit)
L3554 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local actor_weapon = actor:active_item()
L3738 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor_last_money = actor:money()
L3751 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local money = actor:money()
L3761 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:give_money(cashback)
L3767 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:give_game_news(news_caption, news_text, news_ico, 0, 7000, 0)
L3770 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor_last_money = actor:money()
L3973 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local pos = actor:position()
L4153 🟡 potential_nil_access
Potential nil access: 'crow' from level.object_by_id() used without nil check
Impact: low
Show code
if (crow and crow.alive and crow:alive() and pos < crow:position().z) then
L4153 🟡 potential_nil_access
Potential nil access: 'crow' from level.object_by_id() used without nil check
Impact: low
Show code
if (crow and crow.alive and crow:alive() and pos < crow:position().z) then
L4173 🟡 potential_nil_access
Potential nil access: 'crow' from level.object_by_id() used without nil check
Impact: low
Show code
if(crow and crow.alive and crow:alive() and distance_2d(pos, crow:position())<25) then
L4173 🟡 potential_nil_access
Potential nil access: 'crow' from level.object_by_id() used without nil check
Impact: low
Show code
if(crow and crow.alive and crow:alive() and distance_2d(pos, crow:position())<25) then
L110 🟡 unused_local_variable
Local variable 'string_gsub' is assigned but never used
Impact: low
Show code
local string_gsub = string.gsub
L1099 🟡 unused_local_variable
Local variable 'monster_direction' is assigned but never used
Impact: low
Show code
local monster_direction = monster:direction()
L1137 🟡 unused_local_variable
Local variable 'meat_item' is assigned but never used
Impact: low
Show code
local meat_item = alife_create_item(monster_meat, {meat_position, monster_level_vertex_id, monster_game_vertex_id, nil})

perk_based_artefacts_item_properties.script

L8 🔴 global_write
Global write: sec
Impact: low
Show code
sec = get_artefact_from_container(sec)

perk_based_artefacts_mcm.script

L1 🔴 global_write
Global write: op
Impact: low
Show code
op = {

weight.script

L43 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check (auto-fixable)
Impact: low
Show code
actor:set_actor_max_weight(result_weight)
L44 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:set_actor_max_walk_weight(max_walk_weight)

zz_item_artefact.script

L26 🟢 repeated_self_object_id()
self.object:id() called 3x in <global>
Impact: low
Show code
Cache self.object:id() result
L52 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("loaded condition for %s "..tonumber(m_data.offline_condition), se_obj:section_name())
L131 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("saved condition for %s "..tonumber(m_data.offline_condition), se_obj:section_name())
L142 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("adding %s, %s to se_obj state", self.id, self:name())
L151 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("clearing object %s, %s from m_data", self.id, self:name())
L195 🔴 global_write
Global write: base_add_bar
Impact: low
Show code
base_add_bar = utils_ui.UICellItem.Add_ProgressBar
L31 🟡 potential_nil_access
Potential nil access: 'artefact' from :get_artefact() used without nil check
Impact: low
Show code
artefact:FollowByPath(bind_anomaly_zone.artefact_ways_by_id[id],bind_anomaly_zone.artefact_points_by_id[id],vector():set(force_xz,force_y,force_xz))
L58 🟡 potential_nil_access
Potential nil access: 'ini' from :spawn_ini() used without nil check
Impact: low
Show code
if not (ini and ini:section_exist("fixed_bone")) then
L4 🟡 unused_local_variable
Local variable 'dgr_tg_step' is assigned but never used
Impact: low
Show code
local dgr_tg_step = 2000 --[ms]
L90 🟡 unused_local_variable
Local variable 'val' is assigned but never used
Impact: low
Show code
local val = 0

zz_item_artefact_mcm.script

L1 🔴 global_write
Global write: op
Impact: low
Show code
op = {

zz_treasure_manager_pba_less_artys.script

L64 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Perk Based Artefacts, removing item %s, section %s", k, v.section)
L8 🟡 unused_local_variable
Local variable 'string_gsub' is assigned but never used
Impact: low
Show code
local string_gsub = string.gsub

53- Companions carry weight tweak - sneaky

1 file (🟢0 🟡1 🔴13 🔵0)

dynamic_companion_carryweight.script

L8 🔴 global_write
Global write: axrbase
Impact: low
Show code
axrbase = axr_companions.is_overweight
L9 🔴 global_write
Global write: ini_death
Impact: low
Show code
ini_death = ini_file_ex("items\\settings\\death_outfits.ltx")
L10 🔴 global_write
Global write: ini_override
Impact: low
Show code
ini_override = ini_file_ex("misc\\story_npc_carryweights.ltx")
L15 🔴 global_write
Global write: flag
Impact: low
Show code
flag, copy_curr_weight, copy_max_weight = axrbase(npc, npc_id, comp_weight)
L15 🔴 global_write
Global write: copy_curr_weight
Impact: low
Show code
flag, copy_curr_weight, copy_max_weight = axrbase(npc, npc_id, comp_weight)
L15 🔴 global_write
Global write: copy_max_weight
Impact: low
Show code
flag, copy_curr_weight, copy_max_weight = axrbase(npc, npc_id, comp_weight)
L57 🔴 global_write
Global write: vis_path_list
Impact: low
Show code
vis_path_list = str_explode(vis, "\\")
L58 🔴 global_write
Global write: vis_name_list
Impact: low
Show code
vis_name_list = vis_path_list and str_explode(vis_path_list[#vis_path_list], "%.")
L93 🔴 global_write
Global write: temp
Impact: low
Show code
temp = ui_inventory.UIInventory.UpdateWeight
L96 🔴 global_write
Global write: npc
Impact: low
Show code
npc = self:GetPartner()
L98 🔴 global_write
Global write: over
Impact: low
Show code
over,cur,snkweight = axr_companions.is_overweight(npc)
L98 🔴 global_write
Global write: cur
Impact: low
Show code
over,cur,snkweight = axr_companions.is_overweight(npc)
L98 🔴 global_write
Global write: snkweight
Impact: low
Show code
over,cur,snkweight = axr_companions.is_overweight(npc)
L135 🟡 unused_local_variable
Local variable 'spawning' is assigned but never used
Impact: low
Show code
local spawning = ini_sys:section_exist(new_sec) and alife_create_item(new_sec, npcx)

54- Lsz AI tweak - IgorNitch

2 files (🟢0 🟡0 🔴3 🔵0)

grok_gotta_go_fast.script

L10 🔴 global_write
Global write: run_coeff
Impact: low
Show code
run_coeff = grok_gotta_go_fast_mcm.get_config("gotta_go_fast_run")
L11 🔴 global_write
Global write: sprint_coeff
Impact: low
Show code
sprint_coeff = grok_gotta_go_fast_mcm.get_config("gotta_go_fast_sprint")

grok_gotta_go_fast_mcm.script

L12 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "gggf",sh=true ,gr={

55- Mutants Bleeding - Arszi

1 file (🟢3 🟡9 🔴3 🔵0)

arszi_mutant_bleeding.script

L90 🟢 repeated_monster_id()
monster:id() called 3x in monster_on_before_hit
Impact: low
Show code
Cache monster:id() result
L111 🟢 repeated_monster_id()
monster:id() called 4x in monster_on_hit_callback
Impact: low
Show code
Cache monster:id() result
L120 🟢 repeated_monster_clsid()
monster:clsid() called 2x in monster_on_hit_callback
Impact: low
Show code
Cache monster:clsid() result
L534 🔴 global_write
Global write: ShowMessage
Impact: low
Show code
ShowMessage = true
L535 🔴 global_write
Global write: ShowMessageInit
Impact: low
Show code
ShowMessageInit = game.get_game_time()
L536 🔴 global_write
Global write: ShowMessageTime
Impact: low
Show code
ShowMessageTime = time
L143 🟡 potential_nil_access
Potential nil access: 'weapon' from level.object_by_id() used without nil check
Impact: low
Show code
local weapon_section = weapon:section()
L144 🟡 potential_nil_access
Potential nil access: 'weapon' from level.object_by_id() used without nil check
Impact: low
Show code
local ammo_type_number = weapon:get_ammo_type()
L300 🟡 potential_nil_access
Potential nil access: 'monster' from level.object_by_id() used without nil check
Impact: low
Show code
if (monster.alive and (not monster:alive())) then
L348 🟡 potential_nil_access
Potential nil access: 'monster' from level.object_by_id() used without nil check
Impact: low
Show code
local pos = monster:position()
L517 🟡 potential_nil_access
Potential nil access: 'monster' from level.object_by_id() used without nil check
Impact: low
Show code
if (monster and animation_table[monster:clsid()]) then
L519 🟡 potential_nil_access
Potential nil access: 'monster' from level.object_by_id() used without nil check
Impact: low
Show code
local animation = animation_table[monster:clsid()]
L523 🟡 potential_nil_access
Potential nil access: 'monster' from level.object_by_id() used without nil check
Impact: low
Show code
monster:set_override_animation(animation)
L9 🟡 unused_local_variable
Local variable 'DEFAULT_BONE_WOUND_SCALE' is assigned but never used
Impact: low
Show code
local DEFAULT_BONE_WOUND_SCALE = 1 --Bone wound scale multiplies the bleeding vector
L506 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = settings:r_line_ex("ammo_tissue_damage_settings",i,"","")

56- Phantoms at low psy health - xcvb

1 file (🟢0 🟡5 🔴0 🔵3)

xcv_phantoms.script

L24 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L277 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("squad_id: [ %s ] sec: [ %s ] || member_id: [ %s ] sec: [ %s ]", squad_id, squad:section_name(), se_member.id, member_sec or "nil")
L280 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ test, squad_id: [ %s ]", squad_id)
L94 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
if obj and obj:section() then
L125 🟡 potential_nil_access
Potential nil access: 'member' from level.object_by_id() used without nil check
Impact: low
Show code
if member and obj:id() == member:id() then
L193 🟡 potential_nil_access
Potential nil access: 'member' from level.object_by_id() used without nil check
Impact: low
Show code
if member and ( (obj:id() == member:id()) or (enemy:id() == member:id()) ) then
L193 🟡 potential_nil_access
Potential nil access: 'member' from level.object_by_id() used without nil check
Impact: low
Show code
if member and ( (obj:id() == member:id()) or (enemy:id() == member:id()) ) then
L275 🟡 potential_nil_access
Potential nil access: 'member' from level.object_by_id() used without nil check
Impact: low
Show code
local member_sec = (member and member:section()) or (se_member and se_member.section_name and se_member:section_name())

58- New Stashes Location - Tweaki_Breeki

1 file (🟢0 🟡0 🔴2 🔵1)

tb_new_stashes.script

L553 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("\n\n----- [%s] New Stashes Created! -----\n\n",#NewStashes)
L14 🔴 global_write
Global write: tb_copy_of_init_settings
Impact: low
Show code
tb_copy_of_init_settings = treasure_manager.init_settings
L32 🔴 global_write
Global write: NewStashes
Impact: low
Show code
NewStashes = {

59- Fixes bugged stashes - Tweaki_Breeki

1 file (🟢0 🟡0 🔴0 🔵7)

TB_Remove_Bugged_Stashes.script

L25 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("- TB_Remove_Bugged_Stashes script has already been run in this game.")
L28 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("\n")
L29 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("- Running TB_Remove_Bugged_Stashes script ...")
L37 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("- Bugged or inaccessible stash name is %s",a_stash:name())
L40 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Giving player: %s",item)
L46 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("# This stash is empty")
L52 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("\n")

6- EFT Aim Rattle - Qudix

2 files (🟢0 🟡1 🔴1 🔵0)

eft_rattle.script

L14 🟡 potential_nil_access
Potential nil access: 'player' from db.actor() used without nil check
Impact: low
Show code
if not (player and player:alive()) then return end

eft_rattle_mcm.script

L2 🔴 global_write
Global write: op
Impact: low
Show code
op = {

60- Stash Overhaul - Grokitach

1 file (🟢4 🟡9 🔴16 🔵8)

treasure_manager.script

L472 🟢 table_insert_append
table.insert(bonus_items, v) -> bonus_items[#bonus_items+1] = v
Impact: high
Show code
table.insert(bonus_items,toolkit)
L158 🟢 uncached_globals_summary
Cache 1 globals in init_settings
Impact: medium
Show code
L190: tonumber L190: tonumber
L434 🟢 uncached_globals_summary
Cache 1 globals in set_random_stash
Impact: medium
Show code
L456: math.random L491: math.random
L592 🟢 uncached_globals_summary
Cache 1 globals in try_spawn_treasure
Impact: medium
Show code
L637: math.random L642: math.random
L562 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str = str .. " - " .. itm
L294 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!WARNING treasure_manager.init_settings | item [%s] is missing info | kind: %s - tier: %s", section, kind, tier)
L337 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR create_random_stash | no server object for id (%s)", id)
L565 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(str)
L705 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("--------- Create Stash: ")
L707 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("----------------------------------------------------------")
L711 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("--------- Items count: ")
L713 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(k .. " := " .. v)
L833 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("- Treasure manager | name (%s) saved for rare stash", (str .. name))
L96 🔴 global_write
Global write: ini_treasure
Impact: low
Show code
ini_treasure = ini_file("items\\settings\\grok_treasure_manager.ltx")
L97 🔴 global_write
Global write: ini_treasure_vanilla
Impact: low
Show code
ini_treasure_vanilla = ini_file_ex("items\\settings\\treasure_manager.ltx",true)
L98 🔴 global_write
Global write: ini_tiers
Impact: low
Show code
ini_tiers = ini_file("items\\settings\\grok_items_tier.ltx")
L102 🔴 global_write
Global write: caches
Impact: low
Show code
caches = {}
L131 🔴 global_write
Global write: stash_bonus
Impact: low
Show code
stash_bonus = {}
L239 🔴 global_write
Global write: section
Impact: low
Show code
junk, section, value = "", "", ""
L241 🔴 global_write
Global write: section
Impact: low
Show code
junk, section, value = ini_treasure:r_line("possible_items" , i , "", "")
L302 🔴 global_write
Global write: section
Impact: low
Show code
junk, section, value = "", "", ""
L304 🔴 global_write
Global write: section
Impact: low
Show code
junk, section, value = ini_treasure:r_line("stash_bonus" , i , "", "")
L321 🔴 global_write
Global write: last_secret
Impact: low
Show code
last_secret = nil
L343 🔴 global_write
Global write: last_secret
Impact: low
Show code
last_secret = nil
L349 🔴 global_write
Global write: last_secret
Impact: low
Show code
last_secret = true
L517 🔴 global_write
Global write: map_tier_vector
Impact: low
Show code
map_tier_vector = map_tiers[lvl] -- Grok's Stash Overhaul
L518 🔴 global_write
Global write: random_tier_from_vector
Impact: low
Show code
random_tier_from_vector = random_key_table(map_tier_vector) -- Grok's Stash Overhaul
L519 🔴 global_write
Global write: lvl_tier
Impact: low
Show code
lvl_tier = map_tier_vector[random_tier_from_vector] -- Grok's Stash Overhaul
L797 🔴 global_write
Global write: caches
Impact: low
Show code
caches = data.treasure_manager.caches or caches
L733 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(i)
L735 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if (IsInvbox(nil,se_obj:clsid())) then
L736 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
local name = se_obj:name()
L742 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local lvl = sim:level_name(gg:vertex(se_obj.m_game_vertex_id):level_id())
L771 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_stash = sim:object(id)
L772 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local lvl = sim:level_name(game_graph():vertex(se_stash.m_game_vertex_id):level_id())
L237 🟡 unused_local_variable
Local variable 'sfind' is assigned but never used
Impact: low
Show code
local sfind = string.find
L322 🟡 unused_local_variable
Local variable 'last_type' is assigned but never used
Impact: low
Show code
local last_type

61- Stash Overhaul TBFix - Grokitach

1 file (🟢0 🟡0 🔴0 🔵6)

TB_Remove_Bugged_Stashes.script

L25 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("- TB_Remove_Bugged_Stashes script has already been run in this game.")
L28 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("\n")
L29 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("- Running TB_Remove_Bugged_Stashes script ...")
L37 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("- Bugged or inaccessible stash name is %s",a_stash:name())
L46 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("# This stash is empty")
L52 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("\n")

62- Stash Overhaul No Loot - Grokitach

1 file (🟢4 🟡9 🔴16 🔵8)

treasure_manager.script

L472 🟢 table_insert_append
table.insert(bonus_items, v) -> bonus_items[#bonus_items+1] = v
Impact: high
Show code
table.insert(bonus_items,toolkit)
L158 🟢 uncached_globals_summary
Cache 1 globals in init_settings
Impact: medium
Show code
L190: tonumber L190: tonumber
L434 🟢 uncached_globals_summary
Cache 1 globals in set_random_stash
Impact: medium
Show code
L456: math.random L491: math.random
L592 🟢 uncached_globals_summary
Cache 1 globals in try_spawn_treasure
Impact: medium
Show code
L637: math.random L642: math.random
L562 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str = str .. " - " .. itm
L294 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!WARNING treasure_manager.init_settings | item [%s] is missing info | kind: %s - tier: %s", section, kind, tier)
L337 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR create_random_stash | no server object for id (%s)", id)
L565 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(str)
L705 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("--------- Create Stash: ")
L707 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("----------------------------------------------------------")
L711 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("--------- Items count: ")
L713 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(k .. " := " .. v)
L833 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("- Treasure manager | name (%s) saved for rare stash", (str .. name))
L96 🔴 global_write
Global write: ini_treasure
Impact: low
Show code
ini_treasure = ini_file("items\\settings\\grok_treasure_manager.ltx")
L97 🔴 global_write
Global write: ini_treasure_vanilla
Impact: low
Show code
ini_treasure_vanilla = ini_file_ex("items\\settings\\treasure_manager.ltx",true)
L98 🔴 global_write
Global write: ini_tiers
Impact: low
Show code
ini_tiers = ini_file("items\\settings\\grok_items_tier.ltx")
L102 🔴 global_write
Global write: caches
Impact: low
Show code
caches = {}
L131 🔴 global_write
Global write: stash_bonus
Impact: low
Show code
stash_bonus = {}
L239 🔴 global_write
Global write: section
Impact: low
Show code
junk, section, value = "", "", ""
L241 🔴 global_write
Global write: section
Impact: low
Show code
junk, section, value = ini_treasure:r_line("possible_items" , i , "", "")
L302 🔴 global_write
Global write: section
Impact: low
Show code
junk, section, value = "", "", ""
L304 🔴 global_write
Global write: section
Impact: low
Show code
junk, section, value = ini_treasure:r_line("stash_bonus" , i , "", "")
L321 🔴 global_write
Global write: last_secret
Impact: low
Show code
last_secret = nil
L343 🔴 global_write
Global write: last_secret
Impact: low
Show code
last_secret = nil
L349 🔴 global_write
Global write: last_secret
Impact: low
Show code
last_secret = true
L517 🔴 global_write
Global write: map_tier_vector
Impact: low
Show code
map_tier_vector = map_tiers[lvl] -- Grok's Stash Overhaul
L518 🔴 global_write
Global write: random_tier_from_vector
Impact: low
Show code
random_tier_from_vector = random_key_table(map_tier_vector) -- Grok's Stash Overhaul
L519 🔴 global_write
Global write: lvl_tier
Impact: low
Show code
lvl_tier = map_tier_vector[random_tier_from_vector] -- Grok's Stash Overhaul
L797 🔴 global_write
Global write: caches
Impact: low
Show code
caches = data.treasure_manager.caches or caches
L733 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(i)
L735 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if (IsInvbox(nil,se_obj:clsid())) then
L736 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
local name = se_obj:name()
L742 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local lvl = sim:level_name(gg:vertex(se_obj.m_game_vertex_id):level_id())
L771 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_stash = sim:object(id)
L772 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local lvl = sim:level_name(game_graph():vertex(se_stash.m_game_vertex_id):level_id())
L237 🟡 unused_local_variable
Local variable 'sfind' is assigned but never used
Impact: low
Show code
local sfind = string.find
L322 🟡 unused_local_variable
Local variable 'last_type' is assigned but never used
Impact: low
Show code
local last_type

65- Fluid Aim - Skieppy

1 file (🟢1 🟡5 🔴0 🔵0)

fluid_aim.script

L50 🟢 repeated_wpn_section()
wpn:section() called 4x in actor_on_update
Impact: low
Show code
Cache wpn:section() result
L50 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
local is_weapon = wpn and (IsWeapon(wpn) or SYS_GetParam(0,wpn:section(),"class") == "WP_BINOC") or false
L52 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
local state = wpn:get_state()
L55 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if (SYS_GetParam(0,wpn:section(),"kind") == "w_melee") then
L65 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
elseif not (SYS_GetParam(0,wpn:section(),"kind") == "w_melee") then
L69 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
local wpn_kind = SYS_GetParam(0,wpn:section(),"kind")

7- EFT Jump and Land SFX - HarukaSai

2 files (🟢0 🟡0 🔴5 🔵0)

eft_jump_sounds.script

L1 🔴 global_write
Global write: available_materials
Impact: low
Show code
available_materials = {"wood", "earth", "dirt", "metal", "water", "tin", "grass", "gravel", "asphalt", "tile", "concrete", "shifer",}
L3 🔴 global_write
Global write: current_available
Impact: low
Show code
current_available = "default"
L12 🔴 global_write
Global write: current_available
Impact: low
Show code
current_available = val -- we do :)
L15 🔴 global_write
Global write: current_available
Impact: low
Show code
current_available = "default" -- darn, we don't :(

eft_jump_sounds_mcm.script

L2 🔴 global_write
Global write: op
Impact: low
Show code
op ={ id= "eft_jump_sounds",sh=true ,gr =

71- Weapons Reanimation and Rebalance - Blindside

2 files (🟢0 🟡2 🔴2 🔵0)

scope_fov_mcm.script

L13 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "scop",sh=true ,gr={

scoping_hud_fov.script

L6 🔴 global_write
Global write: ini_fov
Impact: low
Show code
ini_fov = ini_file_ex("items\\weapon_fov_values.ltx")
L17 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local parent = ini_sys:r_string_ex(weapon:section(),"parent_section")
L19 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
parent = weapon:section()

72- Adjustable Scope View - sneaky

1 file (🟢5 🟡15 🔴2 🔵0)

scope_fov_mcm.script

L63 🟢 repeated_weapon_section()
weapon:section() called 6x in zoom_in
Impact: low
Show code
Cache weapon:section() result
L118 🟢 repeated_weapon_section()
weapon:section() called 2x in on_key_release
Impact: low
Show code
Cache weapon:section() result
L136 🟢 repeated_weapon_section()
weapon:section() called 4x in increase_hud_fov
Impact: low
Show code
Cache weapon:section() result
L151 🟢 repeated_weapon_section()
weapon:section() called 4x in decrease_hud_fov
Impact: low
Show code
Cache weapon:section() result
L166 🟢 repeated_weapon_section()
weapon:section() called 3x in reset_current_weapon
Impact: low
Show code
Cache weapon:section() result
L17 🔴 global_write
Global write: ini_fov
Impact: low
Show code
ini_fov = ini_file_ex("items\\weapon_fov_values.ltx")
L223 🔴 global_write
Global write: op
Impact: low
Show code
op = { id = "scop",sh = true ,gr = {
L63 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local parent = ini_sys:r_string_ex(weapon:section(),"parent_section") or weapon:section()
L63 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local parent = ini_sys:r_string_ex(weapon:section(),"parent_section") or weapon:section()
L64 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local is_pistol = ini_sys:r_string_ex(weapon:section(),"kind") == "w_pistol"
L66 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local two_dim = weapon and ini_sys:r_float_ex(weapon:section(),"scope_status") == 1
L71 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
if weapon and weapon:weapon_in_grenade_mode() then
L136 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local parent = ini_sys:r_string_ex(weapon:section(),"parent_section") or weapon:section()
L136 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local parent = ini_sys:r_string_ex(weapon:section(),"parent_section") or weapon:section()
L137 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local saved_fov = saved_custom[weapon:section()] or temp_fov
L139 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
if weapon:weapon_in_grenade_mode() then
L144 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
saved_custom[weapon:section()] = saved_fov + 0.01
L151 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local parent = ini_sys:r_string_ex(weapon:section(),"parent_section") or weapon:section()
L151 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local parent = ini_sys:r_string_ex(weapon:section(),"parent_section") or weapon:section()
L152 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local saved_fov = saved_custom[weapon:section()] or temp_fov
L154 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
if weapon:weapon_in_grenade_mode() then
L159 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
saved_custom[weapon:section()] = saved_fov - 0.01

76- BAS patch 28-12-21 (2nd 76) - Mich

3 files (🟢0 🟡3 🔴3 🔵2)

bas_trade_inject.script

L76 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("NPC %s has no trade information", npc_name)
L84 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! Trader has no supplies [%s] - [%s]", npc_name, supply_level)
L98 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update
L67 🟡 unused_local_variable
Local variable 'format_table' is assigned but never used
Impact: low
Show code
local format_table = utils_data.print_table

despawn_guns.script

L107 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update

zzz_bas_laser_control.script

L15 🔴 global_write
Global write: CloneWep
Impact: low
Show code
CloneWep = _G.alife_clone_weapon
L31 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
local section = wpn and wpn:section()
L61 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
local section = wpn and wpn:section()

76- Boomsticks and Sharpsticks - Mich

5 files (🟢3 🟡6 🔴3 🔵1)

bas_nvg_scopes.script

L11 🟢 repeated_weapon_section()
weapon:section() called 3x in zoom_in
Impact: low
Show code
Cache weapon:section() result
L11 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
if weapon and SYS_GetParam(0, weapon:section(), "nv_scope_status") == "1" then

bas_trade_inject.script

L81 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! Trader has no supplies [%s] - [%s]", npc_name, supply_level)
L95 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update
L67 🟡 unused_local_variable
Local variable 'format_table' is assigned but never used
Impact: low
Show code
local format_table = utils_data.print_table

item_knife.script

L25 🟡 potential_nil_access
Potential nil access: 'obj' from :active_item() used without nil check
Impact: low
Show code
local sec = obj:section()
L36 🟡 potential_nil_access
Potential nil access: 'obj' from :active_item() used without nil check (auto-fixable)
Impact: low
Show code
return obj:condition()

trader_autoinject.script

L34 🟢 repeated_npc_id()
npc:id() called 3x in trade_manager.update
Impact: low
Show code
Cache npc:id() result
L151 🟢 repeated_item_section()
item:section() called 4x in itr_inv
Impact: low
Show code
Cache item:section() result
L16 🔴 global_write
Global write: find
Impact: low
Show code
find = string.find
L32 🔴 global_write
Global write: TraderUpdate
Impact: low
Show code
TraderUpdate = trade_manager.update

zzz_bas_laser_control.script

L19 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
local section = wpn and wpn:section()
L46 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
local section = wpn and wpn:section()

86- G36Pack - Strogglet15

2 files (🟢4 🟡0 🔴3 🔵0)

g36pack_traderinject.script

L57 🟢 uncached_globals_summary
Cache 2 globals in spawn_g36pack
Impact: medium
Show code
L63: string.find L63: string.find L67: math.random L74: math.random
L63 🟢 repeated_npc_section()
npc:section() called 8x in spawn_g36pack
Impact: low
Show code
Cache npc:section() result
L102 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update

trader_autoinject.script

L34 🟢 repeated_npc_id()
npc:id() called 3x in trade_manager.update
Impact: low
Show code
Cache npc:id() result
L150 🟢 repeated_item_section()
item:section() called 4x in itr_inv
Impact: low
Show code
Cache item:section() result
L16 🔴 global_write
Global write: find
Impact: low
Show code
find = string.find
L32 🔴 global_write
Global write: TraderUpdate
Impact: low
Show code
TraderUpdate = trade_manager.update

87- G36Pack patch - Strogglet15

2 files (🟢4 🟡0 🔴3 🔵0)

g36pack_traderinject.script

L57 🟢 uncached_globals_summary
Cache 2 globals in spawn_g36pack
Impact: medium
Show code
L63: string.find L63: string.find L67: math.random L74: math.random
L63 🟢 repeated_npc_section()
npc:section() called 8x in spawn_g36pack
Impact: low
Show code
Cache npc:section() result
L102 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update

trader_autoinject.script

L34 🟢 repeated_npc_id()
npc:id() called 3x in trade_manager.update
Impact: low
Show code
Cache npc:id() result
L150 🟢 repeated_item_section()
item:section() called 4x in itr_inv
Impact: low
Show code
Cache item:section() result
L16 🔴 global_write
Global write: find
Impact: low
Show code
find = string.find
L32 🔴 global_write
Global write: TraderUpdate
Impact: low
Show code
TraderUpdate = trade_manager.update

9- Exo Servomotor Sounds - HarukaSai

3 files (🟢1 🟡5 🔴3 🔵1)

exo_servo_sounds.script

L2 🔴 global_write
Global write: exo_flag
Impact: low
Show code
exo_flag = false
L24 🔴 global_write
Global write: exo_flag
Impact: low
Show code
exo_flag = outfit and SYS_GetParam(0, outfit:section(), "repair_type") == "outfit_exo" -- and item_exo_device.is_psu(backpack)
L22 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local outfit = actor:item_in_slot(7)
L24 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
exo_flag = outfit and SYS_GetParam(0, outfit:section(), "repair_type") == "outfit_exo" -- and item_exo_device.is_psu(backpack)
L26 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local weight = SYS_GetParam(0, outfit:section(), "inv_weight")
L32 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local backpack = actor:item_in_slot(13)

exo_servo_sounds_mcm.script

L2 🔴 global_write
Global write: op
Impact: low
Show code
op ={ id= "exo_servo_sounds", sh=true ,gr =

z_npc_footsteps.script

L7 🟢 repeated_self_object_id()
self.object:id() called 8x in <global>
Impact: low
Show code
Cache self.object:id() result
L60 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("npc %s has invalid spawning vertex, correcting",se_obj:name())
L51 🟡 potential_nil_access
Potential nil access: 'ini' from :spawn_ini() used without nil check
Impact: low
Show code
local filename = ini and ini:r_string_ex("logic","cfg")

92- Vityaz Replacer - Blackgrowl

8 files (🟢6 🟡17 🔴27 🔵7)

aaa_rax_icon_override_mcm.script

L728 🟢 uncached_globals_summary
Cache 1 globals in Refresh
Impact: medium
Show code
L757: math.ceil L758: math.ceil
L22 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( "RAX: | %s | "..text ,time_global(), ...)
L367 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR utils_xml.set_icon | XML_box or XML_temp doesn't exist")
L375 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR utils_xml.set_icon | section [%s] doesn't exist in system ini", sec)
L18 🔴 global_write
Global write: icon_override
Impact: low
Show code
icon_override = ini_file_ex("icon_override\\icon_override.ltx")
L540 🔴 global_write
Global write: axis
Impact: low
Show code
axis = utils_xml.get_item_axis(a_sec,1)
L555 🔴 global_write
Global write: axis
Impact: low
Show code
axis = utils_xml.get_item_axis(b_sec,1)
L21 🟢 dead_code_if_false
Dead code: if false (lines 21-23)
Impact: low
Show code
if false then
L358 🟡 unused_local_variable
Local variable 'rw' is assigned but never used
Impact: low
Show code
local ico_size, rw, rh, _le = 0.7,1,1,50
L358 🟡 unused_local_variable
Local variable 'rh' is assigned but never used
Impact: low
Show code
local ico_size, rw, rh, _le = 0.7,1,1,50
L54 🟡 unused_local_variable
Local variable 'clr_list_hl' is assigned but never used
Impact: low
Show code
local clr_list_hl = {
L525 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, kind, order = ini_sys:r_line_ex("item_kind_order",i,"","")

animation_common.script

L31 🟢 table_insert_append
table.insert(anim_mutators, v) -> anim_mutators[#anim_mutators+1] = v
Impact: high
Show code
table.insert(anim_mutators, {functor=functor, priority=priority})
L86 🟢 repeated_item_section()
item:section() called 3x in actor_on_hud_animation_play
Impact: low
Show code
Cache item:section() result

aol_anim_transitions.script

L6 🟢 table_insert_append
table.insert(valid_anims, v) -> valid_anims[#valid_anims+1] = v
Impact: high
Show code
table.insert(valid_anims, anm_suffix)
L37 🟢 table_insert_append
table.insert(pattern_transitions[hud_section], v) -> pattern_transitions[hud_section][#pattern_transitions[hud_section]+1] = v
Impact: high
Show code
table.insert(pattern_transitions[hud_section], {
L99 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L128 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L15 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L32 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L3 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L10 🔴 global_write
Global write: transitions
Impact: low
Show code
transitions = {
L26 🔴 global_write
Global write: pattern_transitions
Impact: low
Show code
pattern_transitions = {
L162 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L51 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_items:r_line_ex(section,i,"","")

aol_sprint_cancel.script

L16 🔴 global_write
Global write: aol_anim_transitions_anm_transitions
Impact: low
Show code
aol_anim_transitions_anm_transitions = aol_anim_transitions.anm_transitions

jam_animations.script

L25 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
local hudSection = SYS_GetParam(0, item:section(), "hud", item:section())
L25 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
local hudSection = SYS_GetParam(0, item:section(), "hud", item:section())
L30 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
local ammo = item:get_ammo_in_magazine()
L42 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
item:play_hud_motion(animName, true, 4, 1, 0)

shotgun_unjam_fix.script

L1 🔴 global_write
Global write: common
Impact: low
Show code
common = animation_common

uni_anim_detectors.script

L5 🔴 global_write
Global write: playing_fdda_anim
Impact: low
Show code
playing_fdda_anim = false
L7 🔴 global_write
Global write: fdda_anim_prepare
Impact: low
Show code
fdda_anim_prepare = enhanced_animations.anim_prepare
L9 🔴 global_write
Global write: playing_fdda_anim
Impact: low
Show code
playing_fdda_anim = true
L13 🔴 global_write
Global write: fdda_call_my_slot_back
Impact: low
Show code
fdda_call_my_slot_back = enhanced_animations.call_my_slot_back
L17 🔴 global_write
Global write: playing_fdda_anim
Impact: low
Show code
playing_fdda_anim = false
L22 🔴 global_write
Global write: fdda_bp_call_my_slot_back
Impact: low
Show code
fdda_bp_call_my_slot_back = zzz_ea_addon_backpack.call_my_slot_back
L26 🔴 global_write
Global write: playing_fdda_anim
Impact: low
Show code
playing_fdda_anim = false
L67 🟡 potential_nil_access
Potential nil access: 'player_wpn' from :active_item() used without nil check
Impact: low
Show code
player_wpn and is_state_valid[player_wpn:get_state()]

utjan_mag_check.script

L15 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!Old mag check script (ammo_check_mcm) detected. Remove it to get full features of mag checks")
L107 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!Old mag check script (ammo_check_mcm) detected. Remove it to get full features of mag checks")
L3 🔴 global_write
Global write: do_ammo_check_anim
Impact: low
Show code
do_ammo_check_anim = nil
L4 🔴 global_write
Global write: wpn_checking
Impact: low
Show code
wpn_checking, det_active = nil
L4 🔴 global_write
Global write: det_active
Impact: low
Show code
wpn_checking, det_active = nil
L7 🔴 global_write
Global write: base_check_Ammo
Impact: low
Show code
base_check_Ammo = ammo_check_mcm.check_Ammo
L63 🔴 global_write
Global write: do_ammo_check_anim
Impact: low
Show code
do_ammo_check_anim = 1
L65 🔴 global_write
Global write: det_active
Impact: low
Show code
det_active = db.actor:active_detector() or nil
L80 🔴 global_write
Global write: wpn_checking
Impact: low
Show code
wpn_checking = nil
L81 🔴 global_write
Global write: do_ammo_check_anim
Impact: low
Show code
do_ammo_check_anim = nil
L86 🔴 global_write
Global write: det_active
Impact: low
Show code
det_active = nil
L90 🔴 global_write
Global write: wpn_checking
Impact: low
Show code
wpn_checking = obj
L102 🔴 global_write
Global write: do_ammo_check_anim
Impact: low
Show code
do_ammo_check_anim = 2
L28 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local currentState = weapon:get_state()
L29 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
if not (currentState == 0 or weapon:weapon_in_grenade_mode()) then
L35 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local currentAmmo = weapon:get_ammo_in_magazine()
L41 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local anm_ammo_check = common.has_animation(weapon:section(), "anm_ammo_check")
L64 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
weapon:switch_state(4)

92- Vityaz Replacer Remake - Blackgrowl

7 files (🟢4 🟡14 🔴31 🔵4)

animation_common.script

L31 🟢 table_insert_append
table.insert(anim_mutators, v) -> anim_mutators[#anim_mutators+1] = v
Impact: high
Show code
table.insert(anim_mutators, {functor=functor, priority=priority})
L88 🟢 repeated_item_section()
item:section() called 3x in actor_on_hud_animation_play
Impact: low
Show code
Cache item:section() result

aol_anim_transitions.script

L6 🟢 table_insert_append
table.insert(valid_anims, v) -> valid_anims[#valid_anims+1] = v
Impact: high
Show code
table.insert(valid_anims, anm_suffix)
L37 🟢 table_insert_append
table.insert(pattern_transitions[hud_section], v) -> pattern_transitions[hud_section][#pattern_transitions[hud_section]+1] = v
Impact: high
Show code
table.insert(pattern_transitions[hud_section], {
L99 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L128 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L15 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L32 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L3 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L10 🔴 global_write
Global write: transitions
Impact: low
Show code
transitions = {
L26 🔴 global_write
Global write: pattern_transitions
Impact: low
Show code
pattern_transitions = {
L162 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L51 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_items:r_line_ex(section,i,"","")

aol_sprint_cancel.script

L16 🔴 global_write
Global write: aol_anim_transitions_anm_transitions
Impact: low
Show code
aol_anim_transitions_anm_transitions = aol_anim_transitions.anm_transitions

jam_animations.script

L25 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
local hudSection = SYS_GetParam(0, item:section(), "hud", item:section())
L25 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
local hudSection = SYS_GetParam(0, item:section(), "hud", item:section())
L30 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
local ammo = item:get_ammo_in_magazine()
L42 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
item:play_hud_motion(animName, true, 4, 1, 0)

shotgun_unjam_fix.script

L1 🔴 global_write
Global write: common
Impact: low
Show code
common = animation_common

uni_anim_detectors.script

L14 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = false
L18 🔴 global_write
Global write: fdda_anim_prepare
Impact: low
Show code
fdda_anim_prepare = enhanced_animations.anim_prepare
L20 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L24 🔴 global_write
Global write: fdda_call_my_slot_back
Impact: low
Show code
fdda_call_my_slot_back = enhanced_animations.call_my_slot_back
L28 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = false
L33 🔴 global_write
Global write: fdda_bp_call_my_slot_back
Impact: low
Show code
fdda_bp_call_my_slot_back = zzz_ea_addon_backpack.call_my_slot_back
L37 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = false
L50 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L63 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L71 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L85 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L98 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L113 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L167 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = false
L122 🟡 potential_nil_access
Potential nil access: 'player_detector' from :active_detector() used without nil check
Impact: low
Show code
if player_detector and item:id() == player_detector:id() then
L160 🟡 potential_nil_access
Potential nil access: 'player_wpn' from :active_item() used without nil check
Impact: low
Show code
player_wpn and is_state_valid[player_wpn:get_state()]

utjan_mag_check.script

L15 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!Old mag check script (ammo_check_mcm) detected. Remove it to get full features of mag checks")
L107 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!Old mag check script (ammo_check_mcm) detected. Remove it to get full features of mag checks")
L3 🔴 global_write
Global write: do_ammo_check_anim
Impact: low
Show code
do_ammo_check_anim = nil
L4 🔴 global_write
Global write: wpn_checking
Impact: low
Show code
wpn_checking, det_active = nil
L4 🔴 global_write
Global write: det_active
Impact: low
Show code
wpn_checking, det_active = nil
L7 🔴 global_write
Global write: base_check_Ammo
Impact: low
Show code
base_check_Ammo = ammo_check_mcm.check_Ammo
L63 🔴 global_write
Global write: do_ammo_check_anim
Impact: low
Show code
do_ammo_check_anim = 1
L65 🔴 global_write
Global write: det_active
Impact: low
Show code
det_active = db.actor:active_detector() or nil
L80 🔴 global_write
Global write: wpn_checking
Impact: low
Show code
wpn_checking = nil
L81 🔴 global_write
Global write: do_ammo_check_anim
Impact: low
Show code
do_ammo_check_anim = nil
L86 🔴 global_write
Global write: det_active
Impact: low
Show code
det_active = nil
L90 🔴 global_write
Global write: wpn_checking
Impact: low
Show code
wpn_checking = obj
L102 🔴 global_write
Global write: do_ammo_check_anim
Impact: low
Show code
do_ammo_check_anim = 2
L28 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local currentState = weapon:get_state()
L29 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
if not (currentState == 0 or weapon:weapon_in_grenade_mode()) then
L35 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local currentAmmo = weapon:get_ammo_in_magazine()
L41 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local anm_ammo_check = common.has_animation(weapon:section(), "anm_ammo_check")
L64 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
weapon:switch_state(4)

93- Fire Mode Switcher - TheVoidPancake

2 files (🟢2 🟡2 🔴2 🔵0)

void_fmode_sound.script

L113 🟢 table_getn
table.getn(fire_modes) -> #fire_modes
Impact: low
Show code
if fire_modes and table.getn(fire_modes) > 1 then
L123 🟢 table_getn
table.getn(upgr_fire_modes) -> #upgr_fire_modes
Impact: low
Show code
if upgr_fire_modes and table.getn(upgr_fire_modes) > 1 then
L109 🔴 global_write
Global write: section
Impact: low
Show code
section = wpn:section()
L83 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if has_own_switch_animation(wpn:section()) then
L91 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
local fire_mode = wpn:cast_Weapon():GetFireMode()

void_fmode_sound_mcm.script

L3 🔴 global_write
Global write: op
Impact: low
Show code
op = {

94- Tacticool scopes - jaymorrow

10 files (🟢4 🟡7 🔴7 🔵6)

ATS_dynamic_zoom_sound.script

L65 🟡 potential_nil_access
Potential nil access: 'active_item' from :active_item() used without nil check
Impact: low
Show code
is_wpn = IsWeapon(active_item) and not (SYS_GetParam(0,active_item:section(),"class") == "WP_KNIFE")

ATS_illum_mcm.script

L2 🔴 global_write
Global write: op
Impact: low
Show code
op = { id = "ATS_illum", sh = true, gr =

bas_nvg_scopes.script

L11 🟢 repeated_weapon_section()
weapon:section() called 3x in zoom_in
Impact: low
Show code
Cache weapon:section() result
L11 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
if weapon and SYS_GetParam(0, weapon:section(), "nv_scope_status") == "1" then

bas_trade_inject.script

L76 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("NPC %s has no trade information", npc_name)
L84 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! Trader has no supplies [%s] - [%s]", npc_name, supply_level)
L98 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update
L67 🟡 unused_local_variable
Local variable 'format_table' is assigned but never used
Impact: low
Show code
local format_table = utils_data.print_table

item_knife.script

L25 🟡 potential_nil_access
Potential nil access: 'obj' from :active_item() used without nil check
Impact: low
Show code
local sec = obj:section()
L36 🟡 potential_nil_access
Potential nil access: 'obj' from :active_item() used without nil check (auto-fixable)
Impact: low
Show code
return obj:condition()

modxml_ats.script

L9 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("DXML is patching scopes in %s", xml_file_name)
L20 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("DXML is patching scopes in %s", xml_file_name)
L31 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("DXML is patching scopes in %s", xml_file_name)
L41 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("DXML is patching scopes in %s", xml_file_name)

scopeRadii.script

L4 🔴 global_write
Global write: scopeRadii
Impact: low
Show code
scopeRadii = {

toggle_scope_texture.script

L52 🟢 table_insert_append
table.insert(replacementTable, v) -> replacementTable[#replacementTable+1] = v
Impact: high
Show code
table.insert(replacementTable, texture)
L3 🔴 global_write
Global write: scope_texture_table
Impact: low
Show code
scope_texture_table = {}

trader_autoinject.script

L34 🟢 repeated_npc_id()
npc:id() called 3x in trade_manager.update
Impact: low
Show code
Cache npc:id() result
L151 🟢 repeated_item_section()
item:section() called 4x in itr_inv
Impact: low
Show code
Cache item:section() result
L16 🔴 global_write
Global write: find
Impact: low
Show code
find = string.find
L32 🔴 global_write
Global write: TraderUpdate
Impact: low
Show code
TraderUpdate = trade_manager.update

zzz_bas_laser_control.script

L15 🔴 global_write
Global write: CloneWep
Impact: low
Show code
CloneWep = _G.alife_clone_weapon
L31 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
local section = wpn and wpn:section()
L61 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
local section = wpn and wpn:section()

95- Doom-like weapon inspection - Grokitach

1 file (🟢0 🟡3 🔴23 🔵0)

grok_doom_weapons_inspect.script

L2 🔴 global_write
Global write: inspected_weapons
Impact: low
Show code
inspected_weapons = {}
L3 🔴 global_write
Global write: music
Impact: low
Show code
music = sound_object('grok\\grok_doom_inspect')
L13 🔴 global_write
Global write: flag_weapon_id
Impact: low
Show code
flag_weapon_id = obj:id()
L15 🔴 global_write
Global write: launch_timer
Impact: low
Show code
launch_timer = 1
L22 🔴 global_write
Global write: current_wpn
Impact: low
Show code
current_wpn = db.actor:active_item()
L24 🔴 global_write
Global write: current_wpn_id
Impact: low
Show code
current_wpn_id = current_wpn:id()
L25 🔴 global_write
Global write: current_wpn_sec
Impact: low
Show code
current_wpn_sec = current_wpn:section()
L28 🔴 global_write
Global write: tg
Impact: low
Show code
tg = time_global()
L29 🔴 global_write
Global write: delay
Impact: low
Show code
delay = tg + 800
L30 🔴 global_write
Global write: launch_timer
Impact: low
Show code
launch_timer = 0
L36 🔴 global_write
Global write: lang
Impact: low
Show code
lang = "_eng"
L38 🔴 global_write
Global write: lang
Impact: low
Show code
lang = ""
L48 🔴 global_write
Global write: block_repeat
Impact: low
Show code
block_repeat = false
L50 🔴 global_write
Global write: flag_weapon_id
Impact: low
Show code
flag_weapon_id = nil
L63 🔴 global_write
Global write: inspected_weapons
Impact: low
Show code
inspected_weapons = m_data.inspected_weapons
L66 🔴 global_write
Global write: inspected_weapons
Impact: low
Show code
inspected_weapons = {}
L69 🔴 global_write
Global write: nrows
Impact: low
Show code
nrows = 0
L71 🔴 global_write
Global write: nrows
Impact: low
Show code
nrows = nrows + 1
L74 🔴 global_write
Global write: inspected_weapons
Impact: low
Show code
inspected_weapons = {}
L81 🔴 global_write
Global write: block_repeat
Impact: low
Show code
block_repeat = true
L84 🔴 global_write
Global write: snd
Impact: low
Show code
snd = sound_object(sound)
L86 🔴 global_write
Global write: voice
Impact: low
Show code
voice = sound_object("grok\\actor_" .. math.random(1,11) .. "" .. lang)
L94 🔴 global_write
Global write: block_repeat
Impact: low
Show code
block_repeat = false
L24 🟡 potential_nil_access
Potential nil access: 'current_wpn' from :active_item() used without nil check
Impact: low
Show code
current_wpn_id = current_wpn:id()
L25 🟡 potential_nil_access
Potential nil access: 'current_wpn' from :active_item() used without nil check
Impact: low
Show code
current_wpn_sec = current_wpn:section()
L40 🟡 potential_nil_access
Potential nil access: 'current_wpn' from :active_item() used without nil check
Impact: low
Show code
local idle_section = utils_item.addon_attached(current_wpn ,"gl") and (current_wpn:weapon_in_grenade_mode() and "anm_bore_g" or "anm_bore_w_gl") or "anm_bore"

ATHI's Mags Redux Mod Madness 19.1.2025+

3 files (🟢5 🟡21 🔴63 🔵1)

actor_stash_patch.script

L14 🟢 table_insert_append
table.insert(conditions, v) -> conditions[#conditions+1] = v
Impact: high
Show code
table.insert(conditions, f)
L6 🟢 repeated_item_section()
item:section() called 4x in <global>
Impact: low
Show code
Cache item:section() result
L34 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local se_obj = alife_create("inv_backpack",actor:position(),actor:level_vertex_id(),actor:game_vertex_id())
L34 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local se_obj = alife_create("inv_backpack",actor:position(),actor:level_vertex_id(),actor:game_vertex_id())
L34 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local se_obj = alife_create("inv_backpack",actor:position(),actor:level_vertex_id(),actor:game_vertex_id())

magazines_loot.script

L175 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!!! FRAUD DETECTED !!! Item %s should not have mag data!", sec)
L4 🔴 global_write
Global write: gc
Impact: low
Show code
gc = game.translate_string
L5 🔴 global_write
Global write: get_data
Impact: low
Show code
get_data = magazine_binder.get_data
L6 🔴 global_write
Global write: set_data
Impact: low
Show code
set_data = magazine_binder.set_data
L7 🔴 global_write
Global write: get_mag_loaded
Impact: low
Show code
get_mag_loaded = magazine_binder.get_mag_loaded
L8 🔴 global_write
Global write: prep_weapon
Impact: low
Show code
prep_weapon = magazines.prep_weapon
L9 🔴 global_write
Global write: is_supported_weapon
Impact: low
Show code
is_supported_weapon = magazine_binder.is_supported_weapon
L10 🔴 global_write
Global write: get_magazine_caliber
Impact: low
Show code
get_magazine_caliber = magazine_binder.get_magazine_caliber
L11 🔴 global_write
Global write: is_magazine
Impact: low
Show code
is_magazine = magazine_binder.is_magazine
L12 🔴 global_write
Global write: weapon_default_magazine
Impact: low
Show code
weapon_default_magazine = magazine_binder.weapon_default_magazine
L13 🔴 global_write
Global write: weapon_improved_magazine
Impact: low
Show code
weapon_improved_magazine = magazine_binder.weapon_improved_magazine
L14 🔴 global_write
Global write: create_mag_data
Impact: low
Show code
create_mag_data = magazine_binder.create_mag_data
L15 🔴 global_write
Global write: print_dbg
Impact: low
Show code
print_dbg = magazines.print_dbg
L16 🔴 global_write
Global write: get_weapon_base_type
Impact: low
Show code
get_weapon_base_type = magazine_binder.get_weapon_base_type
L17 🔴 global_write
Global write: get_mags_for_basetype
Impact: low
Show code
get_mags_for_basetype = magazine_binder.get_mags_for_basetype
L18 🔴 global_write
Global write: valid_mag_data
Impact: low
Show code
valid_mag_data = magazine_binder.valid_mag_data
L19 🔴 global_write
Global write: get_config
Impact: low
Show code
get_config = magazines_mcm.get_config
L20 🔴 global_write
Global write: validate_mag
Impact: low
Show code
validate_mag = magazine_binder.validate_mag
L21 🔴 global_write
Global write: validate_wep
Impact: low
Show code
validate_wep = magazine_binder.validate_wep
L112 🔴 global_write
Global write: SetWepCondition
Impact: low
Show code
SetWepCondition = death_manager.set_weapon_drop_condition
L25 🟡 unused_local_variable
Local variable 'string_format' is assigned but never used
Impact: low
Show code
local string_format = string.format
L29 🟡 unused_local_variable
Local variable 'mag_timer_global' is assigned but never used
Impact: low
Show code
local mag_timer_global = nil
L30 🟡 unused_local_variable
Local variable 'tm' is assigned but never used
Impact: low
Show code
local tm = {}

mags_patches.script

L206 🟢 repeated_obj_id()
obj:id() called 3x in ui_item.build_desc_header
Impact: low
Show code
Cache obj:id() result
L747 🟢 repeated_wpn_id()
wpn:id() called 4x in SwitchNextAmmo
Impact: low
Show code
Cache wpn:id() result
L782 🟢 repeated_wpn_id()
wpn:id() called 4x in OnAmmo
Impact: low
Show code
Cache wpn:id() result
L227 🟡 string_concat_in_loop
String concat in loop: _str = _str .. x
Impact: critical
Show code
_str = _str .. clr_p .. gc("st_dot") .. " ".. clr_1 .. gc("st_mag_"..k) .. " " .. utils_xml.get_color_con(color_ratio) .. v .. "/" .. total ..(total > outfit_slots[k] and string.format(gc("st_mag_bonus"),outfit_slots[k],total - outfit_slots[k] ) or "") .. "\\n"
L233 🟡 string_concat_in_loop
String concat in loop: _str = _str .. x
Impact: critical
Show code
_str = _str .. clr_p .. gc("st_dot") .. " ".. clr_1 .. gc("st_mag_"..k)..slots.. "\\n"
L299 🟡 string_concat_in_loop
String concat in loop: _str = _str .. x
Impact: critical
Show code
_str = _str .. "\\n " .. gc("st_dot").." ".. collected[#collected - i + 1]
L3 🔴 global_write
Global write: gc
Impact: low
Show code
gc = game.translate_string
L4 🔴 global_write
Global write: get_data
Impact: low
Show code
get_data = magazine_binder.get_data
L5 🔴 global_write
Global write: set_data
Impact: low
Show code
set_data = magazine_binder.set_data
L6 🔴 global_write
Global write: dump_data
Impact: low
Show code
dump_data = magazine_binder.dump_data
L7 🔴 global_write
Global write: is_supported_weapon
Impact: low
Show code
is_supported_weapon = magazine_binder.is_supported_weapon
L8 🔴 global_write
Global write: get_magazine_caliber
Impact: low
Show code
get_magazine_caliber = magazine_binder.get_magazine_caliber
L9 🔴 global_write
Global write: is_compatible
Impact: low
Show code
is_compatible = magazine_binder.is_compatible
L10 🔴 global_write
Global write: is_magazine
Impact: low
Show code
is_magazine = magazine_binder.is_magazine
L11 🔴 global_write
Global write: get_weapon_base_type
Impact: low
Show code
get_weapon_base_type = magazine_binder.get_weapon_base_type
L12 🔴 global_write
Global write: is_carried_mag
Impact: low
Show code
is_carried_mag = magazine_binder.is_carried_mag
L13 🔴 global_write
Global write: toggle_carried_mag
Impact: low
Show code
toggle_carried_mag = magazine_binder.toggle_carried_mag
L14 🔴 global_write
Global write: room_in_pouch
Impact: low
Show code
room_in_pouch = magazine_binder.room_in_pouch
L15 🔴 global_write
Global write: eject
Impact: low
Show code
eject = magazines.eject_magazine
L16 🔴 global_write
Global write: get_total_carried
Impact: low
Show code
get_total_carried = magazine_binder.get_total_carried
L17 🔴 global_write
Global write: get_loadout_size
Impact: low
Show code
get_loadout_size = magazine_binder.get_loadout_size
L18 🔴 global_write
Global write: weapon_default_magazine
Impact: low
Show code
weapon_default_magazine = magazine_binder.weapon_default_magazine
L19 🔴 global_write
Global write: get_mag_loaded
Impact: low
Show code
get_mag_loaded = magazine_binder.get_mag_loaded
L20 🔴 global_write
Global write: print_dbg
Impact: low
Show code
print_dbg = magazines.print_dbg
L21 🔴 global_write
Global write: has_loadout_slots
Impact: low
Show code
has_loadout_slots = magazine_binder.has_loadout_slots
L22 🔴 global_write
Global write: get_loadout_slots
Impact: low
Show code
get_loadout_slots = magazine_binder.get_loadout_slots
L23 🔴 global_write
Global write: create_mag_data
Impact: low
Show code
create_mag_data = magazine_binder.create_mag_data
L24 🔴 global_write
Global write: validate_mag
Impact: low
Show code
validate_mag = magazine_binder.validate_mag
L25 🔴 global_write
Global write: validate_wep
Impact: low
Show code
validate_wep = magazine_binder.validate_wep
L26 🔴 global_write
Global write: create_time_event
Impact: low
Show code
create_time_event = magazines.create_time_event
L27 🔴 global_write
Global write: get_sec_chambered
Impact: low
Show code
get_sec_chambered = magazines.get_sec_chambered
L28 🔴 global_write
Global write: get_config
Impact: low
Show code
get_config = magazines_mcm.get_config
L42 🔴 global_write
Global write: mousebase
Impact: low
Show code
mousebase = utils_ui.UICellContainer.On_Mouse1
L84 🔴 global_write
Global write: DisassemblyWeapon
Impact: low
Show code
DisassemblyWeapon = item_parts.disassembly_weapon
L100 🔴 global_write
Global write: WorkshopUpgrade
Impact: low
Show code
WorkshopUpgrade = ui_workshop.UIWorkshopUpgrade.Upgrade
L122 🔴 global_write
Global write: WorkshopRepair
Impact: low
Show code
WorkshopRepair = ui_workshop.UIWorkshopRepair.Repair
L143 🔴 global_write
Global write: CanRepair
Impact: low
Show code
CanRepair = inventory_upgrades.can_repair_item
L149 🔴 global_write
Global write: TechUpgrade
Impact: low
Show code
TechUpgrade = ui_inventory.UIInventory.RMode_UpgradeYes
L165 🔴 global_write
Global write: UnloadAll
Impact: low
Show code
UnloadAll = item_weapon.unload_all_weapons
L200 🔴 global_write
Global write: original_build_desc_header
Impact: low
Show code
original_build_desc_header = ui_item.build_desc_header
L274 🔴 global_write
Global write: original_build_desc_footer
Impact: low
Show code
original_build_desc_footer = ui_item.build_desc_footer
L297 🔴 global_write
Global write: collected
Impact: low
Show code
collected = collect_mag_data(mag_data, true)
L320 🔴 global_write
Global write: CloneWep
Impact: low
Show code
CloneWep = _G.alife_clone_weapon
L394 🔴 global_write
Global write: id_1
Impact: low
Show code
id_1 = alife_create_item(default_mag, db.actor)
L395 🔴 global_write
Global write: id_2
Impact: low
Show code
id_2 = alife_create_item(default_mag, db.actor)
L404 🔴 global_write
Global write: NewGameEquipment
Impact: low
Show code
NewGameEquipment = itms_manager.new_game_equippment
L410 🔴 global_write
Global write: AzazelDeath
Impact: low
Show code
AzazelDeath = gamemode_azazel.actor_on_before_death
L473 🔴 global_write
Global write: BarTele
Impact: low
Show code
BarTele = xr_effects.bar_arena_teleport
L864 🔴 global_write
Global write: DetachScope
Impact: low
Show code
DetachScope = item_weapon.detach_scope
L866 🔴 global_write
Global write: AttachScope
Impact: low
Show code
AttachScope = item_weapon.attach_scope
L530 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if wpn and IsWeapon(wpn) and (not IsItem("fake_ammo_wpn",wpn:section())) then
L722 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if wpn and (wpn:section() == self.section) then
L777 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if wpn and (wpn:section() == self.section) and self.avail[n] then
L313 🟡 unused_local_variable
Local variable 'string_find' is assigned but never used
Impact: low
Show code
local string_find = string.find
L181 🟡 unused_local_variable
Local variable 'math_ceil' is assigned but never used
Impact: low
Show code
local math_ceil = math.ceil
L185 🟡 unused_local_variable
Local variable 'clr_y' is assigned but never used
Impact: low
Show code
local clr_y = utils_xml.get_color("yellow")
L186 🟡 unused_local_variable
Local variable 'clr_o' is assigned but never used
Impact: low
Show code
local clr_o = utils_xml.get_color("d_orange")
L189 🟡 unused_local_variable
Local variable 'clr_b' is assigned but never used
Impact: low
Show code
local clr_b = utils_xml.get_color("d_cyan")
L190 🟡 unused_local_variable
Local variable 'clr_b1' is assigned but never used
Impact: low
Show code
local clr_b1 = utils_xml.get_color("pda_blue")
L191 🟡 unused_local_variable
Local variable 'clr_b2' is assigned but never used
Impact: low
Show code
local clr_b2 = utils_xml.get_color("d_blue")
L194 🟡 unused_local_variable
Local variable 'clr_w' is assigned but never used
Impact: low
Show code
local clr_w = utils_xml.get_color("pda_white")
L314 🟡 unused_local_variable
Local variable 'string_gsub' is assigned but never used
Impact: low
Show code
local string_gsub = string.gsub

AllC_AI_NPCs_Die_In_Anomalies

4 files (🟢1 🟡3 🔴6 🔵3)

zz_allc0r3_mai_anomalies_settings.script

L9 🔴 global_write
Global write: mai_always_ignore_anom
Impact: low
Show code
mai_always_ignore_anom = {

zz_allc0r3_mai_location_settings.script

L10 🔴 global_write
Global write: mai_always_ignore_levels
Impact: low
Show code
mai_always_ignore_levels = {

zz_allc0r3_mai_main.script

L164 🟢 table_getn
table.getn(ignored_anomalies_hash) -> #ignored_anomalies_hash
Impact: low
Show code
table.getn and table.getn(ignored_anomalies_hash) or 0, #ignored_anomalies_patterns)
L95 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[%s][MAI][%s] %s", time_global(), category, msg)
L102 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[%s][MAI][%s] %s", time_global(), category, msg)
L1417 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[MAI][DEATH] %s (%s %s) killed by %s (%s) while %s",
L462 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
if obj and obj.is_anomaly and obj:is_anomaly() then
L1533 🟡 potential_nil_access
Potential nil access: 'npc' from level.object_by_id() used without nil check
Impact: low
Show code
if npc and npc.alive and npc:alive() and IsStalker(npc) then
L810 🟡 unused_local_variable
Local variable 'touching_list' is assigned but never used
Impact: low
Show code
local is_touching, touching_list = is_npc_inside_anomaly(npc)

zz_allc0r3_mai_npc_settings.script

L12 🔴 global_write
Global write: demonized_ignore_npc
Impact: low
Show code
demonized_ignore_npc = {
L730 🔴 global_write
Global write: mai_always_full_ignore_community
Impact: low
Show code
mai_always_full_ignore_community = {
L735 🔴 global_write
Global write: mai_no_evade_community
Impact: low
Show code
mai_no_evade_community = {
L740 🔴 global_write
Global write: mai_no_damage_community
Impact: low
Show code
mai_no_damage_community = {

Ammo Auto Favorite

1 file (🟢1 🟡1 🔴0 🔵0)

ammo_autofav.script

L19 🟢 uncached_globals_summary
Cache 1 globals in manage_ammo_favorites
Impact: medium
Show code
L20: pairs L24: pairs
L26 🟡 potential_nil_access
Potential nil access: 'wpn' from :item_in_slot() used without nil check
Impact: low
Show code
if wpn and not (IsItem("fake_ammo_wpn",wpn:section())) then

Ammo Check - Priler

3 files (🟢12 🟡2 🔴29 🔵14)

ammo_check_mcm.script

L1062 🟢 table_insert_append
table.insert(found, v) -> found[#found+1] = v
Impact: high
Show code
table.insert(found, anm)
L122 🟢 uncached_globals_summary
Cache 2 globals in apply_intensity
Impact: medium
Show code
L124: bit.band L125: bit.band L124: bit.rshift L125: bit.rshift
L717 🟢 uncached_globals_summary
Cache 1 globals in get_ammo_status
Impact: medium
Show code
L833: tostring L833: tostring
L1256 🟢 uncached_globals_summary
Cache 1 globals in on_option_change
Impact: medium
Show code
L1268: tostring L1268: tostring
L249 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![AC] " .. msg, ...)
L255 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
if dbg_log then dbg_log:log(msg, ...) end
L1070 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[AmmoCheck DEBUG] Weapon: %s | HUD: %s", sec, hud_section)
L1072 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(" [+] %s", anm)
L1102 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[AmmoCheck DEBUG] %s %s delay set to %.1fs", sec, weapon_type, new_delay)
L1139 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[AmmoCheck DEBUG] %s: %s", msg, tostring(err))
L1145 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[AmmoCheck DEBUG] %s", msg)
L285 🔴 global_write
Global write: get_data
Impact: low
Show code
get_data = null_function
L286 🔴 global_write
Global write: set_data
Impact: low
Show code
set_data = null_function
L287 🔴 global_write
Global write: get_mag_loaded
Impact: low
Show code
get_mag_loaded = null_function
L288 🔴 global_write
Global write: is_supported_weapon
Impact: low
Show code
is_supported_weapon = null_function
L289 🔴 global_write
Global write: is_jammed_weapon
Impact: low
Show code
is_jammed_weapon = null_function
L290 🔴 global_write
Global write: get_sec_chambered
Impact: low
Show code
get_sec_chambered = nil_function -- must return nil, not false
L980 🔴 global_write
Global write: get_data
Impact: low
Show code
get_data = magazine_binder.get_data
L981 🔴 global_write
Global write: set_data
Impact: low
Show code
set_data = magazine_binder.set_data
L982 🔴 global_write
Global write: get_mag_loaded
Impact: low
Show code
get_mag_loaded = magazine_binder.get_mag_loaded or get_mag_loaded_shim
L983 🔴 global_write
Global write: is_supported_weapon
Impact: low
Show code
is_supported_weapon = magazine_binder.is_supported_weapon
L984 🔴 global_write
Global write: is_jammed_weapon
Impact: low
Show code
is_jammed_weapon = magazines.is_jammed_weapon
L985 🔴 global_write
Global write: get_sec_chambered
Impact: low
Show code
get_sec_chambered = magazines.get_sec_chambered
L988 🔴 global_write
Global write: get_data
Impact: low
Show code
get_data = null_function
L989 🔴 global_write
Global write: set_data
Impact: low
Show code
set_data = null_function
L990 🔴 global_write
Global write: is_supported_weapon
Impact: low
Show code
is_supported_weapon = null_function
L991 🔴 global_write
Global write: get_mag_loaded
Impact: low
Show code
get_mag_loaded = null_function
L992 🔴 global_write
Global write: is_jammed_weapon
Impact: low
Show code
is_jammed_weapon = null_function
L993 🔴 global_write
Global write: get_sec_chambered
Impact: low
Show code
get_sec_chambered = nil_function -- must return nil, not false
L97 🟡 unused_local_variable
Local variable 'RESTORE_DET_DELAY' is assigned but never used
Impact: low
Show code
local RESTORE_DET_DELAY = 0.1 -- delay before checking to restore detector

ammo_check_weapons.script

L212 🟢 string_len
string.len(prefix) -> #prefix
Impact: low
Show code
local len = string.len(prefix)
L427 🟢 string_len
string.len(prefix) -> #prefix
Impact: low
Show code
local len = string.len(prefix)
L445 🟢 string_len
string.len(prefix) -> #prefix
Impact: low
Show code
local len = string.len(prefix)
L479 🟢 string_len
string.len(prefix) -> #prefix
Impact: low
Show code
local len = string.len(prefix)
L493 🟢 string_len
string.len(prefix) -> #prefix
Impact: low
Show code
local len = string.len(prefix)
L28 🔴 global_write
Global write: config_cache
Impact: low
Show code
config_cache = {}
L34 🔴 global_write
Global write: break_action_shotguns
Impact: low
Show code
break_action_shotguns = {
L44 🔴 global_write
Global write: bolt_action_rifles
Impact: low
Show code
bolt_action_rifles = {
L69 🔴 global_write
Global write: pump_action_shotguns
Impact: low
Show code
pump_action_shotguns = {
L98 🔴 global_write
Global write: pistol_smg_animations
Impact: low
Show code
pistol_smg_animations = {
L119 🔴 global_write
Global write: rifle_animations
Impact: low
Show code
rifle_animations = {
L134 🔴 global_write
Global write: sniper_animations
Impact: low
Show code
sniper_animations = {
L152 🔴 global_write
Global write: ignore_fake_animations
Impact: low
Show code
ignore_fake_animations = {
L179 🔴 global_write
Global write: eject_shell_exclude
Impact: low
Show code
eject_shell_exclude = {
L198 🔴 global_write
Global write: config_cache
Impact: low
Show code
config_cache = {}
L406 🔴 global_write
Global write: config_cache
Impact: low
Show code
config_cache = {}
L25 🟡 unused_local_variable
Local variable 'string_find' is assigned but never used
Impact: low
Show code
local string_find = string.find

animation_common.script

L104 🟢 table_insert_append
table.insert(anim_mutators, v) -> anim_mutators[#anim_mutators+1] = v
Impact: high
Show code
table.insert(anim_mutators, {
L143 🟢 table_insert_append
table.insert(list, v) -> list[#list+1] = v
Impact: high
Show code
table.insert(list, {
L66 🟢 uncached_globals_summary
Cache 1 globals in add_anim_mutator
Impact: medium
Show code
L73: type L74: type
L69 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![AnimCommon] ERROR: add_anim_mutator called with nil functor")
L74 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![AnimCommon] ERROR: add_anim_mutator functor must be a function, got %s", type(functor))
L83 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![AnimCommon] WARNING: condition must be a function, ignoring")
L200 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![AnimCommon] ERROR: get_safe_sound_object - path is nil")
L204 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![AnimCommon] ERROR: get_safe_sound_object - section is nil")
L332 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![AnimCommon] ERROR in mutator condition '%s': %s",
L344 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![AnimCommon] ERROR in mutator '%s': %s",

Animated_Campfire_Ignition

1 file (🟢0 🟡1 🔴15 🔵0)

zzz_matches_anim.script

L1 🔴 global_write
Global write: anim_item
Impact: low
Show code
anim_item = nil
L2 🔴 global_write
Global write: active_slot
Impact: low
Show code
active_slot = nil
L3 🔴 global_write
Global write: det_active
Impact: low
Show code
det_active = nil
L4 🔴 global_write
Global write: camp_obj
Impact: low
Show code
camp_obj = nil
L5 🔴 global_write
Global write: cur_fov
Impact: low
Show code
cur_fov = nil
L50 🔴 global_write
Global write: camp_obj
Impact: low
Show code
camp_obj = obj
L116 🔴 global_write
Global write: active_slot
Impact: low
Show code
active_slot = zzz_ea_addon_backpack.active_slot
L118 🔴 global_write
Global write: active_slot
Impact: low
Show code
active_slot = db.actor:active_slot()
L121 🔴 global_write
Global write: cur_fov
Impact: low
Show code
cur_fov = get_console():get_float("hud_fov")
L122 🔴 global_write
Global write: anim_item
Impact: low
Show code
anim_item = "tch_matches_fire_start_hud_anm"
L126 🔴 global_write
Global write: det_active
Impact: low
Show code
det_active = db.actor:active_detector() or nil
L145 🔴 global_write
Global write: anim_item
Impact: low
Show code
anim_item = nil
L146 🔴 global_write
Global write: active_slot
Impact: low
Show code
active_slot = nil
L147 🔴 global_write
Global write: camp_obj
Impact: low
Show code
camp_obj = nil
L148 🔴 global_write
Global write: cur_fov
Impact: low
Show code
cur_fov = nil
L7 🟡 unused_local_variable
Local variable 'original_bind_campfire' is assigned but never used
Impact: low
Show code
local original_bind_campfire = bind_campfire.actor_on_item_use

Animated_NPC_Healing

1 file (🟢0 🟡0 🔴11 🔵0)

zzz_wounded_heal_anim.script

L1 🔴 global_write
Global write: anim_item
Impact: low
Show code
anim_item = nil
L2 🔴 global_write
Global write: active_slot
Impact: low
Show code
active_slot = nil
L3 🔴 global_write
Global write: cur_fov
Impact: low
Show code
cur_fov = nil
L27 🔴 global_write
Global write: active_slot
Impact: low
Show code
active_slot = db.actor:active_slot()
L28 🔴 global_write
Global write: cur_fov
Impact: low
Show code
cur_fov = get_console():get_float("hud_fov")
L31 🔴 global_write
Global write: anim_item
Impact: low
Show code
anim_item = "tch_help_wounded_hud_anm"
L34 🔴 global_write
Global write: det_active
Impact: low
Show code
det_active = db.actor:active_detector() or nil
L56 🔴 global_write
Global write: anim_item
Impact: low
Show code
anim_item = nil
L57 🔴 global_write
Global write: active_slot
Impact: low
Show code
active_slot = nil
L58 🔴 global_write
Global write: camp_obj
Impact: low
Show code
camp_obj = nil
L59 🔴 global_write
Global write: cur_fov
Impact: low
Show code
cur_fov = nil

Anomaly Magazines Redux (need to disable GAMMA unjam reload same key)

17 files (🟢24 🟡48 🔴153 🔵32)

a_magazine.script

L1 🔴 global_write
Global write: print_dbg
Impact: low
Show code
print_dbg = magazines.print_dbg
L2 🔴 global_write
Global write: is_magazine
Impact: low
Show code
is_magazine = magazine_binder.is_magazine
L4 🔴 global_write
Global write: GetCost
Impact: low
Show code
GetCost = utils_item.get_item_cost

actor_stash_patch.script

L13 🟢 table_insert_append
table.insert(conditions, v) -> conditions[#conditions+1] = v
Impact: high
Show code
table.insert(conditions, f)
L6 🟢 repeated_item_section()
item:section() called 3x in <global>
Impact: low
Show code
Cache item:section() result
L33 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local se_obj = alife_create("inv_backpack",actor:position(),actor:level_vertex_id(),actor:game_vertex_id())
L33 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local se_obj = alife_create("inv_backpack",actor:position(),actor:level_vertex_id(),actor:game_vertex_id())
L33 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local se_obj = alife_create("inv_backpack",actor:position(),actor:level_vertex_id(),actor:game_vertex_id())

custom_functor_autoinject.script

L114 🟢 string_len
string.len(pos) -> #pos
Impact: low
Show code
sub_print_r(val,indent..string.rep(" ",string.len(pos)+8))
L115 🟢 string_len
string.len(pos) -> #pos
Impact: low
Show code
printf(indent..string.rep(" ",string.len(pos)+6).."}")
L105 🟢 uncached_globals_summary
Cache 1 globals in sub_print_r
Impact: medium
Show code
L106: tostring L107: tostring
L128 🟢 uncached_globals_summary
Cache 1 globals in print_table
Impact: medium
Show code
L137: type L139: type
L107 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."*"..tostring(t))
L113 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."["..pos.."] => "..tostring(t).." {")
L115 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent..string.rep(" ",string.len(pos)+6).."}")
L117 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."["..pos.."] => "..tostring(val))
L121 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent..tostring(t))
L140 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = function",k)
L143 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s",k,utils_data.vector_to_string(v))
L145 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = userdata", k)
L150 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = true",k)
L152 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = true")
L156 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = false", k)
L158 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = false")
L163 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s", k,v)
L165 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = nil", k,v)
L319 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s, %s", k, v.index)
L322 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s, %s, max custom_functor reached", k, v.index)
L424 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Custom functors, processing queue")
L427 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Custom functors, type %s", v.type)
L464 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("functor slot is not valid, min 1, max 10, your slot: %s", slot)
L479 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("functor slot is not valid min 1, max 10, your slot: %s", slot)
L515 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[" .. k .. "] => ")
L98 🟡 unused_local_variable
Local variable 'table_remove' is assigned but never used
Impact: low
Show code
local table_remove = table.remove

ish_mag_bars.script

L21 🟡 unused_local_variable
Local variable 'vanilla_bar_list_for_reference_not_used_here' is assigned but never used
Impact: low
Show code
local vanilla_bar_list_for_reference_not_used_here = {

mag_hud.script

L162 🟢 uncached_globals_summary
Cache 1 globals in Update
Impact: medium
Show code
L204: pairs L213: pairs
L367 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("sacle %s", scale)
L186 🔴 global_write
Global write: id
Impact: low
Show code
id = item:id()
L299 🔴 global_write
Global write: count
Impact: low
Show code
count = self.count
L401 🔴 global_write
Global write: p_width
Impact: low
Show code
p_width = parent_width or 1024
L402 🔴 global_write
Global write: p_center
Impact: low
Show code
p_center = p_width/2
L403 🔴 global_write
Global write: width
Impact: low
Show code
width = ele:GetWidth()
L404 🔴 global_write
Global write: pos
Impact: low
Show code
pos = ele:GetWndPos()
L405 🔴 global_write
Global write: anchorpos
Impact: low
Show code
anchorpos = {}
L409 🔴 global_write
Global write: ratio
Impact: low
Show code
ratio = (device().height / device().width) / (768 / 1024)
L410 🔴 global_write
Global write: xadjust
Impact: low
Show code
xadjust = anchorpos.left
L413 🔴 global_write
Global write: xadjust
Impact: low
Show code
xadjust = p_width - (p_width - (anchor and anchorpos[anchor] or anchorpos.left))*ratio
L415 🔴 global_write
Global write: xadjust
Impact: low
Show code
xadjust = p_center - (p_center - (anchor and anchorpos[anchor] or anchorpos.left))*ratio
L417 🔴 global_write
Global write: xadjust
Impact: low
Show code
xadjust = ratio * (anchor and anchorpos[anchor] or anchorpos.left)
L14 🟡 unused_local_variable
Local variable 'gc' is assigned but never used
Impact: low
Show code
local gc = game.translate_string
L23 🟡 unused_local_variable
Local variable 'show_bgrd' is assigned but never used
Impact: low
Show code
local show_bgrd

magazine_binder.script

L169 🟢 table_insert_append
table.insert(t, v) -> t[#t+1] = v
Impact: high
Show code
table.insert(t, v2)
L180 🟢 uncached_globals_summary
Cache 1 globals in type_correction
Impact: medium
Show code
L184: type L186: type
L42 🟡 string_concat_in_loop
String concat in loop: s = s .. x
Impact: critical
Show code
s = s .. v .. " "
L62 🔴 global_write
Global write: tbl
Impact: low
Show code
tbl = {}
L310 🔴 global_write
Global write: carried
Impact: low
Show code
carried = get_total_carried()
L657 🔴 global_write
Global write: ready_color
Impact: low
Show code
ready_color = GetARGB(100, 255, 159, 82)
L191 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
section = obj:section()
L523 🟡 potential_nil_access
Potential nil access: 'wpn_obj' from level.object_by_id() used without nil check
Impact: low
Show code
if wpn_obj and wpn_obj:weapon_in_grenade_mode() then return end

magazines.script

L209 🟢 repeated_item_section()
item:section() called 3x in on_item_drag_dropped
Impact: low
Show code
Cache item:section() result
L209 🟢 repeated_weapon_section()
weapon:section() called 3x in on_item_drag_dropped
Impact: low
Show code
Cache weapon:section() result
L222 🟢 repeated_weapon_id()
weapon:id() called 3x in on_item_drag_dropped
Impact: low
Show code
Cache weapon:id() result
L375 🟢 repeated_ammo_section()
ammo:section() called 3x in chamber_single_round
Impact: low
Show code
Cache ammo:section() result
L816 🟢 repeated_magazine_id()
magazine:id() called 3x in fast_unload_magazine
Impact: low
Show code
Cache magazine:id() result
L36 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
dbg_log:log( text , ...)
L38 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( "RAX: | %s | "..text ,time_global(), ...)
L50 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
err_log:log( text , ...)
L52 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe( "ERR: | %s | "..text ,time_global(), ...)
L6 🔴 global_write
Global write: gc
Impact: low
Show code
gc = game.translate_string
L7 🔴 global_write
Global write: get_mag_data
Impact: low
Show code
get_mag_data = magazine_binder.get_data
L8 🔴 global_write
Global write: set_mag_data
Impact: low
Show code
set_mag_data = magazine_binder.set_data
L9 🔴 global_write
Global write: is_supported_weapon
Impact: low
Show code
is_supported_weapon = magazine_binder.is_supported_weapon
L10 🔴 global_write
Global write: get_magazine_caliber
Impact: low
Show code
get_magazine_caliber = magazine_binder.get_magazine_caliber
L11 🔴 global_write
Global write: weapon_default_magazine
Impact: low
Show code
weapon_default_magazine = magazine_binder.weapon_default_magazine
L12 🔴 global_write
Global write: is_compatible
Impact: low
Show code
is_compatible = magazine_binder.is_compatible
L13 🔴 global_write
Global write: isMagazine
Impact: low
Show code
isMagazine = magazine_binder.is_magazine
L14 🔴 global_write
Global write: is_magazine
Impact: low
Show code
is_magazine = magazine_binder.is_magazine
L15 🔴 global_write
Global write: get_mag_loaded
Impact: low
Show code
get_mag_loaded = magazine_binder.get_mag_loaded
L16 🔴 global_write
Global write: is_carried_mag
Impact: low
Show code
is_carried_mag = magazine_binder.is_carried_mag
L17 🔴 global_write
Global write: toggle_carried_mag
Impact: low
Show code
toggle_carried_mag = magazine_binder.toggle_carried_mag
L18 🔴 global_write
Global write: get_carried_mags
Impact: low
Show code
get_carried_mags = magazine_binder.get_carried_mags
L19 🔴 global_write
Global write: room_in_pouch
Impact: low
Show code
room_in_pouch = magazine_binder.room_in_pouch
L20 🔴 global_write
Global write: get_retool_section
Impact: low
Show code
get_retool_section = magazine_binder.get_retool_section
L21 🔴 global_write
Global write: get_weapon_base_type
Impact: low
Show code
get_weapon_base_type = magazine_binder.get_weapon_base_type
L22 🔴 global_write
Global write: get_magazine_base_type
Impact: low
Show code
get_magazine_base_type = magazine_binder.get_magazine_base_type
L23 🔴 global_write
Global write: get_mags_for_basetype
Impact: low
Show code
get_mags_for_basetype = magazine_binder.get_mags_for_basetype
L24 🔴 global_write
Global write: dump_data
Impact: low
Show code
dump_data = magazine_binder.dump_data
L25 🔴 global_write
Global write: get_mags_by_ammo_type
Impact: low
Show code
get_mags_by_ammo_type = magazine_binder.get_mags_by_ammo_type
L26 🔴 global_write
Global write: get_config
Impact: low
Show code
get_config = magazines_mcm.get_config
L135 🔴 global_write
Global write: cache_mag_time
Impact: low
Show code
cache_mag_time = {}
L317 🔴 global_write
Global write: weapon
Impact: low
Show code
weapon = get_object_by_id(id)
L495 🔴 global_write
Global write: se_mag
Impact: low
Show code
se_mag = alife_create_item(mag_data.section, weapon:parent())
L620 🔴 global_write
Global write: FADArun
Impact: low
Show code
FADArun = enhanced_animations and enhanced_animations.used_item and true or false
L715 🔴 global_write
Global write: ext_ammo_obj
Impact: low
Show code
ext_ammo_obj = get_object_by_id(ext_ammo_box)
L720 🔴 global_write
Global write: new_ammo_box
Impact: low
Show code
new_ammo_box = find_next_box(ammo_section, ext_ammo_box)
L932 🔴 global_write
Global write: new_obj
Impact: low
Show code
new_obj = alife_create_item(retool_section, obj:parent())
L1058 🔴 global_write
Global write: args
Impact: low
Show code
args = str_explode(k, ",")
L83 🟡 potential_nil_access
Potential nil access: 'parent' from :parent() used without nil check
Impact: low
Show code
if parent:id() == 0 then return false end
L84 🟡 potential_nil_access
Potential nil access: 'parent' from :parent() used without nil check
Impact: low
Show code
local se_parent = alife_object(parent:id())
L576 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local id = weapon:id()
L578 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local state = weapon and weapon:get_state()
L654 🟡 potential_nil_access
Potential nil access: 'current_weapon' from :active_item() used without nil check
Impact: low
Show code
if (current_weapon and current_weapon:id() ~= weapon_id) and time_global() < timeout + 5000 then return false end
L659 🟡 potential_nil_access
Potential nil access: 'weapon' from level.object_by_id() used without nil check (auto-fixable)
Impact: low
Show code
print_dbg("ujwt weapon:%s", weapon and weapon:name())
L758 🟡 potential_nil_access
Potential nil access: 'mag_parent' from db.actor() used without nil check
Impact: low
Show code
create_ammo(round, mag_parent:position(), mag_parent:level_vertex_id(), mag_parent:game_vertex_id(), mag_parent:id(), 1)
L758 🟡 potential_nil_access
Potential nil access: 'mag_parent' from db.actor() used without nil check
Impact: low
Show code
create_ammo(round, mag_parent:position(), mag_parent:level_vertex_id(), mag_parent:game_vertex_id(), mag_parent:id(), 1)
L758 🟡 potential_nil_access
Potential nil access: 'mag_parent' from db.actor() used without nil check
Impact: low
Show code
create_ammo(round, mag_parent:position(), mag_parent:level_vertex_id(), mag_parent:game_vertex_id(), mag_parent:id(), 1)
L758 🟡 potential_nil_access
Potential nil access: 'mag_parent' from db.actor() used without nil check
Impact: low
Show code
create_ammo(round, mag_parent:position(), mag_parent:level_vertex_id(), mag_parent:game_vertex_id(), mag_parent:id(), 1)
L789 🟡 potential_nil_access
Potential nil access: 'parent' from :parent() used without nil check
Impact: low
Show code
parent:iterate_inventory_box(itr_box)
L791 🟡 potential_nil_access
Potential nil access: 'parent' from :parent() used without nil check
Impact: low
Show code
parent:iterate_inventory(itr_box)
L796 🟡 potential_nil_access
Potential nil access: 'ammo_box' from level.object_by_id() used without nil check
Impact: low
Show code
local loaded = ammo_box:ammo_get_count() > ammo_to_load and ammo_to_load or ammo_box:ammo_get_count()
L796 🟡 potential_nil_access
Potential nil access: 'ammo_box' from level.object_by_id() used without nil check
Impact: low
Show code
local loaded = ammo_box:ammo_get_count() > ammo_to_load and ammo_to_load or ammo_box:ammo_get_count()
L797 🟡 potential_nil_access
Potential nil access: 'ammo_box' from level.object_by_id() used without nil check
Impact: low
Show code
local release_box = loaded == ammo_box:ammo_get_count()
L803 🟡 potential_nil_access
Potential nil access: 'ammo_box' from level.object_by_id() used without nil check
Impact: low
Show code
ammo_to_load = ammo_to_load - ammo_box:ammo_get_count()
L806 🟡 potential_nil_access
Potential nil access: 'ammo_box' from level.object_by_id() used without nil check
Impact: low
Show code
ammo_box:ammo_set_count(ammo_box:ammo_get_count() - loaded)
L806 🟡 potential_nil_access
Potential nil access: 'ammo_box' from level.object_by_id() used without nil check
Impact: low
Show code
ammo_box:ammo_set_count(ammo_box:ammo_get_count() - loaded)

magazines_keybinds.script

L2 🔴 global_write
Global write: print_dbg
Impact: low
Show code
print_dbg = magazines.print_dbg
L5 🔴 global_write
Global write: InventoryClick
Impact: low
Show code
InventoryClick = ui_inventory.UIInventory.On_CC_Mouse1

magazines_loot.script

L225 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!!! FRAUD DETECTED !!! Item %s should not have mag data!", sec)
L4 🔴 global_write
Global write: gc
Impact: low
Show code
gc = game.translate_string
L5 🔴 global_write
Global write: get_data
Impact: low
Show code
get_data = magazine_binder.get_data
L6 🔴 global_write
Global write: set_data
Impact: low
Show code
set_data = magazine_binder.set_data
L7 🔴 global_write
Global write: get_mag_loaded
Impact: low
Show code
get_mag_loaded = magazine_binder.get_mag_loaded
L8 🔴 global_write
Global write: prep_weapon
Impact: low
Show code
prep_weapon = magazines.prep_weapon
L9 🔴 global_write
Global write: is_supported_weapon
Impact: low
Show code
is_supported_weapon = magazine_binder.is_supported_weapon
L10 🔴 global_write
Global write: get_magazine_caliber
Impact: low
Show code
get_magazine_caliber = magazine_binder.get_magazine_caliber
L11 🔴 global_write
Global write: is_magazine
Impact: low
Show code
is_magazine = magazine_binder.is_magazine
L12 🔴 global_write
Global write: weapon_default_magazine
Impact: low
Show code
weapon_default_magazine = magazine_binder.weapon_default_magazine
L13 🔴 global_write
Global write: weapon_improved_magazine
Impact: low
Show code
weapon_improved_magazine = magazine_binder.weapon_improved_magazine
L14 🔴 global_write
Global write: create_mag_data
Impact: low
Show code
create_mag_data = magazine_binder.create_mag_data
L15 🔴 global_write
Global write: print_dbg
Impact: low
Show code
print_dbg = magazines.print_dbg
L16 🔴 global_write
Global write: get_weapon_base_type
Impact: low
Show code
get_weapon_base_type = magazine_binder.get_weapon_base_type
L17 🔴 global_write
Global write: get_mags_for_basetype
Impact: low
Show code
get_mags_for_basetype = magazine_binder.get_mags_for_basetype
L18 🔴 global_write
Global write: valid_mag_data
Impact: low
Show code
valid_mag_data = magazine_binder.valid_mag_data
L19 🔴 global_write
Global write: get_config
Impact: low
Show code
get_config = magazines_mcm.get_config
L20 🔴 global_write
Global write: validate_mag
Impact: low
Show code
validate_mag = magazine_binder.validate_mag
L21 🔴 global_write
Global write: validate_wep
Impact: low
Show code
validate_wep = magazine_binder.validate_wep
L33 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update
L162 🔴 global_write
Global write: SetWepCondition
Impact: low
Show code
SetWepCondition = death_manager.set_weapon_drop_condition
L25 🟡 unused_local_variable
Local variable 'string_format' is assigned but never used
Impact: low
Show code
local string_format = string.format
L29 🟡 unused_local_variable
Local variable 'mag_timer_global' is assigned but never used
Impact: low
Show code
local mag_timer_global = nil
L30 🟡 unused_local_variable
Local variable 'tm' is assigned but never used
Impact: low
Show code
local tm = {}

magazines_mcm.script

L78 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "magazines",gr={

mags_patches.script

L206 🟢 repeated_obj_id()
obj:id() called 3x in ui_item.build_desc_header
Impact: low
Show code
Cache obj:id() result
L745 🟢 repeated_wpn_id()
wpn:id() called 4x in SwitchNextAmmo
Impact: low
Show code
Cache wpn:id() result
L780 🟢 repeated_wpn_id()
wpn:id() called 4x in OnAmmo
Impact: low
Show code
Cache wpn:id() result
L227 🟡 string_concat_in_loop
String concat in loop: _str = _str .. x
Impact: critical
Show code
_str = _str .. clr_p .. gc("st_dot") .. " ".. clr_1 .. gc("st_mag_"..k) .. " " .. utils_xml.get_color_con(color_ratio) .. v .. "/" .. total ..(total > outfit_slots[k] and string.format(gc("st_mag_bonus"),outfit_slots[k],total - outfit_slots[k] ) or "") .. "\\n"
L233 🟡 string_concat_in_loop
String concat in loop: _str = _str .. x
Impact: critical
Show code
_str = _str .. clr_p .. gc("st_dot") .. " ".. clr_1 .. gc("st_mag_"..k)..slots.. "\\n"
L299 🟡 string_concat_in_loop
String concat in loop: _str = _str .. x
Impact: critical
Show code
_str = _str .. "\\n " .. gc("st_dot").." ".. collected[#collected - i + 1]
L3 🔴 global_write
Global write: gc
Impact: low
Show code
gc = game.translate_string
L4 🔴 global_write
Global write: get_data
Impact: low
Show code
get_data = magazine_binder.get_data
L5 🔴 global_write
Global write: set_data
Impact: low
Show code
set_data = magazine_binder.set_data
L6 🔴 global_write
Global write: dump_data
Impact: low
Show code
dump_data = magazine_binder.dump_data
L7 🔴 global_write
Global write: is_supported_weapon
Impact: low
Show code
is_supported_weapon = magazine_binder.is_supported_weapon
L8 🔴 global_write
Global write: get_magazine_caliber
Impact: low
Show code
get_magazine_caliber = magazine_binder.get_magazine_caliber
L9 🔴 global_write
Global write: is_compatible
Impact: low
Show code
is_compatible = magazine_binder.is_compatible
L10 🔴 global_write
Global write: is_magazine
Impact: low
Show code
is_magazine = magazine_binder.is_magazine
L11 🔴 global_write
Global write: get_weapon_base_type
Impact: low
Show code
get_weapon_base_type = magazine_binder.get_weapon_base_type
L12 🔴 global_write
Global write: is_carried_mag
Impact: low
Show code
is_carried_mag = magazine_binder.is_carried_mag
L13 🔴 global_write
Global write: toggle_carried_mag
Impact: low
Show code
toggle_carried_mag = magazine_binder.toggle_carried_mag
L14 🔴 global_write
Global write: room_in_pouch
Impact: low
Show code
room_in_pouch = magazine_binder.room_in_pouch
L15 🔴 global_write
Global write: eject
Impact: low
Show code
eject = magazines.eject_magazine
L16 🔴 global_write
Global write: get_total_carried
Impact: low
Show code
get_total_carried = magazine_binder.get_total_carried
L17 🔴 global_write
Global write: get_loadout_size
Impact: low
Show code
get_loadout_size = magazine_binder.get_loadout_size
L18 🔴 global_write
Global write: weapon_default_magazine
Impact: low
Show code
weapon_default_magazine = magazine_binder.weapon_default_magazine
L19 🔴 global_write
Global write: get_mag_loaded
Impact: low
Show code
get_mag_loaded = magazine_binder.get_mag_loaded
L20 🔴 global_write
Global write: print_dbg
Impact: low
Show code
print_dbg = magazines.print_dbg
L21 🔴 global_write
Global write: has_loadout_slots
Impact: low
Show code
has_loadout_slots = magazine_binder.has_loadout_slots
L22 🔴 global_write
Global write: get_loadout_slots
Impact: low
Show code
get_loadout_slots = magazine_binder.get_loadout_slots
L23 🔴 global_write
Global write: create_mag_data
Impact: low
Show code
create_mag_data = magazine_binder.create_mag_data
L24 🔴 global_write
Global write: validate_mag
Impact: low
Show code
validate_mag = magazine_binder.validate_mag
L25 🔴 global_write
Global write: validate_wep
Impact: low
Show code
validate_wep = magazine_binder.validate_wep
L26 🔴 global_write
Global write: create_time_event
Impact: low
Show code
create_time_event = magazines.create_time_event
L27 🔴 global_write
Global write: get_sec_chambered
Impact: low
Show code
get_sec_chambered = magazines.get_sec_chambered
L28 🔴 global_write
Global write: get_config
Impact: low
Show code
get_config = magazines_mcm.get_config
L42 🔴 global_write
Global write: mousebase
Impact: low
Show code
mousebase = utils_ui.UICellContainer.On_Mouse1
L84 🔴 global_write
Global write: DisassemblyWeapon
Impact: low
Show code
DisassemblyWeapon = item_parts.disassembly_weapon
L100 🔴 global_write
Global write: WorkshopUpgrade
Impact: low
Show code
WorkshopUpgrade = ui_workshop.UIWorkshopUpgrade.Upgrade
L122 🔴 global_write
Global write: WorkshopRepair
Impact: low
Show code
WorkshopRepair = ui_workshop.UIWorkshopRepair.Repair
L143 🔴 global_write
Global write: CanRepair
Impact: low
Show code
CanRepair = inventory_upgrades.can_repair_item
L149 🔴 global_write
Global write: TechUpgrade
Impact: low
Show code
TechUpgrade = ui_inventory.UIInventory.RMode_UpgradeYes
L165 🔴 global_write
Global write: UnloadAll
Impact: low
Show code
UnloadAll = item_weapon.unload_all_weapons
L200 🔴 global_write
Global write: original_build_desc_header
Impact: low
Show code
original_build_desc_header = ui_item.build_desc_header
L274 🔴 global_write
Global write: original_build_desc_footer
Impact: low
Show code
original_build_desc_footer = ui_item.build_desc_footer
L297 🔴 global_write
Global write: collected
Impact: low
Show code
collected = collect_mag_data(mag_data, true)
L320 🔴 global_write
Global write: CloneWep
Impact: low
Show code
CloneWep = _G.alife_clone_weapon
L394 🔴 global_write
Global write: id_1
Impact: low
Show code
id_1 = alife_create_item(default_mag, db.actor)
L395 🔴 global_write
Global write: id_2
Impact: low
Show code
id_2 = alife_create_item(default_mag, db.actor)
L404 🔴 global_write
Global write: NewGameEquipment
Impact: low
Show code
NewGameEquipment = itms_manager.new_game_equippment
L410 🔴 global_write
Global write: AzazelDeath
Impact: low
Show code
AzazelDeath = gamemode_azazel.actor_on_before_death
L471 🔴 global_write
Global write: BarTele
Impact: low
Show code
BarTele = xr_effects.bar_arena_teleport
L862 🔴 global_write
Global write: DetachScope
Impact: low
Show code
DetachScope = item_weapon.detach_scope
L864 🔴 global_write
Global write: AttachScope
Impact: low
Show code
AttachScope = item_weapon.attach_scope
L528 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if wpn and IsWeapon(wpn) and (not IsItem("fake_ammo_wpn",wpn:section())) then
L720 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if wpn and (wpn:section() == self.section) then
L775 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if wpn and (wpn:section() == self.section) and self.avail[n] then
L313 🟡 unused_local_variable
Local variable 'string_find' is assigned but never used
Impact: low
Show code
local string_find = string.find
L181 🟡 unused_local_variable
Local variable 'math_ceil' is assigned but never used
Impact: low
Show code
local math_ceil = math.ceil
L185 🟡 unused_local_variable
Local variable 'clr_y' is assigned but never used
Impact: low
Show code
local clr_y = utils_xml.get_color("yellow")
L186 🟡 unused_local_variable
Local variable 'clr_o' is assigned but never used
Impact: low
Show code
local clr_o = utils_xml.get_color("d_orange")
L189 🟡 unused_local_variable
Local variable 'clr_b' is assigned but never used
Impact: low
Show code
local clr_b = utils_xml.get_color("d_cyan")
L190 🟡 unused_local_variable
Local variable 'clr_b1' is assigned but never used
Impact: low
Show code
local clr_b1 = utils_xml.get_color("pda_blue")
L191 🟡 unused_local_variable
Local variable 'clr_b2' is assigned but never used
Impact: low
Show code
local clr_b2 = utils_xml.get_color("d_blue")
L194 🟡 unused_local_variable
Local variable 'clr_w' is assigned but never used
Impact: low
Show code
local clr_w = utils_xml.get_color("pda_white")
L314 🟡 unused_local_variable
Local variable 'string_gsub' is assigned but never used
Impact: low
Show code
local string_gsub = string.gsub

rax_icon_layers.script

L28 🟢 table_insert_append
table.insert(icon_layers[name], v) -> icon_layers[name][#icon_layers[name]+1] = v
Impact: high
Show code
table.insert(icon_layers[name], functor)

rax_persistent_highlight.script

L24 🟢 table_insert_append
table.insert(persistent_highlights[name], v) -> persistent_highlights[name][#persistent_highlights[name]+1] = v
Impact: high
Show code
table.insert(persistent_highlights[name], functor)
L57 🟢 uncached_globals_summary
Cache 1 globals in change_alpha
Impact: medium
Show code
L61: bit.band L62: bit.band
L44 🔴 global_write
Global write: persistant_highlight
Impact: low
Show code
persistant_highlight = self:GetPersistantHighlight()
L47 🔴 global_write
Global write: color
Impact: low
Show code
color = main_clr and change_alpha(persistant_highlight, 255) or persistant_highlight -- if main_clr set the alpha to max for reasons.
L55 🔴 global_write
Global write: clr_cache
Impact: low
Show code
clr_cache = {}
L61 🔴 global_write
Global write: b
Impact: low
Show code
b = bit.band(clr, 255)
L62 🔴 global_write
Global write: g
Impact: low
Show code
g = bit.band(bit.rshift(clr, 8), 255)
L63 🔴 global_write
Global write: r
Impact: low
Show code
r = bit.band(bit.rshift(clr, 16), 255)

rax_stacking_control.script

L54 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR UICellContainer:ValidateSimilar | no data recieved!")
L86 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR UICellContainer:FindSimilar | no data recieved!")

trader_autoinject.script

L34 🟢 repeated_npc_id()
npc:id() called 3x in trade_manager.update
Impact: low
Show code
Cache npc:id() result
L184 🟢 repeated_item_section()
item:section() called 4x in itr_inv
Impact: low
Show code
Cache item:section() result
L16 🔴 global_write
Global write: find
Impact: low
Show code
find = string.find
L32 🔴 global_write
Global write: TraderUpdate
Impact: low
Show code
TraderUpdate = trade_manager.update

ui_encyclopedia_autoinject.script

L17 🟢 table_insert_append
table.insert(new_cat, v) -> new_cat[#new_cat+1] = v
Impact: high
Show code
table.insert(new_cat, section)
L28 🟢 table_insert_append
table.insert(new_art[category].articles, v) -> new_art[category].articles[#new_art[category].articles+1] = v
Impact: high
Show code
table.insert(new_art[category].articles, article)
L16 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("category: processing %s", section)
L22 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("article: processing %s", section)
L59 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("there are %s new categories", #new_cat)
L33 🔴 global_write
Global write: InitArticles
Impact: low
Show code
InitArticles = ui_pda_encyclopedia_tab.pda_encyclopedia_tab.InitArticles
L56 🔴 global_write
Global write: InitCategories
Impact: low
Show code
InitCategories = ui_pda_encyclopedia_tab.pda_encyclopedia_tab.InitCategories
L62 🔴 global_write
Global write: item
Impact: low
Show code
item = ui_pda_encyclopedia_tab.pda_encyclopedia_entry(v, k, clr)
L25 🟡 unused_local_variable
Local variable 'junk1' is assigned but never used
Impact: low
Show code
local junk1, article, category = ini_art:r_line(section, i, "", "")

yyy_mag_sorting.script

L6 🔴 global_write
Global write: is_magazine
Impact: low
Show code
is_magazine = magazine_binder.is_magazine
L7 🔴 global_write
Global write: is_carried_mag
Impact: low
Show code
is_carried_mag = magazine_binder.is_carried_mag
L8 🔴 global_write
Global write: print_dbg
Impact: low
Show code
print_dbg = magazines.print_dbg
L11 🔴 global_write
Global write: ini
Impact: low
Show code
ini = ini_sys
L14 🔴 global_write
Global write: ui_catagories
Impact: low
Show code
ui_catagories = {}
L15 🔴 global_write
Global write: item_order
Impact: low
Show code
item_order = {}
L17 🔴 global_write
Global write: ab_w
Impact: low
Show code
ab_w, ab_h, ab_k = {}, {}, {}
L17 🔴 global_write
Global write: ab_h
Impact: low
Show code
ab_w, ab_h, ab_k = {}, {}, {}
L17 🔴 global_write
Global write: ab_k
Impact: low
Show code
ab_w, ab_h, ab_k = {}, {}, {}
L18 🔴 global_write
Global write: a_sec
Impact: low
Show code
a_sec, a_w, a_h, a_k = nil, nil, nil, nil
L18 🔴 global_write
Global write: a_w
Impact: low
Show code
a_sec, a_w, a_h, a_k = nil, nil, nil, nil
L18 🔴 global_write
Global write: a_h
Impact: low
Show code
a_sec, a_w, a_h, a_k = nil, nil, nil, nil
L18 🔴 global_write
Global write: a_k
Impact: low
Show code
a_sec, a_w, a_h, a_k = nil, nil, nil, nil
L19 🔴 global_write
Global write: b_sec
Impact: low
Show code
b_sec, b_w, b_h, b_k = nil, nil, nil, nil
L19 🔴 global_write
Global write: b_w
Impact: low
Show code
b_sec, b_w, b_h, b_k = nil, nil, nil, nil
L19 🔴 global_write
Global write: b_h
Impact: low
Show code
b_sec, b_w, b_h, b_k = nil, nil, nil, nil
L19 🔴 global_write
Global write: b_k
Impact: low
Show code
b_sec, b_w, b_h, b_k = nil, nil, nil, nil
L42 🔴 global_write
Global write: a_sec
Impact: low
Show code
a_sec = asec
L43 🔴 global_write
Global write: axis
Impact: low
Show code
axis = utils_xml.get_item_axis(a_sec,1)
L52 🔴 global_write
Global write: a_w
Impact: low
Show code
a_w = ab_w[a_sec]
L53 🔴 global_write
Global write: a_h
Impact: low
Show code
a_h = ab_h[a_sec]
L54 🔴 global_write
Global write: a_k
Impact: low
Show code
a_k = item_order[ab_k[a_sec]]
L57 🔴 global_write
Global write: b_sec
Impact: low
Show code
b_sec = bsec
L58 🔴 global_write
Global write: axis
Impact: low
Show code
axis = utils_xml.get_item_axis(b_sec,1)
L67 🔴 global_write
Global write: b_w
Impact: low
Show code
b_w = ab_w[b_sec]
L68 🔴 global_write
Global write: b_h
Impact: low
Show code
b_h = ab_h[b_sec]
L69 🔴 global_write
Global write: b_k
Impact: low
Show code
b_k = item_order[ab_k[b_sec]]
L192 🔴 global_write
Global write: axis
Impact: low
Show code
axis = utils_xml.get_item_axis(sec,1)
L30 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, kind, order = ini:r_line_ex("item_kind_order",i,"","")

Anomaly Radio Revamp

1 file (🟢4 🟡0 🔴1 🔵0)

ui_pda_radio_tab.script

L470 🟢 table_insert_append
table.insert(counter, v) -> counter[#counter+1] = v
Impact: high
Show code
table.insert(counter,plyr_now) -- insert the new count at last index
L584 🟢 uncached_globals_summary
Cache 2 globals in actor_on_update
Impact: medium
Show code
L616: math.random L617: math.random L666: math.floor L691: math.floor
L877 🟢 uncached_globals_summary
Cache 1 globals in Update
Impact: medium
Show code
L912: math.floor L913: math.floor
L60 🟢 repeated_getFS
getFS called 3x in <global>
Impact: low
Show code
Cache getFS result
L179 🔴 global_write
Global write: wthr
Impact: low
Show code
wthr = gini:r_string_ex(levels[i],"weathers")

Anomaly_Popup_Messages

5 files (🟢2 🟡6 🔴4 🔵0)

apm_aa_ui_popup_messages_mcm.script

L2 🔴 global_write
Global write: op
Impact: low
Show code
op = {
L229 🟡 unused_local_variable
Local variable 'bind' is assigned but never used
Impact: low
Show code
local bind = dik_to_bind(dik)

apm_killfeed.script

L61 🟡 potential_nil_access
Potential nil access: 'who' from level.object_by_id() used without nil check
Impact: low
Show code
if who:id() == AC_ID then
L64 🟡 potential_nil_access
Potential nil access: 'who' from level.object_by_id() used without nil check
Impact: low
Show code
printMsg("st_apm_killfeed_killed_by", who:character_icon(), {who:character_name(), gc(who:character_community())})
L64 🟡 potential_nil_access
Potential nil access: 'who' from level.object_by_id() used without nil check
Impact: low
Show code
printMsg("st_apm_killfeed_killed_by", who:character_icon(), {who:character_name(), gc(who:character_community())})
L64 🟡 potential_nil_access
Potential nil access: 'who' from level.object_by_id() used without nil check
Impact: low
Show code
printMsg("st_apm_killfeed_killed_by", who:character_icon(), {who:character_name(), gc(who:character_community())})
L10 🟡 unused_local_variable
Local variable 'coms' is assigned but never used
Impact: low
Show code
local coms = {

apm_killfeed_mcm.script

L2 🔴 global_write
Global write: op
Impact: low
Show code
op = {

popup_pickup.script

L73 🟢 uncached_globals_summary
Cache 1 globals in actor_on_item_take
Impact: medium
Show code
L91: pairs L96: pairs
L75 🟢 repeated_item_section()
item:section() called 3x in actor_on_item_take
Impact: low
Show code
Cache item:section() result

ui_popup_messages.script

L11 🔴 global_write
Global write: validGUI
Impact: low
Show code
validGUI = {
L115 🔴 global_write
Global write: ScalingPresets
Impact: low
Show code
ScalingPresets = {

Arrival

10 files (🟢18 🟡18 🔴73 🔵127)

arrival_environmental_particles.script

L43 🔴 global_write
Global write: dont_play_inside_particles
Impact: low
Show code
dont_play_inside_particles = {
L50 🔴 global_write
Global write: weather_to_particles
Impact: low
Show code
weather_to_particles = {

demonized_concurrent_queues.script

L50 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s is not table, abort", queue_table)
L55 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("queue %s is already active, abort", queue_name)
L46 🔴 global_write
Global write: active_queues
Impact: low
Show code
active_queues = {}

demonized_time_events.script

L24 🟢 uncached_globals_summary
Cache 1 globals in print_table
Impact: medium
Show code
L33: type L35: type
L36 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = function",k)
L39 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s",k,utils_data.vector_to_string(v))
L41 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = userdata", k)
L46 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = true",k)
L48 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = true")
L52 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = false", k)
L54 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = false")
L59 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s", k,v)
L61 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = nil", k,v)
L205 🟡 unused_local_variable
Local variable 'tg_past' is assigned but never used
Impact: low
Show code
local tg_past = 0

drx_da_main.script

L1816 🟢 table_insert_append
table.insert(objects, v) -> objects[#objects+1] = v
Impact: high
Show code
table.insert(objects, obj)
L1825 🟢 table_insert_append
table.insert(sec_to_obj[sec], v) -> sec_to_obj[sec][#sec_to_obj[sec]+1] = v
Impact: high
Show code
table.insert(sec_to_obj[sec], {
L91 🟢 string_len
string.len(pos) -> #pos
Impact: low
Show code
sub_print_r(val,indent..string.rep(" ",string.len(pos)+8))
L92 🟢 string_len
string.len(pos) -> #pos
Impact: low
Show code
printf(indent..string.rep(" ",string.len(pos)+6).."}")
L82 🟢 uncached_globals_summary
Cache 1 globals in sub_print_r
Impact: medium
Show code
L83: tostring L84: tostring
L868 🟢 repeated_alife
alife called 3x in clean_dynamic_anomalies_global
Impact: low
Show code
local sim = alife()
L1662 🟢 repeated_level_name
level.name called 5x in drx_da_actor_on_update_callback
Impact: low
Show code
local level_name = level.name()
L2044 🟢 repeated_device
device called 7x in <global>
Impact: low
Show code
local dev = device()
L2134 🟢 repeated_obj_section()
obj:section() called 4x in <global>
Impact: low
Show code
Cache obj:section() result
L2471 🟢 repeated_obj_id()
obj:id() called 5x in <global>
Impact: low
Show code
Cache obj:id() result
L3052 🟢 repeated_self_object_id()
self.object:id() called 6x in <global>
Impact: low
Show code
Cache self.object:id() result
L3252 🟢 repeated_level_name
level.name called 5x in actor_on_interaction
Impact: low
Show code
local level_name = level.name()
L84 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."*"..tostring(t))
L90 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."["..pos.."] => "..tostring(t).." {")
L92 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent..string.rep(" ",string.len(pos)+6).."}")
L94 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."["..pos.."] => "..tostring(val))
L98 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent..tostring(t))
L111 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(error_or_result)
L165 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("snd is nil")
L198 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("current_time %s, adding effect %s", time_elapsed, time_elapsed + (timer or 0))
L212 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
effect_function = effect_function and dump(effect_function),
L217 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
on_end_function = on_end_function and dump(on_end_function),
L268 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("removing effect, key %s", key)
L270 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("removing effect, firing on end, key %s", key)
L287 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("removing effect, effect timer %s, current_time %s", props.timer, time_elapsed)
L311 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("registering callback %s, key %s", callback, key)
L318 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("unregistering callback %s, %s", key, callbacks[key].callback)
L590 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("removed restriction %s for level %s", se_obj:name(), se_obj_level)
L656 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("adding anomaly %s to smart %s", se_obj:section_name(), smart_name)
L687 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("disabling anomaly %s, %s, level %s", g_obj:section(), g_obj:id(), level_name)
L705 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("enabling anomaly %s, %s, level %s", g_obj:section(), g_obj:id(), level_name)
L722 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error, object is not an anomaly, %s, %s, on level %s", obj:section_name(), obj.id, level_name)
L726 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("removing anomaly object %s, %s, on level %s", obj:section_name(), obj.id, level_name)
L795 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error, can't remove old anomaly %s, level %s, in restriction", anom_id, level_name)
L804 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("old anomalies already cleaned on level %s", level_name)
L812 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error, updated_anomaly_levels table not found for %s", level_name)
L834 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error, can't remove anomaly %s, level %s, in restriction", t[i], level_name)
L839 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Anomalies cleaned on level %s", level_name)
L888 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Deleting anomaly %s, %s globally, level %s", se_obj:section_name(), v1, k)
L892 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error, object is not an anomaly, %s, %s, on level %s", se_obj:section_name(), v1, k)
L909 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("can't delete anomaly %s globally, level %s, in restriction", v1, k)
L930 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error, can't remove old anomaly %s, level %s, in restriction", anom_id, k)
L939 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("old anomalies already cleaned on level %s", k)
L943 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Cleaned dynamic anomalies globally")
L956 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error: Unable to create dynamic anomaly field for %s, the specified smart location does not exist", smart_name)
L972 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Dynamic anomaly field %s spawned at %s, level %s", anomaly_type, smart_name, level_name)
L976 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error: failed to generate position")
L984 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("ltx file not found: %s", level_file_name)
L991 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Dynamic anomalies not spawned, spawn chance is 0")
L998 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Dynamic anomalies not spawned, max anomaly count is 0")
L1005 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Dynamic anomalies not spawned, max active count is 0")
L1028 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error, unable to get data for %s", level_name)
L1077 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("disable all new anomalies, found section %s", v)
L1088 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("anomaly %s is not enabled", v)
L1128 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("picked anomaly type %s", anomaly_type)
L1163 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("No dynamic anomaly types specified for level %s", level_name)
L1166 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("no anomalies spawn on smart %s, level %s in restriction", smart_name, level_name)
L1211 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error, anomaly %s failed to spawn correctly, releasing", anom_type)
L1225 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error: Unable to spawn dynamic anomaly")
L1232 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error: Unable to set dynamic anomaly properties")
L1339 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error: Unable to generate positional data, specified smart location does not exist")
L1399 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Anomaly type %s, Position data valid, distance %s, saving %s, %s, %s", anomaly_type, distance, pos_x, pos_y, pos_z)
L1403 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Anomaly type %s, Position data invalid, too close, distance %s, %s, %s, %s", anomaly_type, distance, pos_x, pos_y, pos_z)
L1407 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Anomaly type %s, Can't check position data %s, %s, %s", anomaly_type, pos_x, pos_y, pos_z)
L1413 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Anomaly type %s, Position data provided, saving %s, %s, %s", anomaly_type, pos_x, pos_y, pos_z)
L1425 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error: Unable to generate valid lvid pos, aborting")
L1443 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("releasing artefact %s, sec %s, level_name %s", k, v, level_name)
L1454 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error: Unable to create artefact %s, is nil", picked_artefact)
L1461 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error: Unable to create artefact for %s, the specified smart location does not exist", smart_name)
L1480 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Artefact %s, id %s spawned at %s, level %s", picked_artefact, artefact.id, smart_name, level_name)
L1484 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error: failed to generate position")
L1494 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error, unable to get data for %s", level_name)
L1521 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s has smarts with anomalies, try to spawn artefacts", level_name)
L1525 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("checking smart %s for spawning artefacts", smart_name)
L1527 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("try to spawn artefacts on smart %s", smart_name)
L1533 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("artefacts dice roll %s, chance %s, spawn %s", dice_roll, chance, dice_roll <= chance)
L1551 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("picking artefact by level %s, anomaly zone %s has defined arty list", level_name, anomaly_type)
L1554 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("picking artefact by level %s", level_name)
L1559 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("artefact is not allowed to spawn, repicking")
L1565 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("picking random artefacts")
L1570 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("failed to pick artefact by level, pick random from allowed, level_name %s, anomaly_type %s, has artefacts_map_tiers %s, has anomaly_type_to_artefacts %s", level_name, anomaly_type, artefacts_map_tiers ~= nil, anomaly_type_to_artefacts[anomaly_type] ~= nil)
L1588 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("picked artefact to spawn %s, anomaly_type %s, smart %s level %s", picked_artefact, anomaly_type, smart_name, level_name)
L1593 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("error, unabled to spawn artefact %s, anomaly_type %s, smart %s level %s", picked_artefact, anomaly_type, smart_name, level_name)
L1601 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s has no smarts with anomalies, dont spawn artefacts", level_name)
L1610 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error: Cannot update anomalies, db.actor not available")
L1617 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error: Cannot update anomalies, surge manager not available")
L1630 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error, failed to spawn anomalies")
L1635 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("updated anomalies on level %s", level_name)
L1644 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("anomalies not updated on level %s, no emission happened, last_surge_time %s, level update time %s", level_name, last_surge_time, updated_anomaly_levels[level_name].time)
L1664 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("saved level %s, current level %s", alife_storage_manager.get_state().drx_da_previous_level, level.name())
L1674 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("on the same level, only register behaviour")
L1700 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("anomalies updated, unregistering")
L1716 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("anomalies behaviour, anomalies not found for level %s", level_name)
L1728 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("anomalies behaviour, turning on behaviour for level %s", level_name)
L1982 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("trying to spawn poltergeist")
L2007 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("trying to multiply seed anomaly")
L2086 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("trying to spawn phantom")
L3260 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("surge happened globally at %s", last_surge_time)
L3261 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("update on level %s after emission", level.name())
L3268 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("surge happened globally at %s", get_time_elapsed())
L3269 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("update artefacts on level %s after emission", level.name())
L3281 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("taken created artefact %s, id %s, level_name %s", updated_anomaly_levels[level_name].artefacts[id], id, level_name)
L3295 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("change_time")
L3373 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("flash got hit %s", monster:section())
L3492 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("saving previous_level")
L3566 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("article not found for %s", section)
L3572 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("article already opened for %s", section)
L3578 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("youre too stupid for article boy")
L3633 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("time resetted for %s", k)
L3635 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("last_surge_time is 0")
L3653 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error, unable to get data for %s", level_name)
L3674 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Error, unable to get data for %s", level_name)
L3704 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("picked anomaly type %s", anomaly_type)
L3720 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("No dynamic anomaly types specified for level %s", level_name)
L3723 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("no anomalies spawn on smart %s, level %s in restriction", smart_name, level_name)
L3750 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("anomalies updated after surge on level %s", level_name)
L196 🔴 global_write
Global write: timed_effects
Impact: low
Show code
timed_effects = {}
L297 🔴 global_write
Global write: callbacks
Impact: low
Show code
callbacks = {}
L360 🔴 global_write
Global write: reduced_chance_levels
Impact: low
Show code
reduced_chance_levels = {
L374 🔴 global_write
Global write: anomaly_radii
Impact: low
Show code
anomaly_radii = {
L418 🔴 global_write
Global write: updated_anomaly_levels
Impact: low
Show code
updated_anomaly_levels = {}
L419 🔴 global_write
Global write: last_surge_time
Impact: low
Show code
last_surge_time = 0
L1288 🔴 global_write
Global write: small_levels
Impact: low
Show code
small_levels = {
L1294 🔴 global_write
Global write: anomalies_distance_check_ignore
Impact: low
Show code
anomalies_distance_check_ignore = {
L1314 🔴 global_write
Global write: anomalies_radiation_fields
Impact: low
Show code
anomalies_radiation_fields = {
L1709 🔴 global_write
Global write: anomalies_do_not_register_behaviour
Impact: low
Show code
anomalies_do_not_register_behaviour = {
L1769 🔴 global_write
Global write: anomalies_pos_tree
Impact: low
Show code
anomalies_pos_tree = nil
L1770 🔴 global_write
Global write: detectable_anomalies_pos_tree
Impact: low
Show code
detectable_anomalies_pos_tree = nil
L1771 🔴 global_write
Global write: detectable_anomalies_ids
Impact: low
Show code
detectable_anomalies_ids = {}
L1772 🔴 global_write
Global write: anomalies_obj_to_pos
Impact: low
Show code
anomalies_obj_to_pos = {}
L1773 🔴 global_write
Global write: anomalies_sec_to_obj
Impact: low
Show code
anomalies_sec_to_obj = {}
L1775 🔴 global_write
Global write: common_sec
Impact: low
Show code
common_sec = {
L1853 🔴 global_write
Global write: detectable_anomalies_pos_tree
Impact: low
Show code
detectable_anomalies_pos_tree = kd_tree.buildTreeSeObjectIds(t)
L1875 🔴 global_write
Global write: anomalies_vars
Impact: low
Show code
anomalies_vars = {
L1912 🔴 global_write
Global write: condition
Impact: low
Show code
condition = function() return true end
L1914 🔴 global_write
Global write: condition
Impact: low
Show code
condition = function() return false end
L1931 🔴 global_write
Global write: condition
Impact: low
Show code
condition = function() return true end
L1933 🔴 global_write
Global write: condition
Impact: low
Show code
condition = function() return false end
L1956 🔴 global_write
Global write: anomalies_near_actor_radii
Impact: low
Show code
anomalies_near_actor_radii = {
L1968 🔴 global_write
Global write: anomalies_near_actor_functions
Impact: low
Show code
anomalies_near_actor_functions = {
L2375 🔴 global_write
Global write: pda_glitch_value
Impact: low
Show code
pda_glitch_value = clamp(mine_factor ^ 0.5, 0, 1)
L2377 🔴 global_write
Global write: pda_glitch_value
Impact: low
Show code
pda_glitch_value = nil
L2442 🔴 global_write
Global write: pda_glitch_value
Impact: low
Show code
pda_glitch_value = clamp(mine_factor ^ 0.5, 0, 1)
L2444 🔴 global_write
Global write: pda_glitch_value
Impact: low
Show code
pda_glitch_value = nil
L2464 🔴 global_write
Global write: anomalies_spawn_functions
Impact: low
Show code
anomalies_spawn_functions = {
L2815 🔴 global_write
Global write: anomalies_destroy_functions
Impact: low
Show code
anomalies_destroy_functions = {
L2840 🔴 global_write
Global write: anomaly_detector_ignore
Impact: low
Show code
anomaly_detector_ignore = {
L2958 🔴 global_write
Global write: detector_functions
Impact: low
Show code
detector_functions = {
L3042 🔴 global_write
Global write: bind_anomaly_field_spawn
Impact: low
Show code
bind_anomaly_field_spawn = bind_anomaly_field.anomaly_field_binder.net_spawn
L3129 🔴 global_write
Global write: bind_anomaly_field_destroy
Impact: low
Show code
bind_anomaly_field_destroy = bind_anomaly_field.anomaly_field_binder.net_destroy
L3159 🔴 global_write
Global write: bind_anomaly_field_update
Impact: low
Show code
bind_anomaly_field_update = bind_anomaly_field.anomaly_field_binder.update
L3209 🔴 global_write
Global write: pda_glitch_value
Impact: low
Show code
pda_glitch_value = nil
L3210 🔴 global_write
Global write: process_glitch
Impact: low
Show code
process_glitch = item_device.device_binder.process_glitch
L3218 🔴 global_write
Global write: process_flicker
Impact: low
Show code
process_flicker = item_device.device_binder.process_flicker
L3223 🔴 global_write
Global write: process_torch
Impact: low
Show code
process_torch = item_device.device_binder.process_torch
L3258 🔴 global_write
Global write: last_surge_time
Impact: low
Show code
last_surge_time = get_time_elapsed()
L3291 🔴 global_write
Global write: anomalies_hit_functions
Impact: low
Show code
anomalies_hit_functions = {
L3369 🔴 global_write
Global write: anomalies_monster_hit_functions
Impact: low
Show code
anomalies_monster_hit_functions = {
L3395 🔴 global_write
Global write: npc_on_near_anomalies_functions
Impact: low
Show code
npc_on_near_anomalies_functions = {
L3458 🔴 global_write
Global write: timed_effects
Impact: low
Show code
timed_effects = t
L3460 🔴 global_write
Global write: last_surge_time
Impact: low
Show code
last_surge_time = m_data.drx_da_last_surge_time or 0
L3461 🔴 global_write
Global write: updated_anomaly_levels
Impact: low
Show code
updated_anomaly_levels = m_data.drx_da_updated_anomaly_levels or {}
L3462 🔴 global_write
Global write: opened_articles
Impact: low
Show code
if m_data.drx_da_opened_articles then opened_articles = m_data.drx_da_opened_articles end
L3539 🔴 global_write
Global write: additional_articles_to_category
Impact: low
Show code
additional_articles_to_category = {
L3558 🔴 global_write
Global write: opened_articles
Impact: low
Show code
opened_articles = {
L3612 🔴 global_write
Global write: InitArticles
Impact: low
Show code
InitArticles = ui_pda_encyclopedia_tab.pda_encyclopedia_tab.InitArticles
L3630 🔴 global_write
Global write: last_surge_time
Impact: low
Show code
last_surge_time = 0
L621 🟡 potential_nil_access
Potential nil access: 'obj' from :object() used without nil check
Impact: low
Show code
if not IsAnomaly(_, obj:clsid()) then
L686 🟡 potential_nil_access
Potential nil access: 'g_obj' from level.object_by_id() used without nil check
Impact: low
Show code
if g_obj and g_obj ~= 0 and g_obj:id() ~= 0 then
L704 🟡 potential_nil_access
Potential nil access: 'g_obj' from level.object_by_id() used without nil check
Impact: low
Show code
if g_obj and g_obj ~= 0 and g_obj:id() ~= 0 then
L764 🟡 potential_nil_access
Potential nil access: 'g_obj' from level.object_by_id() used without nil check
Impact: low
Show code
if g_obj and g_obj ~= 0 and g_obj:id() ~= 0 then
L2919 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local actor_pos = actor:position()
L3034 🟡 potential_nil_access
Potential nil access: 'detector' from :item_in_slot() used without nil check
Impact: low
Show code
local sec = detector and detector:section()
L3087 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local distance_to_sqr = self.object:position():distance_to_sqr(actor:position())
L3170 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local distance_to_sqr = self.object:position():distance_to_sqr(actor:position())
L3308 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:set_health_ex(health)
L3309 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_health(-random_float(0.01, 0.04))
L521 🟡 unused_local_variable
Local variable 'nearest_smart_id' is assigned but never used
Impact: low
Show code
local nearest_smart_id, nearest_smart_name = get_nearest_smart_id(se_obj)
L1801 🟡 unused_local_variable
Local variable 'sim_release' is assigned but never used
Impact: low
Show code
local sim_release = sim.release
L1043 🟡 unused_local_variable
Local variable 'table_remove' is assigned but never used
Impact: low
Show code
local table_remove = table.remove
L1693 🟡 unused_local_variable
Local variable 'updated' is assigned but never used
Impact: low
Show code
local updated = drx_da_update_dynamic_anomalies()
L2766 🟡 unused_local_variable
Local variable 'max_offset_y_low' is assigned but never used
Impact: low
Show code
local max_offset_y_low = spawn_position.y - max_offset_y
L2767 🟡 unused_local_variable
Local variable 'max_offset_y_high' is assigned but never used
Impact: low
Show code
local max_offset_y_high = spawn_position.y + max_offset_y
L3307 🟡 unused_local_variable
Local variable 'new_health' is assigned but never used
Impact: low
Show code
local new_health = actor.health

drx_da_main_artefacts.script

L11 🔴 global_write
Global write: allowed_artefacts
Impact: low
Show code
allowed_artefacts = (function() -- Allowed artefacts to spawn
L120 🔴 global_write
Global write: artefacts_map_chances
Impact: low
Show code
artefacts_map_chances = {
L138 🔴 global_write
Global write: artefacts_map_tiers
Impact: low
Show code
artefacts_map_tiers = {
L1877 🔴 global_write
Global write: anomaly_type_to_artefacts
Impact: low
Show code
anomaly_type_to_artefacts = {

drx_da_main_mcm.script

L143 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("DRX DA preset %s not found", p)
L2 🔴 global_write
Global write: new_anomalies_sections
Impact: low
Show code
new_anomalies_sections = {
L19 🔴 global_write
Global write: variations_anomalies_sections
Impact: low
Show code
variations_anomalies_sections = {
L30 🔴 global_write
Global write: presets
Impact: low
Show code
presets = {
L69 🔴 global_write
Global write: op_id
Impact: low
Show code
op_id = "drx_da"
L70 🔴 global_write
Global write: op_preset_id
Impact: low
Show code
op_preset_id = "presets"
L72 🔴 global_write
Global write: op
Impact: low
Show code
op = {
L193 🔴 global_write
Global write: MCM_Callback_List
Impact: low
Show code
MCM_Callback_List = ui_mcm.UIMCM.Callback_List

drx_da_main_traders.script

L1 🔴 global_write
Global write: get_param
Impact: low
Show code
get_param = utils_item.SYS_GetParam
L11 🔴 global_write
Global write: trade_table
Impact: low
Show code
trade_table = {
L40 🔴 global_write
Global write: spawn_chance
Impact: low
Show code
spawn_chance = 1
L73 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update

new_game_loadout_injector_mcm.script

L188 🟢 table_insert_append
table.insert(loadout_items[item_table.section], v) -> loadout_items[item_table.section][#loadout_items[item_table.section]+1] = v
Impact: high
Show code
table.insert(loadout_items[item_table.section], item_table)
L145 🟢 uncached_globals_summary
Cache 1 globals in add_item
Impact: medium
Show code
L146: type L159: type
L211 🟢 uncached_globals_summary
Cache 1 globals in ui_mm_faction_select.UINewGame.LoadLoadout
Impact: medium
Show code
L218: pairs L227: pairs
L78 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Loadout Injector: " .. str, ...)
L82 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!Loadout Injector: ERROR, " .. str, ...)
L109 🔴 global_write
Global write: loadout_items
Impact: low
Show code
loadout_items = {}
L112 🔴 global_write
Global write: loadout_removed_items
Impact: low
Show code
loadout_removed_items = {}

thirst_sleep_changer.script

L4 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(str, ...)
L38 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("thirst not enabled, nothing changed")
L57 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("thirst changed by %s%", perc)
L62 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("sleep not enabled, nothing changed")
L81 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("sleep changed by %s%", perc)
L86 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("thirst not enabled, nothing changed")
L105 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("thirst changed by %s%", perc * 0.1)
L110 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("sleep not enabled, nothing changed")
L129 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("sleep changed by %s%", perc * 0.1)

trader_autoinject.script

L34 🟢 repeated_npc_id()
npc:id() called 3x in trade_manager.update
Impact: low
Show code
Cache npc:id() result
L184 🟢 repeated_item_section()
item:section() called 4x in itr_inv
Impact: low
Show code
Cache item:section() result
L16 🔴 global_write
Global write: find
Impact: low
Show code
find = string.find
L32 🔴 global_write
Global write: TraderUpdate
Impact: low
Show code
TraderUpdate = trade_manager.update

ArszisControllerOverhaul

3 files (🟢9 🟡45 🔴5 🔵0)

arszi_controller.script

L877 🟢 uncached_globals_summary
Cache 1 globals in manage_controllers
Impact: medium
Show code
L882: pairs L889: pairs
L518 🟢 repeated_obj_id()
obj:id() called 3x in on_enemy_eval
Impact: low
Show code
Cache obj:id() result
L524 🟢 repeated_enemy_id()
enemy:id() called 3x in on_enemy_eval
Impact: low
Show code
Cache enemy:id() result
L620 🟢 repeated_npc_id()
npc:id() called 4x in monster_on_update
Impact: low
Show code
Cache npc:id() result
L643 🟢 repeated_npc_id()
npc:id() called 2x in npc_on_update
Impact: low
Show code
Cache npc:id() result
L742 🟢 repeated_npc_id()
npc:id() called 9x in take_control_npc
Impact: low
Show code
Cache npc:id() result
L811 🟢 repeated_monster_id()
monster:id() called 7x in take_control_monster
Impact: low
Show code
Cache monster:id() result
L1097 🟢 repeated_controlled_id()
controlled:id() called 5x in release_if_master_is_dead
Impact: low
Show code
Cache controlled:id() result
L1360 🔴 global_write
Global write: ShowMessage
Impact: low
Show code
ShowMessage = true
L1361 🔴 global_write
Global write: ShowMessageInit
Impact: low
Show code
ShowMessageInit = game.get_game_time()
L1362 🔴 global_write
Global write: ShowMessageTime
Impact: low
Show code
ShowMessageTime = time
L653 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
if (not obj or (obj and not obj:alive())) then
L664 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
if (not obj or (obj and not obj:alive())) then
L725 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_npc = sim:object(id)
L728 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local unreg = sim:object(unreg_id)
L730 🟡 potential_nil_access
Potential nil access: 'unreg' from :object() used without nil check
Impact: low
Show code
unreg:unregister_npc(se_npc)
L884 🟡 potential_nil_access
Potential nil access: 'controller' from level.object_by_id() used without nil check
Impact: low
Show code
if (controller and controller:alive()) then
L893 🟡 potential_nil_access
Potential nil access: 'minion' from level.object_by_id() used without nil check
Impact: low
Show code
trace_this("CONTROL MINION NPC: "..minion:name())
L894 🟡 potential_nil_access
Potential nil access: 'minion' from level.object_by_id() used without nil check
Impact: low
Show code
take_control_npc(minion, controller, minion:character_community(), false)
L896 🟡 potential_nil_access
Potential nil access: 'minion' from level.object_by_id() used without nil check
Impact: low
Show code
trace_this("CONTROL MINION MONSTER: "..minion:name())
L918 🟡 potential_nil_access
Potential nil access: 'monster' from level.object_by_id() used without nil check
Impact: low
Show code
if (monster and monster:alive()) then
L927 🟡 potential_nil_access
Potential nil access: 'npc' from level.object_by_id() used without nil check
Impact: low
Show code
if (npc and npc:alive()) then
L953 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
item_anim = itm:get_state()
L957 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
itm:switch_state(0)
L988 🟡 potential_nil_access
Potential nil access: 'controlled' from level.object_by_id() used without nil check
Impact: low
Show code
trace_this("ADD SCHEME controllable_stalker on load for: "..controlled:name())
L989 🟡 potential_nil_access
Potential nil access: 'controlled' from level.object_by_id() used without nil check
Impact: low
Show code
set_scheme(controlled, db.storage[controlled:id()], false, "scripts\\controllable_stalker.ltx", "logic", "", modules.stype_stalker)
L993 🟡 potential_nil_access
Potential nil access: 'controlled' from level.object_by_id() used without nil check
Impact: low
Show code
trace_this("ADD SCHEME controllable_monster on load for: "..controlled:name())
L994 🟡 potential_nil_access
Potential nil access: 'controlled' from level.object_by_id() used without nil check
Impact: low
Show code
set_scheme(controlled, db.storage[controlled:id()], false, "scripts\\controllable_monster.ltx", "logic", "", modules.stype_mobile)
L1006 🟡 potential_nil_access
Potential nil access: 'controlled' from level.object_by_id() used without nil check
Impact: low
Show code
local best_enemy = controlled and controlled:best_enemy()
L1045 🟡 potential_nil_access
Potential nil access: 'controlled' from level.object_by_id() used without nil check
Impact: low
Show code
if (controlled:alive() and master and not master:alive()) then
L1046 🟡 potential_nil_access
Potential nil access: 'controlled' from level.object_by_id() used without nil check
Impact: low
Show code
trace_this("MASTER: "..master:name().." OF CONTROLLED: "..controlled:name().." DIED, RELEASE")
L1051 🟡 potential_nil_access
Potential nil access: 'controlled' from level.object_by_id() used without nil check
Impact: low
Show code
if (not controlled:alive()) then
L1052 🟡 potential_nil_access
Potential nil access: 'controlled' from level.object_by_id() used without nil check
Impact: low
Show code
trace_this("CONTROLLED DIED, REMOVE FROM CONTROLLED TABLE: "..controlled:name())
L1064 🟡 potential_nil_access
Potential nil access: 'controlled' from :object() used without nil check
Impact: low
Show code
if (not controlled or (controlled and not controlled:alive())) then
L1076 🟡 potential_nil_access
Potential nil access: 'controller' from :object() used without nil check
Impact: low
Show code
if (not controller or ((controller and not controller:alive()))) then
L1255 🟡 potential_nil_access
Potential nil access: 'controller' from level.object_by_id() used without nil check
Impact: low
Show code
if (controller and controller:alive()) then
L1307 🟡 potential_nil_access
Potential nil access: 'smart' from level.object_by_id() used without nil check
Impact: low
Show code
smart_name = smart:name()
L492 🟡 unused_local_variable
Local variable 'arszi_wait_seconds_ingame' is assigned but never used
Impact: low
Show code
local arszi_wait_seconds_ingame = 0
L493 🟡 unused_local_variable
Local variable 'c_in_game_seconds_multiplier' is assigned but never used
Impact: low
Show code
local c_in_game_seconds_multiplier = 6 --6 in game seconds are one real life second

xr_controllable_monster.script

L13 🟡 unused_local_variable
Local variable 'c_anim_rush' is assigned but never used
Impact: low
Show code
local c_anim_rush = "run_fwd"
L14 🟡 unused_local_variable
Local variable 'c_anim_move' is assigned but never used
Impact: low
Show code
local c_anim_move = "run_fwd"
L18 🟡 unused_local_variable
Local variable 'c_walk_dist' is assigned but never used
Impact: low
Show code
local c_walk_dist = 5
L19 🟡 unused_local_variable
Local variable 'c_rush_dist' is assigned but never used
Impact: low
Show code
local c_rush_dist = 100

xr_controllable_stalker.script

L40 🟢 repeated_self_object_id()
self.object:id() called 5x in execute
Impact: low
Show code
Cache self.object:id() result
L6 🔴 global_write
Global write: controllable_stalker_evid
Impact: low
Show code
controllable_stalker_evid = 19999
L7 🔴 global_write
Global write: controllable_stalker_actid
Impact: low
Show code
controllable_stalker_actid = 19999
L18 🟡 potential_nil_access
Potential nil access: 'best_enemy' from :best_enemy() used without nil check
Impact: low
Show code
if (not arszi_controller.targets_master_or_minion(self.object:id(), best_enemy:id())) then
L68 🟡 potential_nil_access
Potential nil access: 'controlled' from level.object_by_id() used without nil check
Impact: low
Show code
if (string.match(controlled:section(), "devushka")) then
L101 🟡 potential_nil_access
Potential nil access: 'best_enemy' from :best_enemy() used without nil check
Impact: low
Show code
if (best_enemy and (arszi_controller.targets_master_or_minion(self.object:id(), best_enemy:id()))) then
L134 🟡 potential_nil_access
Potential nil access: 'controlled' from level.object_by_id() used without nil check
Impact: low
Show code
controlled:set_mental_state(anim.free)
L135 🟡 potential_nil_access
Potential nil access: 'controlled' from level.object_by_id() used without nil check
Impact: low
Show code
controlled:set_movement_type(move.walk)
L136 🟡 potential_nil_access
Potential nil access: 'controlled' from level.object_by_id() used without nil check
Impact: low
Show code
controlled:set_sight(look.path_dir,nil,0)
L137 🟡 potential_nil_access
Potential nil access: 'controlled' from level.object_by_id() used without nil check
Impact: low
Show code
controlled:set_path_type(game_object.level_path)
L139 🟡 potential_nil_access
Potential nil access: 'master' from level.object_by_id() used without nil check
Impact: low
Show code
local master_level_vertex_id = master:level_vertex_id()
L142 🟡 potential_nil_access
Potential nil access: 'controlled' from level.object_by_id() used without nil check
Impact: low
Show code
if (is_target_reached(controlled:position(), master:position())) then
L142 🟡 potential_nil_access
Potential nil access: 'master' from level.object_by_id() used without nil check
Impact: low
Show code
if (is_target_reached(controlled:position(), master:position())) then
L143 🟡 potential_nil_access
Potential nil access: 'controlled' from level.object_by_id() used without nil check
Impact: low
Show code
controlled:set_movement_type(move.stand)
L149 🟡 potential_nil_access
Potential nil access: 'controlled' from level.object_by_id() used without nil check
Impact: low
Show code
controlled:set_desired_position(master:position())
L149 🟡 potential_nil_access
Potential nil access: 'master' from level.object_by_id() used without nil check
Impact: low
Show code
controlled:set_desired_position(master:position())

ArtifactsInspectionv

1 file (🟢3 🟡0 🔴25 🔵0)

af_inspect.script

L73 🟢 uncached_globals_summary
Cache 1 globals in get_light_rgb
Impact: medium
Show code
L78: tonumber L79: tonumber
L30 🟢 repeated_itm_section()
itm:section() called 4x in inspect
Impact: low
Show code
Cache itm:section() result
L173 🟢 repeated_alife
alife called 2x in actor_on_first_update
Impact: low
Show code
local sim = alife()
L1 🔴 global_write
Global write: af_anim_item
Impact: low
Show code
af_anim_item = nil
L2 🔴 global_write
Global write: active_slot
Impact: low
Show code
active_slot = nil
L3 🔴 global_write
Global write: particle
Impact: low
Show code
particle = nil
L4 🔴 global_write
Global write: pos
Impact: low
Show code
pos = nil
L5 🔴 global_write
Global write: fov
Impact: low
Show code
fov = nil
L6 🔴 global_write
Global write: ini
Impact: low
Show code
ini = ini_file("mod_system_af_inspect_anim.ltx")
L7 🔴 global_write
Global write: particle
Impact: low
Show code
particle = particles_object("artefact\\effects\\af_idle_dist")
L9 🔴 global_write
Global write: containers
Impact: low
Show code
containers = {
L33 🔴 global_write
Global write: af_anim_item
Impact: low
Show code
af_anim_item = art .. "_hud"
L36 🔴 global_write
Global write: af_anim_item
Impact: low
Show code
af_anim_item = itm:section() .. "_hud"
L40 🔴 global_write
Global write: af_anim_item
Impact: low
Show code
af_anim_item = nil
L41 🔴 global_write
Global write: active_slot
Impact: low
Show code
active_slot = nil
L49 🔴 global_write
Global write: active_slot
Impact: low
Show code
active_slot = zzz_ea_addon_backpack.active_slot
L51 🔴 global_write
Global write: active_slot
Impact: low
Show code
active_slot = db.actor:active_slot()
L57 🔴 global_write
Global write: fov
Impact: low
Show code
fov = get_console():get_float("hud_fov")
L86 🔴 global_write
Global write: pos
Impact: low
Show code
pos = db.actor:bone_position("jaw_1"):add(device().cam_dir:mul(0.3))
L97 🔴 global_write
Global write: af_anim_item
Impact: low
Show code
af_anim_item = nil
L98 🔴 global_write
Global write: active_slot
Impact: low
Show code
active_slot = nil
L107 🔴 global_write
Global write: light
Impact: low
Show code
light = script_light()
L110 🔴 global_write
Global write: light_bright
Impact: low
Show code
light_bright = bright
L111 🔴 global_write
Global write: light_range
Impact: low
Show code
light_range = range
L127 🔴 global_write
Global write: light_flag
Impact: low
Show code
light_flag = true
L132 🔴 global_write
Global write: light_bright
Impact: low
Show code
light_bright = light_bright
L133 🔴 global_write
Global write: light_range
Impact: low
Show code
light_range = light_range
L155 🔴 global_write
Global write: light_flag
Impact: low
Show code
light_flag = false

Asnen's and Grok's Better Cigarettes Animations

2 files (🟢0 🟡1 🔴29 🔵7)

enhanced_animations.script

L122 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
if ea_debug then printf("speed is = "..speed) end
L167 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
if ea_debug then printf("update = "..failure_timer) end
L172 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("hide weapons for anim failed")
L173 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(used_item or (used_monster and used_monster:section()) or "anim find ERROR")
L174 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(anim_section or "NO ANIM SECTION FOUND")
L30 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = true
L31 🔴 global_write
Global write: mutant_loot_mod
Impact: low
Show code
mutant_loot_mod = true
L35 🔴 global_write
Global write: used_item
Impact: low
Show code
used_item,ea_flag,fake_monster,det_active,anim_section = nil
L35 🔴 global_write
Global write: ea_flag
Impact: low
Show code
used_item,ea_flag,fake_monster,det_active,anim_section = nil
L35 🔴 global_write
Global write: fake_monster
Impact: low
Show code
used_item,ea_flag,fake_monster,det_active,anim_section = nil
L35 🔴 global_write
Global write: det_active
Impact: low
Show code
used_item,ea_flag,fake_monster,det_active,anim_section = nil
L35 🔴 global_write
Global write: anim_section
Impact: low
Show code
used_item,ea_flag,fake_monster,det_active,anim_section = nil
L53 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = not enable_animations
L59 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = ui_mcm.get("EA_settings/enable_animations")
L60 🔴 global_write
Global write: mutant_loot_mod
Impact: low
Show code
mutant_loot_mod = false -- ui_mcm.get("EA_settings/mutant_loot")
L63 🔴 global_write
Global write: mutant_loot_mod
Impact: low
Show code
mutant_loot_mod = false
L67 🔴 global_write
Global write: mutant_loot_mod
Impact: low
Show code
mutant_loot_mod = ini_eff:r_bool_ex("anim_settings", "mutant_loot_mod")
L68 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = ui_options.get("video/player/animations")
L93 🔴 global_write
Global write: used_item
Impact: low
Show code
used_item = item
L95 🔴 global_write
Global write: anim_section
Impact: low
Show code
anim_section = ini_eff:r_string_ex(item, "anm")
L135 🔴 global_write
Global write: tmr
Impact: low
Show code
tmr = ini_eff:r_float_ex(used_item, "tm")
L153 🔴 global_write
Global write: tmr
Impact: low
Show code
tmr = ini_eff:r_float_ex("item_ea_harv_wpn_knife", "anim_length")
L189 🔴 global_write
Global write: anim_section
Impact: low
Show code
anim_section = nil
L289 🔴 global_write
Global write: used_item
Impact: low
Show code
used_item = nil
L300 🔴 global_write
Global write: fake_monster
Impact: low
Show code
fake_monster = used_monster
L302 🔴 global_write
Global write: ea_flag
Impact: low
Show code
ea_flag = true
L304 🔴 global_write
Global write: ea_flag
Impact: low
Show code
ea_flag = nil
L306 🔴 global_write
Global write: fake_monster
Impact: low
Show code
fake_monster = nil
L333 🔴 global_write
Global write: det_active
Impact: low
Show code
det_active = db.actor:active_detector() or nil

take_item_anim.script

L58 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(obj_o:section() .. " taken with id " .. obj_o:id())
L70 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(obj:section() .. " taken with id " .. obj:id())
L21 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = ui_mcm.get("EA_settings/enable_animations")
L24 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = ui_options.get("video/player/animations")
L27 🔴 global_write
Global write: enable_multipickup
Impact: low
Show code
enable_multipickup = ui_options.get("control/general/pickup_mode")
L77 🔴 global_write
Global write: active_slot
Impact: low
Show code
active_slot = db.actor:active_slot()
L129 🔴 global_write
Global write: slot
Impact: low
Show code
slot = nil
L52 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check (auto-fixable)
Impact: low
Show code
actor:take_item(obj_o)

Audio Expansion

12 files (🟢11 🟡18 🔴32 🔵7)

Footstep_script.script

L16 🟢 table_insert_append
table.insert(sounds, v) -> sounds[#sounds+1] = v
Impact: high
Show code
table.insert(sounds, sound)
L91 🟢 table_insert_append
table.insert(sound_queues[sound_type][actual_material], v) -> sound_queues[sound_type][actual_material][#sound_queues[sound_type][actual_material]+1] = v
Impact: high
Show code
table.insert(sound_queues[sound_type][actual_material], sound)
L1 🔴 global_write
Global write: available_materials
Impact: low
Show code
available_materials = {"wood", "default", "earth", "dirt", "metal", "water", "tin", "grass", "gravel", "asphalt", "tile", "concrete", "shifer", "setka", "soft"}

ambience_exp_mcm.script

L130 🟢 uncached_globals_summary
Cache 1 globals in random_without_repeat
Impact: medium
Show code
L132: math.random L134: math.random
L184 🟢 uncached_globals_summary
Cache 1 globals in random_position_from_plr
Impact: medium
Show code
L187: math.random L187: math.random
L228 🟢 uncached_globals_summary
Cache 1 globals in actor_on_first_update
Impact: medium
Show code
L230: math.random L233: math.random
L258 🟢 uncached_globals_summary
Cache 1 globals in combat_on_going
Impact: medium
Show code
L259: math.random L261: math.random
L282 🟢 uncached_globals_summary
Cache 1 globals in combat
Impact: medium
Show code
L285: math.random L287: math.random
L304 🟢 uncached_globals_summary
Cache 2 globals in actor_on_update
Impact: medium
Show code
L313: pairs L328: pairs L315: math.random L317: math.random
L114 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("ze table\n%s", utils_data.print_table(a, false, true))
L116 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(a)
L171 🟡 potential_nil_access
Potential nil access: 'player' from db.actor() used without nil check
Impact: low
Show code
if not (player and player:alive()) then return end
L32 🟡 unused_local_variable
Local variable 'base_pos_list' is assigned but never used
Impact: low
Show code
local base_pos_list = {
L68 🟡 unused_local_variable
Local variable 'random_footstep' is assigned but never used
Impact: low
Show code
local random_footstep = {chance = 0.02, sound_list_size = 3}
L72 🟡 unused_local_variable
Local variable 'rain_weather' is assigned but never used
Impact: low
Show code
local rain_weather = {"w_rain1","w_rain3","w_rain2","w_storm1","w_storm2"}

eft_jump_sounds.script

L49 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
fake_ladders_woods = true, -- невидимая деревянная лестница
L60 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
jump_sound.volume = volume_setting
L93 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
material = ray:get(position ,direction).result.material_name
L7 🔴 global_write
Global write: available_materials
Impact: low
Show code
available_materials = {
L40 🔴 global_write
Global write: fake_materials
Impact: low
Show code
wooden_board = true, -- Деревянная доска (толщина 2-5см), деревянный вагон, ящик
L50 🔴 global_write
Global write: material
Impact: low
Show code
fake_slide = true, -- Материал для колижена (нет звука, следов от пуль, теней)
L52 🔴 global_write
Global write: jump_sound
Impact: low
L62 🔴 global_write
Global write: material
Impact: low
Show code
end
L64 🔴 global_write
Global write: land_sound
Impact: low
Show code
function actor_on_land(landing_speed)
L78 🔴 global_write
Global write: actor_position
Impact: low
Show code
-- material = ray_cast()
L79 🔴 global_write
Global write: position
Impact: low
Show code
-- -- printf("!Material name: %s", material)
L80 🔴 global_write
Global write: direction
Impact: low
Show code
-- end
L81 🔴 global_write
Global write: range
Impact: low
L82 🔴 global_write
Global write: flags
Impact: low
Show code
function ray_cast()
L83 🔴 global_write
Global write: ray
Impact: low
Show code
actor_position = vector():set(db.actor:position())
L88 🔴 global_write
Global write: material
Impact: low
Show code
ray = demonized_geometry_ray.geometry_ray({
L91 🔴 global_write
Global write: material
Impact: low
Show code
visualize = false
L94 🔴 global_write
Global write: position
Impact: low
L95 🔴 global_write
Global write: direction
Impact: low
Show code
if material then
L96 🔴 global_write
Global write: range
Impact: low
Show code
material = string.gsub(material, "materials\\" , "")
L97 🔴 global_write
Global write: ray
Impact: low
Show code
if fake_materials[material] and fake_materials[material] == true then
L102 🔴 global_write
Global write: material
Impact: low
Show code
ray = demonized_geometry_ray.geometry_ray({
L104 🔴 global_write
Global write: material
Impact: low
Show code
flags = flags,

eft_jump_sounds_mcm.script

L2 🔴 global_write
Global write: op
Impact: low
Show code
op ={ id= "eft_jump_sounds",sh=true ,gr =

exo_servo_sounds.script

L2 🔴 global_write
Global write: exo_flag
Impact: low
Show code
exo_flag = false
L24 🔴 global_write
Global write: exo_flag
Impact: low
Show code
exo_flag = outfit and SYS_GetParam(0, outfit:section(), "repair_type") == "outfit_exo" -- and item_exo_device.is_psu(backpack)
L22 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local outfit = actor:item_in_slot(7)
L24 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
exo_flag = outfit and SYS_GetParam(0, outfit:section(), "repair_type") == "outfit_exo" -- and item_exo_device.is_psu(backpack)
L26 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local weight = SYS_GetParam(0, outfit:section(), "inv_weight")
L32 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local backpack = actor:item_in_slot(13)

exo_servo_sounds_mcm.script

L2 🔴 global_write
Global write: op
Impact: low
Show code
op ={ id= "exo_servo_sounds", sh=true ,gr =

freelook_state.script

L1 🔴 global_write
Global write: FreelookActive
Impact: low
Show code
FreelookActive = false
L7 🔴 global_write
Global write: FreelookActive
Impact: low
Show code
FreelookActive = true
L14 🔴 global_write
Global write: FreelookActive
Impact: low
Show code
FreelookActive = false

item_sounds.script

L7 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR itms_manager | play_item_sound | no object recieved!")

itemsounds.script

L16 🔴 global_write
Global write: bolt_switch
Impact: low
Show code
bolt_switch = bolt_deployed
L46 🔴 global_write
Global write: grenade_switch
Impact: low
Show code
grenade_switch = grenade_deployed

move_effects.script

L96 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local outfit_kind = outfit and SYS_GetParam(0, outfit:section(), "kind", -1)
L97 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local outfit_repair_type = outfit and SYS_GetParam(0, outfit:section(), "repair_type", -1)

psi_storm_manager.script

L123 🟢 uncached_globals_summary
Cache 1 globals in new_psi_storm_time
Impact: medium
Show code
L127: math.floor L132: math.floor
L193 🟢 uncached_globals_summary
Cache 1 globals in finish
Impact: medium
Show code
L206: pairs L216: pairs
L19 🔴 global_write
Global write: PsiStormManager
Impact: low
Show code
PsiStormManager = nil
L21 🔴 global_write
Global write: PsiStormManager
Impact: low
Show code
PsiStormManager = PsiStormManager or CPsiStormManager()
L507 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
se_npc = sim:object(id)
L509 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
squad = squad_id and sim:object(squad_id)
L545 🟡 potential_nil_access
Potential nil access: 'crow' from level.object_by_id() used without nil check
Impact: low
Show code
if(crow and crow:alive() and distance_2d(pos, crow:position())<25) then
L545 🟡 potential_nil_access
Potential nil access: 'crow' from level.object_by_id() used without nil check
Impact: low
Show code
if(crow and crow:alive() and distance_2d(pos, crow:position())<25) then
L29 🟡 unused_local_variable
Local variable 'prev_game_sec' is assigned but never used
Impact: low
Show code
local prev_game_sec = -1
L31 🟡 unused_local_variable
Local variable 'diff_game_sec' is assigned but never used
Impact: low
Show code
local diff_game_sec = -1
L563 🟡 unused_local_variable
Local variable 'time' is assigned but never used
Impact: low
Show code
local time = 0

z_npc_footsteps.script

L7 🟢 repeated_self_object_id()
self.object:id() called 8x in <global>
Impact: low
Show code
Cache self.object:id() result
L60 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("npc %s has invalid spawning vertex, correcting",se_obj:name())
L51 🟡 potential_nil_access
Potential nil access: 'ini' from :spawn_ini() used without nil check
Impact: low
Show code
local filename = ini and ini:r_string_ex("logic","cfg")

Autocomplete Tasks

3 files (🟢3 🟡0 🔴3 🔵12)

autocomplete_tasks_mcm.script

L1 🔴 global_write
Global write: defaults
Impact: low
Show code
defaults = {

autocomplete_tasks_utils.script

L7 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)

z_autocomplete_tasks_core.script

L235 🟢 table_insert_append
table.insert(cleaned_rewards, v) -> cleaned_rewards[#cleaned_rewards+1] = v
Impact: high
Show code
table.insert(cleaned_rewards, attrs)
L242 🟢 table_insert_append
table.insert(cleaned_rewards, v) -> cleaned_rewards[#cleaned_rewards+1] = v
Impact: high
Show code
table.insert(cleaned_rewards, {
L195 🟢 uncached_globals_summary
Cache 1 globals in calculate_task_compensation
Impact: medium
Show code
L207: tonumber L212: tonumber
L28 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[AT] Autocompleting task: %s", tid)
L103 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![AT] Couldn't send confirmation message: task giver is nil")
L112 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![AT] Couldn't send confirmation message: task giver is an invalid squad")
L121 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![AT] Couldn't send confirmation message: task giver is invalid with clsid %s", sender_obj.clsid and sender_obj:clsid())
L147 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![AT] An error occurred during post completion cleanup for %s: var is nil", task_id)
L153 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![AT] An error occurred during post completion cleanup for %s: spy_obj is nil", task_id)
L159 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![AT] An error occurred during post completion cleanup for %s: se_squad is nil", task_id)
L257 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[AT] Unable to autocomplete task: %s", tid)
L267 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[AT] Unable to get task info for task: %s", tid)
L346 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![AT] No compensation for task %s: on_complete attribute is non-existent or invalid", tsk_id)
L354 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![AT] No compensation for task %s: no compensation prices found", tsk_id)
L312 🔴 global_write
Global write: task_manager_task_callback
Impact: low
Show code
task_manager_task_callback = task_manager.task_callback
L371 🔴 global_write
Global write: sim_board_simulation_board_remove_squad
Impact: low
Show code
sim_board_simulation_board_remove_squad = sim_board.simulation_board.remove_squad

Barnacle's Double Click to Use Tools

1 file (🟢2 🟡0 🔴0 🔵0)

workshop_tool.script

L99 🟢 repeated_obj_section()
obj:section() called 6x in tool_workshop
Impact: low
Show code
Cache obj:section() result
L129 🟢 repeated_obj_section()
obj:section() called 6x in tool_artefact_craft
Impact: low
Show code
Cache obj:section() result

Beef's NVG Mod Fix

1 file (🟢4 🟡7 🔴3 🔵1)

z_beefs_nvgs.script

L96 🟢 uncached_globals_summary
Cache 2 globals in pack_nvg_data
Impact: medium
Show code
L97: tostring L98: tostring L99: math.floor L100: math.floor
L110 🟢 uncached_globals_summary
Cache 1 globals in pack_nvg_data_2
Impact: medium
Show code
L111: tostring L112: tostring
L125 🟢 repeated_get_console
get_console called 3x in update_nvgs
Impact: low
Show code
local console = get_console()
L452 🟢 repeated_get_console
get_console called 4x in actor_on_weapon_zoom_in
Impact: low
Show code
local console = get_console()
L640 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("beef_nvg: NVG state restored after level transition")
L161 🔴 global_write
Global write: play_animation
Impact: low
Show code
play_animation = false
L164 🔴 global_write
Global write: play_animation
Impact: low
Show code
play_animation = false
L538 🔴 global_write
Global write: tg
Impact: low
Show code
tg = time_global()
L457 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if wpn:weapon_scope_status() == 2 then
L458 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if wpn:weapon_is_scope() then
L460 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
scopeName = utils_item.get_param(scope, wpn:id(), "scope_texture", "string")
L463 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
scopeName = utils_item.get_param(wpn:section(), wpn:id(), "scope_texture", "string")
L463 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
scopeName = utils_item.get_param(wpn:section(), wpn:id(), "scope_texture", "string")
L139 🟡 unused_local_variable
Local variable 'lowered_anm_kinds' is assigned but never used
Impact: low
Show code
local lowered_anm_kinds = {
L146 🟡 unused_local_variable
Local variable 'lowered_anm_classes' is assigned but never used
Impact: low
Show code
local lowered_anm_classes = {

Beefys_Better_Scope_Reticles_For_GAMMA

1 file (🟢2 🟡0 🔴0 🔵0)

z_mark_switch.script

L130 🟢 repeated_get_console
get_console called 3x in update_shader
Impact: low
Show code
local console = get_console()
L178 🟢 repeated_wpn_id()
wpn:id() called 2x in actor_on_update
Impact: low
Show code
Cache wpn:id() result

Blood_Pools

2 files (🟢0 🟡0 🔴16 🔵10)

blood_pool.script

L35 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
_G.printf(...)
L167 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("removing pool %s, %s", npc_id, p)
L170 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("found vec to remove %s, %s", npc_id, p)
L183 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("body %s settled", npc_id)
L188 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("body %s still moving", npc_id)
L201 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("body %s is moved", npc_id)
L246 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("actor died, spawn pool")
L268 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s near blood pool", obj:name())
L297 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("heading %s", heading)
L325 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("placing bloodstep for %s", obj:name())
L13 🔴 global_write
Global write: settings
Impact: low
Show code
settings = load_defaults()
L16 🔴 global_write
Global write: settings
Impact: low
Show code
settings = load_defaults()
L39 🔴 global_write
Global write: pool_starts_in
Impact: low
Show code
pool_starts_in = 5
L40 🔴 global_write
Global write: blood_textures_amount
Impact: low
Show code
blood_textures_amount = 24
L41 🔴 global_write
Global write: pool_size_mult
Impact: low
Show code
pool_size_mult = {
L89 🔴 global_write
Global write: boneList
Impact: low
Show code
boneList = {
L108 🔴 global_write
Global write: saved_pool
Impact: low
Show code
saved_pool = {}
L109 🔴 global_write
Global write: alreadyLeakedPools
Impact: low
Show code
alreadyLeakedPools = {}
L257 🔴 global_write
Global write: stepMaxCount
Impact: low
Show code
stepMaxCount = 10
L258 🔴 global_write
Global write: size
Impact: low
Show code
size = 0.17
L259 🔴 global_write
Global write: triggerDistance
Impact: low
Show code
triggerDistance = 0.7^2
L260 🔴 global_write
Global write: texture
Impact: low
Show code
texture = "blood_step_"
L351 🔴 global_write
Global write: og_npc_on_foot_step
Impact: low
Show code
og_npc_on_foot_step = z_npc_footsteps.npc_on_foot_step
L357 🔴 global_write
Global write: net_spawn
Impact: low
Show code
net_spawn = xr_motivator.motivator_binder.net_spawn
L379 🔴 global_write
Global write: net_destroy
Impact: low
Show code
net_destroy = xr_motivator.motivator_binder.net_destroy

blood_pool_mcm.script

L1 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "blood_pool",sh=true ,gr={

Character Transfer

1 file (🟢17 🟡6 🔴5 🔵42)

character_transfer_mcm.script

L1019 🟢 table_insert_append
table.insert(stash_objects, v) -> stash_objects[#stash_objects+1] = v
Impact: high
Show code
table.insert(stash_objects, obj)
L1031 🟢 table_insert_append
table.insert(items_in_stash, v) -> items_in_stash[#items_in_stash+1] = v
Impact: high
Show code
table.insert(items_in_stash, item)
L1050 🟢 table_insert_append
table.insert(items_in_stash, v) -> items_in_stash[#items_in_stash+1] = v
Impact: high
Show code
table.insert(items_in_stash, item)
L1119 🟢 table_insert_append
table.insert(stash_objects, v) -> stash_objects[#stash_objects+1] = v
Impact: high
Show code
table.insert(stash_objects, obj)
L1125 🟢 table_insert_append
table.insert(stash_objects, v) -> stash_objects[#stash_objects+1] = v
Impact: high
Show code
table.insert(stash_objects, hidden)
L229 🟢 uncached_globals_summary
Cache 3 globals in export_gear
Impact: medium
Show code
L263: table.concat L360: table.concat L270: tostring L277: tostring L354: pairs L376: pairs
L543 🟢 uncached_globals_summary
Cache 1 globals in export_haruka_skills
Impact: medium
Show code
L550: tostring L551: tostring
L629 🟢 uncached_globals_summary
Cache 1 globals in export_anomalous_stash_items
Impact: medium
Show code
L651: table.concat L725: table.concat
L827 🟢 uncached_globals_summary
Cache 1 globals in export_info_portions
Impact: medium
Show code
L831: string.find L832: string.find
L1003 🟢 uncached_globals_summary
Cache 2 globals in prepare_stash_export
Impact: medium
Show code
L1023: ipairs L1035: ipairs L1061: tostring L1061: tostring
L1072 🟢 uncached_globals_summary
Cache 1 globals in compensate_distant_stashes
Impact: medium
Show code
L1085: tostring L1102: tostring
L1176 🟢 uncached_globals_summary
Cache 2 globals in export_nearby_stashes_items
Impact: medium
Show code
L1201: table.concat L1276: table.concat L1211: tostring L1218: tostring
L1376 🟢 uncached_globals_summary
Cache 4 globals in import_gear
Impact: medium
Show code
L1433: tonumber L1435: tonumber L1447: tostring L1673: tostring L1464: ipairs L1484: ipairs L1479: next L1502: next
L2145 🟢 uncached_globals_summary
Cache 1 globals in import_difficulty
Impact: medium
Show code
L2169: string.sub L2170: string.sub
L2323 🟢 uncached_globals_summary
Cache 3 globals in import_nearby_stashes
Impact: medium
Show code
L2355: tonumber L2357: tonumber L2382: ipairs L2401: ipairs L2396: next L2415: next
L2606 🟢 uncached_globals_summary
Cache 1 globals in import_haruka_skills
Impact: medium
Show code
L2627: tonumber L2628: tonumber
L2705 🟢 uncached_globals_summary
Cache 4 globals in import_anomalous_stash_items_poll
Impact: medium
Show code
L2729: tostring L2863: tostring L2744: tonumber L2746: tonumber L2765: ipairs L2784: ipairs L2779: next L2800: next
L2202 🟡 string_concat_in_loop
String concat in loop: name = name .. x
Impact: critical
Show code
name = name .. string.char(tonumber(b) or 32)
L173 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | Starting export...")
L223 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | Export complete!")
L341 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | WARNING: Magazine " .. sec .. " has no mag_data")
L385 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | Exported " .. tostring(idx) .. " items (" .. tostring(unique_count) .. " unique types)")
L386 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | " .. tostring(low_cond_items) .. " items with condition < 50%%")
L388 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | " .. tostring(mags_with_ammo) .. " magazines -> " .. tostring(total_mag_rounds) .. " rounds as loose ammo")
L499 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | Encyclopedia: no m_data found")
L507 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | Encyclopedia: no game_statistics found")
L522 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | Exported %d encyclopedia articles", idx)
L536 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | Exported %d encyclopedia notes/recipes", idx)
L591 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | Anomalous Stash: no hidden stash")
L597 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | Anomalous Stash: hidden stash object not found")
L616 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | Anomalous Stash: no items found")
L620 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | Anomalous Stash: moved %d items to inventory for export", item_count)
L737 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | Anomalous Stash: exported " .. tostring(idx) .. " items")
L766 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | Quick Action Wheel exported (" .. tostring(#qaw.tabs) .. " tabs)")
L855 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | Exported %d technician tool unlocks", idx)
L1063 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | Prepared stash export: " .. tostring(items_moved) .. " items from " .. tostring(stashes_found) .. " stashes")
L1104 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | Distant stash compensation: %d stashes x %d = %d RU", distant_stashes, backpack_price, compensation)
L1132 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | No nearby stashes found within " .. tostring(radius) .. " meters")
L1162 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | No items found in nearby stashes")
L1166 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | Moved %d items from stashes to inventory for export", item_count)
L1316 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | Exported " .. tostring(idx) .. " items from nearby stashes")
L1331 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | Starting import...")
L1363 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | Import complete!")
L1447 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | Skipping invalid section: " .. tostring(sec))
L1490 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | Added missing part %s:%s for %s", part, target_cond, sec)
L1673 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | Gear import: " .. tostring(imported) .. " items imported, " .. tostring(skipped) .. " skipped")
L1721 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | Spawned " .. tostring(total_rounds) .. " rounds from magazines as loose ammo")
L1923 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | Imported %d articles, %d notes/recipes", articles_count, notes_count)
L2033 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | Imported %d technician tool unlocks", count)
L2231 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | Companion squad section not found: " .. tostring(sec))
L2596 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | Imported " .. tostring(count) .. " items from nearby stashes")
L2640 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | Haruka Skills imported")
L2642 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | Haruka Skills data saved but mod not installed")
L2669 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | Anomalous Stash mod not installed, skipping")
L2683 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | Anomalous Stash - gave " .. tostring(total_backpacks) .. " backpacks")
L2729 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | Anomalous Stash: importing " .. tostring(item_count) .. " items")
L2733 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | Anomalous Stash: se_obj not found")
L2864 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | Anomalous Stash: imported " .. tostring(imported) .. " items")
L2888 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | Quick Action Wheel mod not installed, skipping")
L2947 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Character Transfer | Quick Action Wheel imported (" .. tostring(tab_count) .. " tabs)")
L14 🔴 global_write
Global write: defaults
Impact: low
Show code
defaults = {
L1393 🔴 global_write
Global write: evaluate_parts
Impact: low
Show code
evaluate_parts = function(obj) return nil end
L1669 🔴 global_write
Global write: evaluate_parts
Impact: low
Show code
evaluate_parts = original_global_evaluate_parts
L2343 🔴 global_write
Global write: evaluate_parts
Impact: low
Show code
evaluate_parts = function(obj) return nil end
L2593 🔴 global_write
Global write: evaluate_parts
Impact: low
Show code
evaluate_parts = original_global_evaluate_parts
L954 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
local name = obj:character_name() or ""
L955 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
local visual = obj:get_visual_name() or ""
L956 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
local comm = obj:character_community() or ""
L957 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
local money = obj:money() or 0
L970 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
local wpn = obj:active_item()

Cordon_Truce

2 files (🟢1 🟡5 🔴0 🔵0)

cordon_truce.script

L148 🟡 potential_nil_access
Potential nil access: 'manager' from :motivation_action_manager() used without nil check (auto-fixable)
Impact: low
Show code
manager:add_evaluator(EVAL_ID, evaluator_cordon_truce("cordon_truce", storage))
L159 🟡 potential_nil_access
Potential nil access: 'manager' from :motivation_action_manager() used without nil check
Impact: low
Show code
manager:add_action(ACTION_ID, temp.action)
L170 🟡 potential_nil_access
Potential nil access: 'manager' from :motivation_action_manager() used without nil check
Impact: low
Show code
local action = manager:action(id)
L4 🟡 unused_local_variable
Local variable 'MCM' is assigned but never used
Impact: low
Show code
local MCM = require "cordon_truce.lib.mcm"
L6 🟡 unused_local_variable
Local variable 'TABLE' is assigned but never used
Impact: low
Show code
local TABLE = require "cordon_truce.lib.table"

table.lua

L58 🟢 table_insert_append
table.insert(results, v) -> results[#results+1] = v
Impact: high
Show code
table.insert(results, rvalue)

CorpseTwitching

1 file (🟢2 🟡2 🔴9 🔵0)

impulse.script

L70 🟢 uncached_globals_summary
Cache 1 globals in impulse_corpse
Impact: medium
Show code
L74: math.random L75: math.random
L23 🟢 repeated_obj_id()
obj:id() called 3x in bullet_on_impact
Impact: low
Show code
Cache obj:id() result
L1 🔴 global_write
Global write: bones_list
Impact: low
Show code
bones_list = {
L8 🔴 global_write
Global write: timer_twitch
Impact: low
Show code
timer_twitch = 0
L9 🔴 global_write
Global write: corpses_to_update
Impact: low
Show code
corpses_to_update = {}
L10 🔴 global_write
Global write: time_factor
Impact: low
Show code
time_factor = 6
L11 🔴 global_write
Global write: basic_duration
Impact: low
Show code
basic_duration = 10
L13 🔴 global_write
Global write: time_factor
Impact: low
Show code
time_factor = SYS_GetParam(2,"alife","time_factor")
L55 🔴 global_write
Global write: timer_twitch
Impact: low
Show code
timer_twitch = tg + 50
L80 🔴 global_write
Global write: mul_h
Impact: low
Show code
mul_h = 1
L82 🔴 global_write
Global write: mul_h
Impact: low
Show code
mul_h = 3
L23 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
if obj and (IsStalker(obj)) and (not obj:alive()) and corpses_to_update[obj:id()] then
L23 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
if obj and (IsStalker(obj)) and (not obj:alive()) and corpses_to_update[obj:id()] then

Corpse_Fauna

2 files (🟢3 🟡1 🔴1 🔵1)

corpse_fauna.script

L17 🟢 repeated_npc_id()
npc:id() called 5x in npc_on_death_callback
Impact: low
Show code
Cache npc:id() result
L66 🟢 repeated_npc_id()
npc:id() called 3x in npc_on_net_destroy
Impact: low
Show code
Cache npc:id() result
L73 🟢 repeated_npc_id()
npc:id() called 3x in npc_on_net_spawn
Impact: low
Show code
Cache npc:id() result
L150 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L33 🟡 potential_nil_access
Potential nil access: 'npc' from level.object_by_id() used without nil check
Impact: low
Show code
pr("npc_id: %s || npc sec: %s || stage: %s || time: %s", npc_id, npc and npc:section(), t.stage, time_diff)

corpse_fauna_mcm.script

L13 🔴 global_write
Global write: op
Impact: low
Show code
op = {id= "corpse_fauna", sh=true , gr={

Critical_Hit Sound (s2 headshot)

3 files (🟢2 🟡12 🔴13 🔵2)

bones_lookup.script

L1668 🟢 repeated_target_id()
target:id() called 4x in getGrokDefuckulatorKey
Impact: low
Show code
Cache target:id() result
L1866 🟢 repeated_target_id()
target:id() called 4x in death_log_callback
Impact: low
Show code
Cache target:id() result
L1897 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L14 🔴 global_write
Global write: n
Impact: low
Show code
n = floor(max(n or 1, 1))
L19 🔴 global_write
Global write: n
Impact: low
Show code
n = n - 1
L25 🔴 global_write
Global write: death_log
Impact: low
Show code
death_log = {}
L1749 🔴 global_write
Global write: wpn
Impact: low
Show code
wpn = level.object_by_id(s_hit.weapon_id)
L1750 🔴 global_write
Global write: sec
Impact: low
Show code
sec = wpn:section()
L1767 🔴 global_write
Global write: silencer_boost
Impact: low
Show code
silencer_boost = 1.07
L1769 🔴 global_write
Global write: silencer_boost
Impact: low
Show code
silencer_boost = 1
L1773 🔴 global_write
Global write: silencer_boost
Impact: low
Show code
silencer_boost = 1.07
L1796 🔴 global_write
Global write: ammo_mult
Impact: low
Show code
ammo_mult = 1.00
L1799 🔴 global_write
Global write: ammo_mult
Impact: low
Show code
ammo_mult = 1.75
L1668 🟡 potential_nil_access
Potential nil access: 'player' from db.actor() used without nil check
Impact: low
Show code
if target:id() == player:id() then return end
L1669 🟡 potential_nil_access
Potential nil access: 'player' from db.actor() used without nil check
Impact: low
Show code
if shooter:id() ~= player:id() then return end
L1746 🟡 potential_nil_access
Potential nil access: 'player' from db.actor() used without nil check
Impact: low
Show code
if target:id() == player:id() then return end
L1747 🟡 potential_nil_access
Potential nil access: 'player' from db.actor() used without nil check
Impact: low
Show code
if shooter:id() ~= player:id() then return end
L1750 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
sec = wpn:section()
L1866 🟡 potential_nil_access
Potential nil access: 'player' from db.actor() used without nil check
Impact: low
Show code
if target:id() == player:id() then return end
L9 🟡 unused_local_variable
Local variable 'ltxOutfits' is assigned but never used
Impact: low
Show code
local ltxOutfits = ini_file( "plugins\\wepl_hit_effect_outfits.ltx" )
L1782 🟡 unused_local_variable
Local variable 'wm_size' is assigned but never used
Impact: low
Show code
local wm_size = ini_sys:r_float_ex(ammo_section, "wm_size") or 0.05

sound_feedback.script

L88 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! [sound_feedback] bones_lookup not found!")
L3 🔴 global_write
Global write: use_enable_human
Impact: low
Show code
use_enable_human = true
L4 🔴 global_write
Global write: use_enable_mutant
Impact: low
Show code
use_enable_mutant = true
L72 🟡 potential_nil_access
Potential nil access: 'player' from db.actor() used without nil check
Impact: low
Show code
if not shooter or shooter:id() ~= player:id() then return end
L73 🟡 potential_nil_access
Potential nil access: 'player' from db.actor() used without nil check
Impact: low
Show code
if target:id() == player:id() then return end
L74 🟡 potential_nil_access
Potential nil access: 'player' from db.actor() used without nil check
Impact: low
Show code
if not player:alive() then return end
L14 🟡 unused_local_variable
Local variable 'SOUND_SET_MAP' is assigned but never used
Impact: low
Show code
local SOUND_SET_MAP = {

sound_feedback_mcm.script

L2 🔴 global_write
Global write: op
Impact: low
Show code
op = {

DX9 Compatibility Patch

3 files (🟢3 🟡14 🔴19 🔵3)

fakelens.script

L1 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("DX9 mode")

item_device.script

L220 🟢 uncached_globals_summary
Cache 1 globals in on_key_release
Impact: medium
Show code
L247: math.floor L247: math.floor
L889 🟢 uncached_globals_summary
Cache 1 globals in process_flicker
Impact: medium
Show code
L901: math.random L902: math.random
L64 🟢 repeated_device
device called 4x in <global>
Impact: low
Show code
local dev = device()
L139 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR item_device | reading from items\\settings\\devices.ltx | section [%s] or power consumption values don't exist", sec)
L154 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("item_device | %s | " .. txt, time_global(), ...)
L18 🔴 global_write
Global write: dev_consumption
Impact: low
Show code
dev_consumption = {} -- [sec] = {...} | Power consumption of device per stage
L19 🔴 global_write
Global write: dev_consumption_act
Impact: low
Show code
dev_consumption_act = {} -- [sec] = {...} | Power consumption of device per action (stage 2)
L20 🔴 global_write
Global write: dev_consumption_tot
Impact: low
Show code
dev_consumption_tot = {} -- [sec] = num | Total power consumption of a device
L21 🔴 global_write
Global write: dev_critical
Impact: low
Show code
dev_critical = {} -- [sec] = num | Power limit, devices go off when their power go below this value
L40 🔴 global_write
Global write: devices
Impact: low
Show code
devices = {}
L41 🔴 global_write
Global write: device_battery
Impact: low
Show code
device_battery = nil
L42 🔴 global_write
Global write: device_geiger
Impact: low
Show code
device_geiger = nil
L43 🔴 global_write
Global write: device_npc_pda
Impact: low
Show code
device_npc_pda = {}
L61 🔴 global_write
Global write: nv_state
Impact: low
Show code
nv_state = false
L78 🔴 global_write
Global write: dosimeter_env_rads_mode
Impact: low
Show code
dosimeter_env_rads_mode = false
L93 🔴 global_write
Global write: device_battery
Impact: low
Show code
device_battery = ini_device:r_sec_ex("settings","battery","batteries_dead")
L94 🔴 global_write
Global write: device_geiger
Impact: low
Show code
device_geiger = ini_device:r_sec_ex("settings","geiger","detector_geiger")
L241 🔴 global_write
Global write: dosimeter_env_rads_mode
Impact: low
Show code
dosimeter_env_rads_mode = not dosimeter_env_rads_mode
L242 🔴 global_write
Global write: dosimeter_mode_string
Impact: low
Show code
dosimeter_mode_string = dosimeter_env_rads_mode and game.translate_string("st_environment_rads") or game.translate_string("st_actor_rads")
L593 🔴 global_write
Global write: nv_state
Impact: low
Show code
nv_state = true
L599 🔴 global_write
Global write: nv_state
Impact: low
Show code
nv_state = false
L233 🟡 potential_nil_access
Potential nil access: 'torch' from :item_in_slot() used without nil check
Impact: low
Show code
set_nightvision(torch and torch:section(), not nv_state)
L287 🟡 potential_nil_access
Potential nil access: 'pda' from :item_in_slot() used without nil check
Impact: low
Show code
if pda and (not temp_con[pda:id()]) then
L293 🟡 potential_nil_access
Potential nil access: 'det' from :item_in_slot() used without nil check
Impact: low
Show code
if det and (not temp_con[det:id()]) then
L299 🟡 potential_nil_access
Potential nil access: 'torch' from :item_in_slot() used without nil check
Impact: low
Show code
if torch and (not temp_con[torch:id()]) then
L310 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if (p and p:id() == AC_ID) then
L360 🟡 potential_nil_access
Potential nil access: 'obj' from :item_in_slot() used without nil check
Impact: low
Show code
if obj and IsItem("device",obj:section()) then
L367 🟡 potential_nil_access
Potential nil access: 'torch' from :item_in_slot() used without nil check
Impact: low
Show code
if torch and torch:torch_enabled() then
L421 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L432 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then
L525 🟡 potential_nil_access
Potential nil access: 'torch' from :item_in_slot() used without nil check
Impact: low
Show code
local id = torch and torch:id()
L569 🟡 potential_nil_access
Potential nil access: 'torch' from :item_in_slot() used without nil check
Impact: low
Show code
local torch_sec = torch and torch:section()
L632 🟡 potential_nil_access
Potential nil access: 'pda' from :item_in_slot() used without nil check
Impact: low
Show code
if actor_only and device_npc_pda[pda:section()] then
L695 🟡 potential_nil_access
Potential nil access: 'parent' from :parent() used without nil check
Impact: low
Show code
if parent and (parent:id() ~= AC_ID) then
L145 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, sec, value = ini_device:r_line_ex("npc_pda",i,"","")

z_vanilla_nvgs.script

L1 🔴 global_write
Global write: play_animation
Impact: low
Show code
play_animation = false
L24 🔴 global_write
Global write: play_animation
Impact: low
Show code
play_animation = false
L188 🔴 global_write
Global write: torch_anm_state
Impact: low
Show code
torch_anm_state = 0

Dark Valley Lamp Remover (better FPS at Bandit Base)

1 file (🟢1 🟡0 🔴1 🔵3)

dark_valley_lamp_remover.script

L9 🟢 repeated_obj_clsid()
obj:clsid() called 2x in actor_on_first_update
Impact: low
Show code
Cache obj:clsid() result
L6 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[dark_valley_lamp_remover] Initialization...")
L11 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[dark_valley_lamp_remover] Skipped placeable object: %s %s %s %s", id, obj:name(), obj:position().x, obj:position().z)
L13 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[dark_valley_lamp_remover] Object released: %s %s %s %s", id, obj:name(), obj:position().x, obj:position().z)
L8 🔴 global_write
Global write: obj
Impact: low
Show code
obj = db.storage[id] and db.storage[id].object or level.object_by_id(id)

Darkasleif's Nimble Upgrades Guns

1 file (🟢0 🟡0 🔴246 🔵0)

NimbleTrade.script

L8 🔴 global_write
Global write: CoonanCost
Impact: low
Show code
CoonanCost = 50000
L9 🔴 global_write
Global write: StrayerVoigtCost
Impact: low
Show code
StrayerVoigtCost = 75000
L10 🔴 global_write
Global write: DeagleCost
Impact: low
Show code
DeagleCost = 50000
L11 🔴 global_write
Global write: USPCost
Impact: low
Show code
USPCost = 30000
L12 🔴 global_write
Global write: ProtectaCost
Impact: low
Show code
ProtectaCost = 30000
L13 🔴 global_write
Global write: SPAS12Cost
Impact: low
Show code
SPAS12Cost = 30000
L14 🔴 global_write
Global write: TOZ34Cost
Impact: low
Show code
TOZ34Cost = 45000
L15 🔴 global_write
Global write: MP5Cost
Impact: low
Show code
MP5Cost = 65000
L16 🔴 global_write
Global write: G36Cost
Impact: low
Show code
G36Cost = 45000
L17 🔴 global_write
Global write: GrozaCost
Impact: low
Show code
GrozaCost = 45000
L18 🔴 global_write
Global write: PKMCost
Impact: low
Show code
PKMCost = 100000
L19 🔴 global_write
Global write: UrbanaCost
Impact: low
Show code
UrbanaCost = 45000
L20 🔴 global_write
Global write: SaboteurCost
Impact: low
Show code
SaboteurCost = 45000
L21 🔴 global_write
Global write: SVUCost
Impact: low
Show code
SVUCost = 45000
L30 🔴 global_write
Global write: obj
Impact: low
Show code
obj = item
L137 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911"
L147 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_alt"
L157 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_duty"
L167 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_merc"
L177 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_modern"
L187 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_n"
L197 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_new"
L207 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_kimber"
L224 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911"
L234 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_alt"
L244 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_duty"
L254 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_merc"
L264 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_modern"
L274 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_n"
L284 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_new"
L294 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_kimber"
L312 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_desert_eagle"
L322 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_desert_eagle_custom"
L332 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_desert_eagle_modern"
L349 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_usp"
L359 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_usp_custom"
L369 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_usp_match"
L386 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_protecta"
L396 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_protecta_aim"
L406 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_protecta_camo"
L416 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_protecta_custom"
L433 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_spas12"
L443 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_spas12_custom"
L460 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_toz34"
L470 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_toz34_custom"
L480 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_toz34_decor"
L490 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_toz34_mark4"
L507 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_mp5"
L517 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_mp5_alt"
L527 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_mp5_custom"
L544 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_g36"
L554 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_g36_camo"
L565 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_g36k"
L576 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_g36ka4_rwap"
L587 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_g36v_rwap"
L605 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_groza"
L623 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_pkm_siber"
L625 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_pkm"
L645 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_dvl10"
L663 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_dvl10_m1"
L681 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_svu"
L692 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_svu_alt"
L710 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911"
L720 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_alt"
L730 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_duty"
L740 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_merc"
L750 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_modern"
L760 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_n"
L770 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_new"
L780 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_kimber"
L797 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911"
L807 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_alt"
L817 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_duty"
L827 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_merc"
L837 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_modern"
L847 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_n"
L857 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_new"
L867 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_kimber"
L885 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_desert_eagle"
L895 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_desert_eagle_custom"
L905 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_desert_eagle_modern"
L922 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_usp"
L932 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_usp_custom"
L942 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_usp_match"
L959 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_protecta"
L969 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_protecta_aim"
L979 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_protecta_camo"
L989 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_protecta_custom"
L1006 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_spas12"
L1016 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_spas12_custom"
L1033 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_toz34"
L1043 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_toz34_custom"
L1053 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_toz34_decor"
L1063 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_toz34_mark4"
L1080 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_mp5"
L1090 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_mp5_alt"
L1100 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_mp5_custom"
L1117 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_g36"
L1127 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_g36_camo"
L1138 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_g36k"
L1149 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_g36ka4_rwap"
L1160 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_g36v_rwap"
L1178 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_groza"
L1196 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_pkm_siber"
L1214 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_dvl10"
L1232 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_dvl10_m1"
L1250 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_svu"
L1261 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_svu_alt"
L1279 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911"
L1289 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_alt"
L1299 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_duty"
L1309 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_merc"
L1319 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_modern"
L1329 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_n"
L1339 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_new"
L1349 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_kimber"
L1364 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911"
L1374 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_alt"
L1384 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_duty"
L1394 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_merc"
L1404 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_modern"
L1414 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_n"
L1424 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_new"
L1434 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_kimber"
L1450 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_desert_eagle"
L1460 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_desert_eagle_custom"
L1470 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_desert_eagle_modern"
L1485 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_usp"
L1495 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_usp_custom"
L1505 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_usp_match"
L1520 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_protecta"
L1530 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_protecta_aim"
L1540 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_protecta_camo"
L1550 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_protecta_custom"
L1565 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_spas12"
L1575 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_spas12_custom"
L1590 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_toz34"
L1600 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_toz34_custom"
L1610 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_toz34_decor"
L1620 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_toz34_mark4"
L1635 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_mp5"
L1645 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_mp5_alt"
L1655 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_mp5_custom"
L1670 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_g36"
L1680 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_g36_camo"
L1691 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_g36k"
L1702 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_g36ka4_rwap"
L1713 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_g36v_rwap"
L1729 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_groza"
L1745 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_pkm_siber"
L1761 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_dvl10"
L1777 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_dvl10_m1"
L1793 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_svu"
L1804 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_svu_alt"
L1820 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911"
L1830 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_alt"
L1840 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_duty"
L1850 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_merc"
L1860 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_modern"
L1870 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_n"
L1880 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_new"
L1890 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_kimber"
L1905 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911"
L1915 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_alt"
L1925 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_duty"
L1935 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_merc"
L1945 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_modern"
L1955 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_n"
L1965 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_new"
L1975 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_kimber"
L1991 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_desert_eagle"
L2001 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_desert_eagle_custom"
L2011 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_desert_eagle_modern"
L2026 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_usp"
L2036 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_usp_custom"
L2046 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_usp_match"
L2061 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_protecta"
L2071 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_protecta_aim"
L2081 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_protecta_camo"
L2091 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_protecta_custom"
L2106 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_spas12"
L2116 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_spas12_custom"
L2131 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_toz34"
L2141 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_toz34_custom"
L2151 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_toz34_decor"
L2161 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_toz34_mark4"
L2176 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_mp5"
L2186 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_mp5_alt"
L2196 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_mp5_custom"
L2211 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_g36"
L2221 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_g36_camo"
L2232 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_g36k"
L2243 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_g36ka4_rwap"
L2254 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_g36v_rwap"
L2270 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_groza"
L2286 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_pkm_siber"
L2302 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_dvl10"
L2318 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_dvl10_m1"
L2334 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_svu"
L2345 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_svu_alt"
L2363 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911"
L2375 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_alt"
L2387 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_duty"
L2399 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_merc"
L2411 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_modern"
L2423 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_n"
L2435 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_new"
L2447 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_kimber"
L2464 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911"
L2476 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_alt"
L2488 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_duty"
L2500 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_merc"
L2512 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_modern"
L2524 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_n"
L2536 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_new"
L2548 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_colt1911_kimber"
L2566 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_desert_eagle"
L2578 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_desert_eagle_custom"
L2590 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_desert_eagle_modern"
L2607 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_usp"
L2619 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_usp_custom"
L2631 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_usp_match"
L2648 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_protecta"
L2660 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_protecta_aim"
L2672 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_protecta_camo"
L2684 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_protecta_custom"
L2701 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_spas12"
L2713 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_spas12_custom"
L2730 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_toz34"
L2742 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_toz34_custom"
L2754 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_toz34_decor"
L2766 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_toz34_mark4"
L2783 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_mp5"
L2795 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_mp5_alt"
L2807 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_mp5_custom"
L2824 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_g36"
L2836 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_g36_camo"
L2849 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_g36k"
L2862 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_g36ka4_rwap"
L2875 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_g36v_rwap"
L2893 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_groza"
L2911 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_pkm_siber"
L2929 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_dvl10"
L2947 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_dvl10_m1"
L2965 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_svu"
L2978 🔴 global_write
Global write: wpn_name
Impact: low
Show code
wpn_name = "wpn_svu_alt"

Darkasleif's Parts Condition Color Thresholds Changes

1 file (🟢5 🟡2 🔴1 🔵6)

utils_xml.script

L641 🟢 table_insert_append
table.insert(stack, v) -> stack[#stack+1] = v
Impact: high
Show code
table.insert(stack, top)
L652 🟢 table_insert_append
table.insert(top.ChildNodes, v) -> top.ChildNodes[#top.ChildNodes+1] = v
Impact: high
Show code
table.insert(top.ChildNodes, {Name=label,Value=nil,Attributes=self:ParseArgs(xarg),ChildNodes={}})
L655 🟢 table_insert_append
table.insert(stack, v) -> stack[#stack+1] = v
Impact: high
Show code
table.insert(stack, top) -- new level
L665 🟢 table_insert_append
table.insert(top.ChildNodes, v) -> top.ChildNodes[#top.ChildNodes+1] = v
Impact: high
Show code
table.insert(top.ChildNodes, toclose)
L703 🟢 table_insert_append
table.insert(stack, v) -> stack[#stack+1] = v
Impact: high
Show code
table.insert(stack,node[i].ChildNodes)
L342 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR utils_xml.set_icon | XML_box or XML_temp doesn't exist")
L350 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR utils_xml.set_icon | section [%s] doesn't exist in system ini", sec)
L660 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("XmlParser: nothing to close with "..label)
L663 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("XmlParser: trying to close "..toclose.Name.." with "..label)
L674 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("XmlParser: unclosed "..stack[stack.n].Name)
L685 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(err)
L603 🔴 global_write
Global write: XmlParser
Impact: low
Show code
XmlParser = {}
L334 🟡 unused_local_variable
Local variable 'rw' is assigned but never used
Impact: low
Show code
local ico_size, rw, rh, _le = 0.7,1,1,50
L334 🟡 unused_local_variable
Local variable 'rh' is assigned but never used
Impact: low
Show code
local ico_size, rw, rh, _le = 0.7,1,1,50

Darkasleif's Stop Selling Documents

1 file (🟢7 🟡2 🔴11 🔵17)

dialogs.script

L257 🟢 table_insert_append
table.insert(text_list, v) -> text_list[#text_list+1] = v
Impact: high
Show code
table.insert( text_list, end_game_text )
L883 🟢 uncached_globals_summary
Cache 1 globals in text_trade_npc_pda
Impact: medium
Show code
L992: math.random L994: math.random
L1087 🟢 uncached_globals_summary
Cache 1 globals in surrender_victim_answers_bounty
Impact: medium
Show code
L1102: math.random L1104: math.random
L1132 🟢 uncached_globals_summary
Cache 1 globals in surrender_victim_answers_1
Impact: medium
Show code
L1135: math.random L1151: math.random
L2548 🟢 uncached_globals_summary
Cache 1 globals in trade_important_documents_reward
Impact: medium
Show code
L2572: math.random L2573: math.random
L678 🟢 repeated_npc_id()
npc:id() called 3x in npc_give_task
Impact: low
Show code
Cache npc:id() result
L1798 🟢 repeated_seller_id()
seller:id() called 4x in trade_init
Impact: low
Show code
Cache seller:id() result
L999 🟡 string_concat_in_loop
String concat in loop: npc_text = npc_text .. x
Impact: critical
Show code
npc_text = npc_text .. " " .. game.translate_string("st_drx_questlines_and_this_one") .. " "
L439 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL storyline task started: " .. last_task_id) )
L449 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL: drx_sl_task_giver_" .. giver_id .. " registered (" .. giver_task_count .. " outstanding)") )
L468 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL change factions task started: " .. last_task_id) )
L476 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL: drx_sl_task_giver_" .. giver_id .. " registered (" .. giver_task_count .. " outstanding)") )
L494 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL mechanic task started: " .. last_task_id) )
L500 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL: drx_sl_task_giver_" .. giver_id .. " registered (" .. giver_task_count .. " outstanding)") )
L516 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL dynamic task started: " .. last_task_id) )
L522 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL: drx_sl_task_giver_" .. giver_id .. " registered (" .. giver_task_count .. " outstanding)") )
L540 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL simulation task started: " .. last_task_id) )
L549 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL: drx_sl_task_giver_" .. giver_id .. " registered (" .. giver_task_count .. " outstanding)") )
L555 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL: drx_sl_hostage_giver_" .. giver_id .. " registered") )
L571 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL dynamic task started: " .. task_id) )
L576 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL: drx_sl_task_giver_" .. giver_id .. " registered (" .. giver_task_count .. " outstanding)") )
L590 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL simulation task started: " .. task_id) )
L595 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL: drx_sl_task_giver_" .. giver_id .. " registered (" .. giver_task_count .. " outstanding)") )
L1362 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Couldn't relocate money to NULL")
L1832 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Couldn't relocate money to NULL")
L80 🔴 global_write
Global write: last_task_id
Impact: low
Show code
last_task_id = nil
L176 🔴 global_write
Global write: last_task_id
Impact: low
Show code
last_task_id = task_section
L193 🔴 global_write
Global write: last_task_id
Impact: low
Show code
last_task_id = task_section
L210 🔴 global_write
Global write: last_task_id
Impact: low
Show code
last_task_id = task_section
L318 🔴 global_write
Global write: last_task_id
Impact: low
Show code
last_task_id = task_section
L328 🔴 global_write
Global write: last_task_id
Impact: low
Show code
last_task_id = task_section
L452 🔴 global_write
Global write: last_task_id
Impact: low
Show code
last_task_id = nil
L478 🔴 global_write
Global write: last_task_id
Impact: low
Show code
last_task_id = nil
L501 🔴 global_write
Global write: last_task_id
Impact: low
Show code
last_task_id = nil
L523 🔴 global_write
Global write: last_task_id
Impact: low
Show code
last_task_id = nil
L544 🔴 global_write
Global write: last_task_id
Impact: low
Show code
last_task_id = nil
L887 🟡 unused_local_variable
Local variable 'story_done' is assigned but never used
Impact: low
Show code
local story_done = has_alife_info( "warlab_deactivate_generators_done" )

Darkasleif's and iTheon's Parts Condition Color Thresholds Changes

2 files (🟢12 🟡9 🔴1 🔵6)

ui_item.script

L142 🟢 string_len
string.len(str) -> #str
Impact: low
Show code
local length = string.len(str)
L145 🟢 string_len
string.len(str) -> #str
Impact: low
Show code
length = string.len(str)
L168 🟢 string_len
string.len(str) -> #str
Impact: low
Show code
local length = string.len(str)
L171 🟢 string_len
string.len(str) -> #str
Impact: low
Show code
length = string.len(str)
L185 🟢 string_len
string.len(str) -> #str
Impact: low
Show code
local length = string.len(str)
L184 🟢 uncached_globals_summary
Cache 1 globals in remove_parentheses
Impact: medium
Show code
L188: string.sub L191: string.sub
L461 🟢 uncached_globals_summary
Cache 2 globals in build_desc_footer
Impact: medium
Show code
L528: math.abs L538: math.abs L576: tostring L583: tostring
L27 🟡 unused_local_variable
Local variable 'clr_b2' is assigned but never used
Impact: low
Show code
local clr_b2 = utils_xml.get_color("d_blue")
L30 🟡 unused_local_variable
Local variable 'clr_w' is assigned but never used
Impact: low
Show code
local clr_w = utils_xml.get_color("pda_white")
L38 🟡 unused_local_variable
Local variable 'last_sn_id' is assigned but never used
Impact: low
Show code
local last_sn_id = nil
L41 🟡 unused_local_variable
Local variable 'last_short_name_id' is assigned but never used
Impact: low
Show code
local last_short_name_id = nil
L435 🟡 unused_local_variable
Local variable 'break_con' is assigned but never used
Impact: low
Show code
local break_con = "af_aam"
L491 🟡 unused_local_variable
Local variable 'artefact_count' is assigned but never used
Impact: low
Show code
local artefact_count = ini_sys:r_float_ex(sec,"artefact_count") or 0
L493 🟡 unused_local_variable
Local variable 'additional_inventory_weight' is assigned but never used
Impact: low
Show code
local additional_inventory_weight = ini_sys:r_float_ex(sec,"additional_inventory_weight") or 0

utils_xml.script

L656 🟢 table_insert_append
table.insert(stack, v) -> stack[#stack+1] = v
Impact: high
Show code
table.insert(stack, top)
L667 🟢 table_insert_append
table.insert(top.ChildNodes, v) -> top.ChildNodes[#top.ChildNodes+1] = v
Impact: high
Show code
table.insert(top.ChildNodes, {Name=label,Value=nil,Attributes=self:ParseArgs(xarg),ChildNodes={}})
L670 🟢 table_insert_append
table.insert(stack, v) -> stack[#stack+1] = v
Impact: high
Show code
table.insert(stack, top) -- new level
L680 🟢 table_insert_append
table.insert(top.ChildNodes, v) -> top.ChildNodes[#top.ChildNodes+1] = v
Impact: high
Show code
table.insert(top.ChildNodes, toclose)
L718 🟢 table_insert_append
table.insert(stack, v) -> stack[#stack+1] = v
Impact: high
Show code
table.insert(stack,node[i].ChildNodes)
L357 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR utils_xml.set_icon | XML_box or XML_temp doesn't exist")
L365 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR utils_xml.set_icon | section [%s] doesn't exist in system ini", sec)
L675 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("XmlParser: nothing to close with "..label)
L678 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("XmlParser: trying to close "..toclose.Name.." with "..label)
L689 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("XmlParser: unclosed "..stack[stack.n].Name)
L700 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(err)
L618 🔴 global_write
Global write: XmlParser
Impact: low
Show code
XmlParser = {}
L349 🟡 unused_local_variable
Local variable 'rw' is assigned but never used
Impact: low
Show code
local ico_size, rw, rh, _le = 0.7,1,1,50
L349 🟡 unused_local_variable
Local variable 'rh' is assigned but never used
Impact: low
Show code
local ico_size, rw, rh, _le = 0.7,1,1,50

Demonized More Dangerous Phantoms

1 file (🟢0 🟡0 🔴3 🔵0)

more_dangerous_phantoms.script

L1 🔴 global_write
Global write: damage_radius
Impact: low
Show code
damage_radius = 3
L33 🔴 global_write
Global write: phantom_death
Impact: low
Show code
phantom_death = phantom_manager.Phantom.net_destroy
L39 🔴 global_write
Global write: DynamicPhantom_death
Impact: low
Show code
DynamicPhantom_death = phantom_manager.DynamicPhantom.net_destroy

Dialog_Dynamic_UI

2 files (🟢1 🟡0 🔴6 🔵1)

dialog_fov.script

L186 🟢 repeated_device
device called 4x in move_camera
Impact: low
Show code
local dev = device()
L50 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('bisect, lo must be non-negative')
L128 🔴 global_write
Global write: special_characters
Impact: low
Show code
special_characters = {
L333 🔴 global_write
Global write: settings
Impact: low
Show code
settings = load_defaults()
L336 🔴 global_write
Global write: settings
Impact: low
Show code
settings = load_defaults()

dialog_fov_mcm.script

L1 🔴 global_write
Global write: op_id
Impact: low
Show code
op_id = "demonized_dialog_fov"
L2 🔴 global_write
Global write: op_preset_id
Impact: low
Show code
op_preset_id = "presets"
L4 🔴 global_write
Global write: op
Impact: low
Show code
op = {

Draggable_Hud_Editor

2 files (🟢8 🟡16 🔴3 🔵14)

ui_debug_wpn_hud.script

L1562 🟢 string_len
string.len(sp) -> #sp
Impact: low
Show code
sp = string.sub(sp,0,string.len(sp)-1)
L742 🟢 uncached_globals_summary
Cache 1 globals in GetParameterValue
Impact: medium
Show code
L752: string.sub L753: string.sub
L760 🟢 uncached_globals_summary
Cache 1 globals in SetParameterValue
Impact: medium
Show code
L773: string.sub L774: string.sub
L790 🟢 uncached_globals_summary
Cache 1 globals in ApplyParameterValue
Impact: medium
Show code
L799: type L809: type
L837 🟢 uncached_globals_summary
Cache 1 globals in ApplyThirdPersonParameterValue
Impact: medium
Show code
L860: type L870: type
L1333 🟢 uncached_globals_summary
Cache 1 globals in saveParams
Impact: medium
Show code
L1335: pairs L1385: pairs
L1399 🟢 uncached_globals_summary
Cache 1 globals in saveThirdPersonParams
Impact: medium
Show code
L1401: pairs L1432: pairs
L1947 🟢 repeated_obj_id()
obj:id() called 3x in OnButtonThirdPerson
Impact: low
Show code
Cache obj:id() result
L1529 🟡 string_concat_in_loop
String concat in loop: p2 = p2 .. x
Impact: critical
Show code
p2 = p2 .. "_16x9"
L128 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L176 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! Ok... Something is fucked...")
L757 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR no returned value for %s!", parent)
L803 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! MISSING VALUE: WpnHudEditor:ApplyParameterValue(%s, %s)", typ ,parent)
L816 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! MISSING VALUE: WpnHudEditor:ApplyParameterValue(%s, %s)", typ ,parent)
L831 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! MISSING VALUE: WpnHudEditor:ApplyParameterValue(%s, %s)", typ ,parent)
L864 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! MISSING VALUE: third_person_value(%s,%s)", typ ,parent)
L877 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! MISSING VALUE: third_person_value(%s, %s)", typ ,parent)
L914 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(text, ...)
L1544 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("% WpnHudEditor | saving [%s]->[%s]->[%s]",sec, p[i], val)
L1553 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("% WpnHudEditor | saved changes for {%s}", fullpath)
L1660 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! group doesn't exist for selected_group: %s", self.data[v].selected_group)
L1848 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("- main_menu off")
L2127 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("axr_panic: no action id p[%s]",i)
L1987 🔴 global_write
Global write: actid
Impact: low
Show code
actid = 198122
L1988 🔴 global_write
Global write: evaid
Impact: low
Show code
evaid = 198122
L152 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
GUI = WpnHudEditor(owner, wpn and wpn:section() or det:section())
L152 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
GUI = WpnHudEditor(owner, wpn and wpn:section() or det:section())
L166 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
GUI.section = wpn and wpn:section() or det:section()
L2123 🟡 potential_nil_access
Potential nil access: 'manager' from :motivation_action_manager() used without nil check
Impact: low
Show code
action = manager:action(p[i])
L117 🟡 unused_local_variable
Local variable 'key_timer' is assigned but never used
Impact: low
Show code
local key_timer = 0
L269 🟡 unused_local_variable
Local variable 'w_fac' is assigned but never used
Impact: low
Show code
local w_fac = (1024/width)
L270 🟡 unused_local_variable
Local variable 'h_fac' is assigned but never used
Impact: low
Show code
local h_fac = (768/hight)
L271 🟡 unused_local_variable
Local variable 'thic' is assigned but never used
Impact: low
Show code
local thic = 2
L283 🟡 unused_local_variable
Local variable 'pos_w' is assigned but never used
Impact: low
Show code
local pos_w = self._w:GetWndPos()
L286 🟡 unused_local_variable
Local variable 'pos_h' is assigned but never used
Impact: low
Show code
local pos_h = self._h:GetWndPos()
L564 🟡 unused_local_variable
Local variable 'u' is assigned but never used
Impact: low
Show code
local d, u, r = generate_orthonormal_basis_normalized(dir)
L987 🟡 unused_local_variable
Local variable 'tg' is assigned but never used
Impact: low
Show code
local tg = 0
L988 🟡 unused_local_variable
Local variable 'tg_interval' is assigned but never used
Impact: low
Show code
local tg_interval = 20
L989 🟡 unused_local_variable
Local variable 'tg_print' is assigned but never used
Impact: low
Show code
local tg_print = 0
L1862 🟡 unused_local_variable
Local variable 'bind' is assigned but never used
Impact: low
Show code
local bind = dik_to_bind(dik)

ui_debug_wpn_hud_cancel_anims.script

L1 🔴 global_write
Global write: cancel_anims
Impact: low
Show code
cancel_anims = {

Drop_Disassemble_on_press_v

1 file (🟢0 🟡1 🔴9 🔵0)

z_drop_and_disassemble_item_mcm.script

L138 🔴 global_write
Global write: obj_tool
Impact: low
Show code
obj_tool = nil
L166 🔴 global_write
Global write: inventory_flag
Impact: low
Show code
inventory_flag = false
L167 🔴 global_write
Global write: gui_loot
Impact: low
Show code
gui_loot = false
L176 🔴 global_write
Global write: inventory_flag
Impact: low
Show code
inventory_flag = true
L177 🔴 global_write
Global write: gui_loot
Impact: low
Show code
gui_loot = false
L182 🔴 global_write
Global write: inventory_flag
Impact: low
Show code
inventory_flag = true
L183 🔴 global_write
Global write: gui_loot
Impact: low
Show code
gui_loot = true
L187 🔴 global_write
Global write: inventory_flag
Impact: low
Show code
inventory_flag = false
L188 🔴 global_write
Global write: gui_loot
Impact: low
Show code
gui_loot = false
L82 🟡 potential_nil_access
Potential nil access: 'tmp' from :item_in_slot() used without nil check
Impact: low
Show code
if tmp and obj_inp:id() == tmp:id() then

Drunks Enhanced Toxic Air

8 files (🟢17 🟡26 🔴16 🔵23)

custom_functor_autoinject.script

L114 🟢 string_len
string.len(pos) -> #pos
Impact: low
Show code
sub_print_r(val,indent..string.rep(" ",string.len(pos)+8))
L115 🟢 string_len
string.len(pos) -> #pos
Impact: low
Show code
printf(indent..string.rep(" ",string.len(pos)+6).."}")
L105 🟢 uncached_globals_summary
Cache 1 globals in sub_print_r
Impact: medium
Show code
L106: tostring L107: tostring
L128 🟢 uncached_globals_summary
Cache 1 globals in print_table
Impact: medium
Show code
L137: type L139: type
L107 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."*"..tostring(t))
L113 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."["..pos.."] => "..tostring(t).." {")
L115 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent..string.rep(" ",string.len(pos)+6).."}")
L117 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."["..pos.."] => "..tostring(val))
L121 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent..tostring(t))
L140 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = function",k)
L143 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s",k,utils_data.vector_to_string(v))
L145 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = userdata", k)
L150 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = true",k)
L152 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = true")
L156 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = false", k)
L158 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = false")
L163 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s", k,v)
L165 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = nil", k,v)
L319 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s, %s", k, v.index)
L322 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s, %s, max custom_functor reached", k, v.index)
L424 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Custom functors, processing queue")
L427 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Custom functors, type %s", v.type)
L464 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("functor slot is not valid, min 1, max 10, your slot: %s", slot)
L479 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("functor slot is not valid min 1, max 10, your slot: %s", slot)
L515 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[" .. k .. "] => ")
L98 🟡 unused_local_variable
Local variable 'table_remove' is assigned but never used
Impact: low
Show code
local table_remove = table.remove

demonized_crafter.script

L164 🟢 table_insert_append
table.insert(craft_recipes[tool][item], v) -> craft_recipes[tool][item][#craft_recipes[tool][item]+1] = v
Impact: high
Show code
table.insert(craft_recipes[tool][item], recipe)
L264 🟢 table_insert_append
table.insert(result_item_table, v) -> result_item_table[#result_item_table+1] = v
Impact: high
Show code
table.insert(result_item_table, res)
L148 🟢 uncached_globals_summary
Cache 1 globals in add_craft_recipe
Impact: medium
Show code
L150: pairs L154: pairs
L238 🟢 uncached_globals_summary
Cache 3 globals in add_craft_menu
Impact: medium
Show code
L241: pairs L242: pairs L246: ipairs L309: ipairs L257: tonumber L316: tonumber
L358 🟢 repeated_obj_id()
obj:id() called 3x in iterate
Impact: low
Show code
Cache obj:id() result
L273 🟡 string_concat_in_loop
String concat in loop: s = s .. x
Impact: critical
Show code
s = s .. item_name
L398 🟡 string_concat_in_loop
String concat in loop: s = s .. x
Impact: critical
Show code
s = s .. item_name .. ":" .. amount .. sep
L495 🟡 string_concat_in_loop
String concat in loop: tip_string = tip_string .. x
Impact: critical
Show code
tip_string = tip_string .. " \\n" .. ui_item.get_sec_name(recipe_item) .. ": " .. (craft_item_modes[recipe_item] and colorize("1") or (is_degradable(recipe_item) and colorize(round(recipe_amount * 100) .. "%") or colorize(recipe_amount)))
L515 🟡 string_concat_in_loop
String concat in loop: tip_string = tip_string .. x
Impact: critical
Show code
tip_string = tip_string .. " \\n" .. ui_item.get_sec_name(recipe_item) .. ": " .. (craft_item_modes[recipe_item] and colorize("1") or (is_degradable(recipe_item) and colorize(round(recipe_amount * 100) .. "%") or colorize(recipe_amount)))
L528 🟡 string_concat_in_loop
String concat in loop: failed_tip_string = failed_tip_string .. x
Impact: critical
Show code
failed_tip_string = failed_tip_string .. " \\n" .. ui_item.get_sec_name(recipe_item) .. ": " ..
L570 🟡 string_concat_in_loop
String concat in loop: failed_tip_string = failed_tip_string .. x
Impact: critical
Show code
failed_tip_string = failed_tip_string .. " \\n \\n" .. gc(craft_func_key .. "_craft_or") .. " \\n"
L143 🔴 global_write
Global write: craft_recipes
Impact: low
Show code
craft_recipes = {}
L144 🔴 global_write
Global write: craft_item_strings
Impact: low
Show code
craft_item_strings = {}
L367 🟡 potential_nil_access
Potential nil access: 'actor' from :parent() used without nil check
Impact: low
Show code
actor:iterate_inventory(iterate, actor)
L369 🟡 potential_nil_access
Potential nil access: 'actor' from :parent() used without nil check
Impact: low
Show code
actor:iterate_inventory_box(iterate, actor)
L371 🟡 potential_nil_access
Potential nil access: 'actor' from :parent() used without nil check
Impact: low
Show code
print_tip("item parent is undefined %s, %s", actor:name(), actor:section())
L371 🟡 potential_nil_access
Potential nil access: 'actor' from :parent() used without nil check
Impact: low
Show code
print_tip("item parent is undefined %s, %s", actor:name(), actor:section())

demonized_crafter_filters.script

L1 🔴 global_write
Global write: craft_recipes
Impact: low
Show code
craft_recipes = {

new_game_loadout_injector_mcm.script

L188 🟢 table_insert_append
table.insert(loadout_items[item_table.section], v) -> loadout_items[item_table.section][#loadout_items[item_table.section]+1] = v
Impact: high
Show code
table.insert(loadout_items[item_table.section], item_table)
L145 🟢 uncached_globals_summary
Cache 1 globals in add_item
Impact: medium
Show code
L146: type L159: type
L211 🟢 uncached_globals_summary
Cache 1 globals in ui_mm_faction_select.UINewGame.LoadLoadout
Impact: medium
Show code
L218: pairs L227: pairs
L78 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Loadout Injector: " .. str, ...)
L82 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!Loadout Injector: ERROR, " .. str, ...)
L109 🔴 global_write
Global write: loadout_items
Impact: low
Show code
loadout_items = {}
L112 🔴 global_write
Global write: loadout_removed_items
Impact: low
Show code
loadout_removed_items = {}

toxic_air.script

L172 🟢 repeated_level_name
level.name called 3x in actor_on_first_update
Impact: low
Show code
local level_name = level.name()
L625 🟢 repeated_obj_id()
obj:id() called 3x in get_cond_for_ui
Impact: low
Show code
Cache obj:id() result
L631 🟢 repeated_obj_section()
obj:section() called 3x in get_cond_for_ui
Impact: low
Show code
Cache obj:section() result
L641 🔴 global_write
Global write: BuildHeader
Impact: low
Show code
BuildHeader = ui_item.build_desc_header
L695 🔴 global_write
Global write: NameCustom
Impact: low
Show code
NameCustom = ui_inventory.UIInventory.Name_Custom
L706 🔴 global_write
Global write: ActionCustom
Impact: low
Show code
ActionCustom = ui_inventory.UIInventory.Action_Custom
L1203 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update
L1328 🔴 global_write
Global write: SpawnCosmetics
Impact: low
Show code
SpawnCosmetics = death_manager.spawn_cosmetics
L1336 🔴 global_write
Global write: base_add_bar
Impact: low
Show code
base_add_bar = utils_ui.UICellItem.Add_ProgressBar
L287 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
if (outfit and filters[outfit:id()]) or (helmet and filters[helmet:id()]) then
L287 🟡 potential_nil_access
Potential nil access: 'helmet' from :item_in_slot() used without nil check
Impact: low
Show code
if (outfit and filters[outfit:id()]) or (helmet and filters[helmet:id()]) then
L442 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local outfit_id = outfit and outfit:id()
L444 🟡 potential_nil_access
Potential nil access: 'helmet' from :item_in_slot() used without nil check
Impact: low
Show code
local helmet_id = helmet and helmet:id()
L477 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L488 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L501 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local outfit_id = outfit and outfit:id()
L503 🟡 potential_nil_access
Potential nil access: 'helmet' from :item_in_slot() used without nil check
Impact: low
Show code
local helmet_id = helmet and helmet:id()
L563 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local outfit_id = outfit and outfit:id()
L565 🟡 potential_nil_access
Potential nil access: 'helmet' from :item_in_slot() used without nil check
Impact: low
Show code
local helmet_id = helmet and helmet:id()
L252 🟡 unused_local_variable
Local variable 'headgear_radiation_protection' is assigned but never used
Impact: low
Show code
local headgear_radiation_protection = (helmet and get_radiation_protection(helmet)) or 0
L299 🟡 unused_local_variable
Local variable 'prevent_anm' is assigned but never used
Impact: low
Show code
local prevent_anm = false
L610 🟡 unused_local_variable
Local variable 'sim' is assigned but never used
Impact: low
Show code
local sim = alife()
L652 🟡 unused_local_variable
Local variable 'blue_clr' is assigned but never used
Impact: low
Show code
local blue_clr = utils_xml.get_color("d_blue")
L654 🟡 unused_local_variable
Local variable 'grey_clr_xml' is assigned but never used
Impact: low
Show code
local grey_clr_xml = utils_xml.get_color("ui_gray_2")

toxic_air_mcm.script

L23 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "toxic_air",sh=true ,gr={

trader_autoinject.script

L46 🟢 repeated_npc_id()
npc:id() called 3x in trade_manager.update
Impact: low
Show code
Cache npc:id() result
L196 🟢 repeated_item_section()
item:section() called 4x in itr_inv
Impact: low
Show code
Cache item:section() result
L28 🔴 global_write
Global write: find
Impact: low
Show code
find = string.find
L44 🔴 global_write
Global write: TraderUpdate
Impact: low
Show code
TraderUpdate = trade_manager.update

zzz_cxv_toxic_air_tank_filter_replenish_on_drag.script

L79 🔴 global_write
Global write: original_val
Impact: low
Show code
original_val = obj_2:condition()
L80 🔴 global_write
Global write: regen_val
Impact: low
Show code
regen_val = obj_1:condition()

Drunks Enhanced Toxic Air unofficial update

2 files (🟢3 🟡16 🔴7 🔵0)

toxic_air.script

L244 🟢 repeated_level_name
level.name called 3x in actor_on_first_update
Impact: low
Show code
local level_name = level.name()
L372 🟢 repeated_tank_id()
tank:id() called 4x in tank_in_belt
Impact: low
Show code
Cache tank:id() result
L986 🟢 repeated_tank_id()
tank:id() called 2x in actor_on_update
Impact: low
Show code
Cache tank:id() result
L779 🔴 global_write
Global write: BuildHeader
Impact: low
Show code
BuildHeader = ui_item.build_desc_header
L829 🔴 global_write
Global write: NameCustom
Impact: low
Show code
NameCustom = ui_inventory.UIInventory.Name_Custom
L840 🔴 global_write
Global write: ActionCustom
Impact: low
Show code
ActionCustom = ui_inventory.UIInventory.Action_Custom
L1436 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update
L1561 🔴 global_write
Global write: SpawnCosmetics
Impact: low
Show code
SpawnCosmetics = death_manager.spawn_cosmetics
L1569 🔴 global_write
Global write: base_add_bar
Impact: low
Show code
base_add_bar = utils_ui.UICellItem.Add_ProgressBar
L230 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if se_obj and oxt_tbl[se_obj:section_name()] then
L353 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
if (outfit and filters[outfit:id()]) or (helmet and filters[helmet:id()]) then
L353 🟡 potential_nil_access
Potential nil access: 'helmet' from :item_in_slot() used without nil check
Impact: low
Show code
if (outfit and filters[outfit:id()]) or (helmet and filters[helmet:id()]) then
L393 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
if (outfit and filters[outfit:id()]) or (helmet and filters[helmet:id()]) then
L604 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L615 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L637 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local outfit_id = outfit and outfit:id()
L639 🟡 potential_nil_access
Potential nil access: 'helmet' from :item_in_slot() used without nil check
Impact: low
Show code
local helmet_id = helmet and helmet:id()
L703 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local outfit_id = outfit and outfit:id()
L705 🟡 potential_nil_access
Potential nil access: 'helmet' from :item_in_slot() used without nil check
Impact: low
Show code
local helmet_id = helmet and helmet:id()
L974 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local outfit_id = outfit and outfit:id()
L975 🟡 potential_nil_access
Potential nil access: 'helmet' from :item_in_slot() used without nil check
Impact: low
Show code
local helmet_id = helmet and helmet:id()
L1766 🟡 potential_nil_access
Potential nil access: 'helmet' from :item_in_slot() used without nil check
Impact: low
Show code
if helmet and filters[helmet:id()] then
L1768 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
elseif outfit and filters[outfit:id()] then
L365 🟡 unused_local_variable
Local variable 'prevent_anm' is assigned but never used
Impact: low
Show code
local prevent_anm = false
L720 🟡 unused_local_variable
Local variable 'animations_enabled' is assigned but never used
Impact: low
Show code
local animations_enabled = cached_config.filter_animation

toxic_air_mcm.script

L34 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "toxic_air",sh=true ,gr={

Drunks_Enhanced_Toxic_Air

8 files (🟢17 🟡26 🔴16 🔵23)

custom_functor_autoinject.script

L114 🟢 string_len
string.len(pos) -> #pos
Impact: low
Show code
sub_print_r(val,indent..string.rep(" ",string.len(pos)+8))
L115 🟢 string_len
string.len(pos) -> #pos
Impact: low
Show code
printf(indent..string.rep(" ",string.len(pos)+6).."}")
L105 🟢 uncached_globals_summary
Cache 1 globals in sub_print_r
Impact: medium
Show code
L106: tostring L107: tostring
L128 🟢 uncached_globals_summary
Cache 1 globals in print_table
Impact: medium
Show code
L137: type L139: type
L107 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."*"..tostring(t))
L113 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."["..pos.."] => "..tostring(t).." {")
L115 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent..string.rep(" ",string.len(pos)+6).."}")
L117 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."["..pos.."] => "..tostring(val))
L121 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent..tostring(t))
L140 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = function",k)
L143 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s",k,utils_data.vector_to_string(v))
L145 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = userdata", k)
L150 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = true",k)
L152 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = true")
L156 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = false", k)
L158 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = false")
L163 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s", k,v)
L165 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = nil", k,v)
L319 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s, %s", k, v.index)
L322 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s, %s, max custom_functor reached", k, v.index)
L424 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Custom functors, processing queue")
L427 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Custom functors, type %s", v.type)
L464 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("functor slot is not valid, min 1, max 10, your slot: %s", slot)
L479 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("functor slot is not valid min 1, max 10, your slot: %s", slot)
L515 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[" .. k .. "] => ")
L98 🟡 unused_local_variable
Local variable 'table_remove' is assigned but never used
Impact: low
Show code
local table_remove = table.remove

demonized_crafter.script

L164 🟢 table_insert_append
table.insert(craft_recipes[tool][item], v) -> craft_recipes[tool][item][#craft_recipes[tool][item]+1] = v
Impact: high
Show code
table.insert(craft_recipes[tool][item], recipe)
L264 🟢 table_insert_append
table.insert(result_item_table, v) -> result_item_table[#result_item_table+1] = v
Impact: high
Show code
table.insert(result_item_table, res)
L148 🟢 uncached_globals_summary
Cache 1 globals in add_craft_recipe
Impact: medium
Show code
L150: pairs L154: pairs
L238 🟢 uncached_globals_summary
Cache 3 globals in add_craft_menu
Impact: medium
Show code
L241: pairs L242: pairs L246: ipairs L309: ipairs L257: tonumber L316: tonumber
L358 🟢 repeated_obj_id()
obj:id() called 3x in iterate
Impact: low
Show code
Cache obj:id() result
L273 🟡 string_concat_in_loop
String concat in loop: s = s .. x
Impact: critical
Show code
s = s .. item_name
L398 🟡 string_concat_in_loop
String concat in loop: s = s .. x
Impact: critical
Show code
s = s .. item_name .. ":" .. amount .. sep
L495 🟡 string_concat_in_loop
String concat in loop: tip_string = tip_string .. x
Impact: critical
Show code
tip_string = tip_string .. " \\n" .. ui_item.get_sec_name(recipe_item) .. ": " .. (craft_item_modes[recipe_item] and colorize("1") or (is_degradable(recipe_item) and colorize(round(recipe_amount * 100) .. "%") or colorize(recipe_amount)))
L515 🟡 string_concat_in_loop
String concat in loop: tip_string = tip_string .. x
Impact: critical
Show code
tip_string = tip_string .. " \\n" .. ui_item.get_sec_name(recipe_item) .. ": " .. (craft_item_modes[recipe_item] and colorize("1") or (is_degradable(recipe_item) and colorize(round(recipe_amount * 100) .. "%") or colorize(recipe_amount)))
L528 🟡 string_concat_in_loop
String concat in loop: failed_tip_string = failed_tip_string .. x
Impact: critical
Show code
failed_tip_string = failed_tip_string .. " \\n" .. ui_item.get_sec_name(recipe_item) .. ": " ..
L570 🟡 string_concat_in_loop
String concat in loop: failed_tip_string = failed_tip_string .. x
Impact: critical
Show code
failed_tip_string = failed_tip_string .. " \\n \\n" .. gc(craft_func_key .. "_craft_or") .. " \\n"
L143 🔴 global_write
Global write: craft_recipes
Impact: low
Show code
craft_recipes = {}
L144 🔴 global_write
Global write: craft_item_strings
Impact: low
Show code
craft_item_strings = {}
L367 🟡 potential_nil_access
Potential nil access: 'actor' from :parent() used without nil check
Impact: low
Show code
actor:iterate_inventory(iterate, actor)
L369 🟡 potential_nil_access
Potential nil access: 'actor' from :parent() used without nil check
Impact: low
Show code
actor:iterate_inventory_box(iterate, actor)
L371 🟡 potential_nil_access
Potential nil access: 'actor' from :parent() used without nil check
Impact: low
Show code
print_tip("item parent is undefined %s, %s", actor:name(), actor:section())
L371 🟡 potential_nil_access
Potential nil access: 'actor' from :parent() used without nil check
Impact: low
Show code
print_tip("item parent is undefined %s, %s", actor:name(), actor:section())

demonized_crafter_filters.script

L1 🔴 global_write
Global write: craft_recipes
Impact: low
Show code
craft_recipes = {

new_game_loadout_injector_mcm.script

L188 🟢 table_insert_append
table.insert(loadout_items[item_table.section], v) -> loadout_items[item_table.section][#loadout_items[item_table.section]+1] = v
Impact: high
Show code
table.insert(loadout_items[item_table.section], item_table)
L145 🟢 uncached_globals_summary
Cache 1 globals in add_item
Impact: medium
Show code
L146: type L159: type
L211 🟢 uncached_globals_summary
Cache 1 globals in ui_mm_faction_select.UINewGame.LoadLoadout
Impact: medium
Show code
L218: pairs L227: pairs
L78 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Loadout Injector: " .. str, ...)
L82 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!Loadout Injector: ERROR, " .. str, ...)
L109 🔴 global_write
Global write: loadout_items
Impact: low
Show code
loadout_items = {}
L112 🔴 global_write
Global write: loadout_removed_items
Impact: low
Show code
loadout_removed_items = {}

toxic_air.script

L169 🟢 repeated_level_name
level.name called 3x in actor_on_first_update
Impact: low
Show code
local level_name = level.name()
L624 🟢 repeated_obj_id()
obj:id() called 3x in get_cond_for_ui
Impact: low
Show code
Cache obj:id() result
L630 🟢 repeated_obj_section()
obj:section() called 3x in get_cond_for_ui
Impact: low
Show code
Cache obj:section() result
L640 🔴 global_write
Global write: BuildHeader
Impact: low
Show code
BuildHeader = ui_item.build_desc_header
L694 🔴 global_write
Global write: NameCustom
Impact: low
Show code
NameCustom = ui_inventory.UIInventory.Name_Custom
L705 🔴 global_write
Global write: ActionCustom
Impact: low
Show code
ActionCustom = ui_inventory.UIInventory.Action_Custom
L1185 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update
L1310 🔴 global_write
Global write: SpawnCosmetics
Impact: low
Show code
SpawnCosmetics = death_manager.spawn_cosmetics
L1318 🔴 global_write
Global write: base_add_bar
Impact: low
Show code
base_add_bar = utils_ui.UICellItem.Add_ProgressBar
L284 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
if (outfit and filters[outfit:id()]) or (helmet and filters[helmet:id()]) then
L284 🟡 potential_nil_access
Potential nil access: 'helmet' from :item_in_slot() used without nil check
Impact: low
Show code
if (outfit and filters[outfit:id()]) or (helmet and filters[helmet:id()]) then
L440 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local outfit_id = outfit and outfit:id()
L442 🟡 potential_nil_access
Potential nil access: 'helmet' from :item_in_slot() used without nil check
Impact: low
Show code
local helmet_id = helmet and helmet:id()
L476 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L487 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L500 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local outfit_id = outfit and outfit:id()
L502 🟡 potential_nil_access
Potential nil access: 'helmet' from :item_in_slot() used without nil check
Impact: low
Show code
local helmet_id = helmet and helmet:id()
L562 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local outfit_id = outfit and outfit:id()
L564 🟡 potential_nil_access
Potential nil access: 'helmet' from :item_in_slot() used without nil check
Impact: low
Show code
local helmet_id = helmet and helmet:id()
L249 🟡 unused_local_variable
Local variable 'headgear_radiation_protection' is assigned but never used
Impact: low
Show code
local headgear_radiation_protection = (helmet and get_radiation_protection(helmet)) or 0
L296 🟡 unused_local_variable
Local variable 'prevent_anm' is assigned but never used
Impact: low
Show code
local prevent_anm = false
L609 🟡 unused_local_variable
Local variable 'sim' is assigned but never used
Impact: low
Show code
local sim = alife()
L651 🟡 unused_local_variable
Local variable 'blue_clr' is assigned but never used
Impact: low
Show code
local blue_clr = utils_xml.get_color("d_blue")
L653 🟡 unused_local_variable
Local variable 'grey_clr_xml' is assigned but never used
Impact: low
Show code
local grey_clr_xml = utils_xml.get_color("ui_gray_2")

toxic_air_mcm.script

L23 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "toxic_air",sh=true ,gr={

trader_autoinject.script

L46 🟢 repeated_npc_id()
npc:id() called 3x in trade_manager.update
Impact: low
Show code
Cache npc:id() result
L196 🟢 repeated_item_section()
item:section() called 4x in itr_inv
Impact: low
Show code
Cache item:section() result
L28 🔴 global_write
Global write: find
Impact: low
Show code
find = string.find
L44 🔴 global_write
Global write: TraderUpdate
Impact: low
Show code
TraderUpdate = trade_manager.update

zzz_cxv_toxic_air_tank_filter_replenish_on_drag.script

L79 🔴 global_write
Global write: original_val
Impact: low
Show code
original_val = obj_2:condition()
L80 🔴 global_write
Global write: regen_val
Impact: low
Show code
regen_val = obj_1:condition()

Dynamic_Tonemap_Extended

3 files (🟢3 🟡1 🔴1 🔵9)

demonized_time_events.script

L24 🟢 uncached_globals_summary
Cache 1 globals in print_table
Impact: medium
Show code
L33: type L35: type
L36 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = function",k)
L39 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s",k,utils_data.vector_to_string(v))
L41 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = userdata", k)
L46 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = true",k)
L48 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = true")
L52 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = false", k)
L54 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = false")
L59 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s", k,v)
L61 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = nil", k,v)
L205 🟡 unused_local_variable
Local variable 'tg_past' is assigned but never used
Impact: low
Show code
local tg_past = 0

dynamic_tonemap.script

L160 🟢 repeated_get_console
get_console called 6x in set_tonemap_values
Impact: low
Show code
local console = get_console()
L286 🟢 repeated_get_console
get_console called 6x in reset_tonemapping
Impact: low
Show code
local console = get_console()

dynamic_tonemap_mcm.script

L2 🔴 global_write
Global write: op
Impact: low
Show code
op = {id = "dynamic_tonemap_extended", sh = true, gr = {

EnVy's Emisson Radio Warning

1 file (🟢3 🟡5 🔴10 🔵8)

surge_manager.script

L326 🟢 uncached_globals_summary
Cache 1 globals in new_surge_time
Impact: medium
Show code
L334: math.floor L339: math.floor
L403 🟢 uncached_globals_summary
Cache 1 globals in end_surge
Impact: medium
Show code
L430: pairs L435: pairs
L643 🟢 uncached_globals_summary
Cache 2 globals in update
Impact: medium
Show code
L676: math.ceil L755: math.ceil L691: math.abs L700: math.abs
L103 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Surge manager | " .. fmt,...)
L637 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("played sound at x=%s z=%s", rnd_pos.x, rnd_pos.z)
L705 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Played far crows")
L712 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Played medium crows")
L719 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Played close crows")
L726 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Played medium crows")
L733 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Played far crows")
L833 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("opt_blowout_task",ui_options.get("alife/event/emission_task"))
L24 🔴 global_write
Global write: SurgeManager
Impact: low
Show code
SurgeManager = nil
L26 🔴 global_write
Global write: SurgeManager
Impact: low
Show code
SurgeManager = SurgeManager or CSurgeManager()
L503 🔴 global_write
Global write: temp1
Impact: low
Show code
temp1, id, temp2 = ini:r_line("list", i, "", "")
L503 🔴 global_write
Global write: id
Impact: low
Show code
temp1, id, temp2 = ini:r_line("list", i, "", "")
L503 🔴 global_write
Global write: temp2
Impact: low
Show code
temp1, id, temp2 = ini:r_line("list", i, "", "")
L561 🔴 global_write
Global write: protection
Impact: low
Show code
protection = (suit_protection + helmet_protection + drug_protection)
L563 🔴 global_write
Global write: protection
Impact: low
Show code
protection = 1
L565 🔴 global_write
Global write: hit_power
Impact: low
Show code
hit_power=power*(1-protection)
L1265 🔴 global_write
Global write: currentIndik
Impact: low
Show code
currentIndik=nil
L1280 🔴 global_write
Global write: currentIndik
Impact: low
Show code
currentIndik=indik
L1382 🟡 potential_nil_access
Potential nil access: 'crow' from level.object_by_id() used without nil check
Impact: low
Show code
if (crow and crow:alive() and pos < crow:position().z) then
L1382 🟡 potential_nil_access
Potential nil access: 'crow' from level.object_by_id() used without nil check
Impact: low
Show code
if (crow and crow:alive() and pos < crow:position().z) then
L1419 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
se_npc = sim:object(id)
L1421 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
squad = squad_id and sim:object(squad_id)
L512 🟡 unused_local_variable
Local variable 'artefact_factors' is assigned but never used
Impact: low
Show code
local artefact_factors={10,5,10,10,10}

Fair Autocomplete

5 files (🟢29 🟡5 🔴11 🔵79)

fair_autocomplete_kill_tracker.script

L221 🟢 uncached_globals_summary
Cache 1 globals in record_kill
Impact: medium
Show code
L321: tostring L321: tostring
L497 🟢 uncached_globals_summary
Cache 1 globals in check_assault_task_requirement
Impact: medium
Show code
L518: tostring L524: tostring
L732 🟢 uncached_globals_summary
Cache 1 globals in cleanup_old_kills
Impact: medium
Show code
L740: pairs L764: pairs
L306 🟢 repeated_victim_section()
victim:section() called 3x in record_kill
Impact: low
Show code
Cache victim:section() result
L37 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L319 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA-KillTracker] Recorded kill: victim_id=%s, section=%s, monster_type=%s, smart=%s, faction=%s, by_player=%s, by_companion=%s, distance=%.1f, same_level=%s",
L112 🟡 unused_local_variable
Local variable 'lvid' is assigned but never used
Impact: low
Show code
local lvid = obj:level_vertex_id()
L113 🟡 unused_local_variable
Local variable 'gvid' is assigned but never used
Impact: low
Show code
local gvid = obj:game_vertex_id()

fair_autocomplete_task_info.script

L98 🟢 table_insert_append
table.insert(lines, v) -> lines[#lines+1] = v
Impact: high
Show code
table.insert(lines, name_str)
L110 🟢 table_insert_append
table.insert(lines, v) -> lines[#lines+1] = v
Impact: high
Show code
table.insert(lines, faction_str)
L123 🟢 table_insert_append
table.insert(lines, v) -> lines[#lines+1] = v
Impact: high
Show code
table.insert(lines, rank_str)
L137 🟢 table_insert_append
table.insert(lines, v) -> lines[#lines+1] = v
Impact: high
Show code
table.insert(lines, repu_str)
L156 🟢 table_insert_append
table.insert(lines, v) -> lines[#lines+1] = v
Impact: high
Show code
table.insert(lines, location_str)
L195 🟢 table_insert_append
table.insert(lines, v) -> lines[#lines+1] = v
Impact: high
Show code
table.insert(lines, type_str)
L212 🟢 table_insert_append
table.insert(lines, v) -> lines[#lines+1] = v
Impact: high
Show code
table.insert(lines, location_str)
L236 🟢 table_insert_append
table.insert(members, v) -> members[#members+1] = v
Impact: high
Show code
table.insert(members, desc)

fair_autocomplete_utils.script

L13 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L378 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![FA-Utils] Couldn't send confirmation message: task giver is nil")
L386 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![FA-Utils] Couldn't send confirmation message: task giver is an invalid squad")
L394 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![FA-Utils] Couldn't send confirmation message: task giver is invalid")
L457 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![FA-Utils] Error cancelling task %s: %s", task_id, tostring(err))
L478 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![FA-Utils] Error failing task %s: %s", task_id, tostring(err))
L502 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![FA-Utils] Error completing task %s: %s", task_id, tostring(err))

ui_pda_taskboard_tab.script

L279 🟢 table_insert_append
table.insert(npc_list, v) -> npc_list[#npc_list+1] = v
Impact: high
Show code
table.insert(npc_list, obj)
L289 🟢 table_insert_append
table.insert(npc_list, v) -> npc_list[#npc_list+1] = v
Impact: high
Show code
table.insert(npc_list, npc)
L342 🟢 table_insert_append
table.insert(result[task_effect], v) -> result[task_effect][#result[task_effect]+1] = v
Impact: high
Show code
table.insert(result[task_effect], {
L539 🟢 table_insert_append
table.insert(result, v) -> result[#result+1] = v
Impact: high
Show code
table.insert(result, key)
L209 🔵 debug_statement
Debug call: print()
Impact: medium
Show code
print("Warning: entry_info is nil for row_index:", row_index)
L214 🔵 debug_statement
Debug call: print()
Impact: medium
Show code
print("Warning: prev_task is nil for row_index:", row_index)
L124 🔴 global_write
Global write: currently_processed_npc_id
Impact: low
Show code
currently_processed_npc_id = nil -- required for fetch quest override
L126 🔴 global_write
Global write: currently_processed_npc_id
Impact: low
Show code
currently_processed_npc_id = task_data.npc_id
L141 🔴 global_write
Global write: currently_processed_npc_id
Impact: low
Show code
currently_processed_npc_id = nil
L164 🔴 global_write
Global write: currently_processed_npc_id
Impact: low
Show code
currently_processed_npc_id = task_details.npc_id
L166 🔴 global_write
Global write: currently_processed_npc_id
Impact: low
Show code
currently_processed_npc_id = nil
L312 🔴 global_write
Global write: currently_processed_npc_id
Impact: low
Show code
currently_processed_npc_id = npc:id()
L318 🔴 global_write
Global write: currently_processed_npc_id
Impact: low
Show code
currently_processed_npc_id = nil
L547 🔴 global_write
Global write: normalizer
Impact: low
Show code
normalizer = {
L569 🔴 global_write
Global write: config
Impact: low
Show code
config = load_defaults()
L572 🔴 global_write
Global write: config
Impact: low
Show code
config = load_defaults()
L384 🟡 potential_nil_access
Potential nil access: 'stalker' from level.object_by_id() used without nil check
Impact: low
Show code
local stalker_comm = stalker:character_community()
L385 🟡 potential_nil_access
Potential nil access: 'stalker' from level.object_by_id() used without nil check
Impact: low
Show code
local stalker_icon = stalker:character_icon()
L386 🟡 potential_nil_access
Potential nil access: 'stalker' from level.object_by_id() used without nil check
Impact: low
Show code
local stalker_name = stalker:character_name()

z_fair_autocomplete_core.script

L383 🟢 table_insert_append
table.insert(cleaned_rewards, v) -> cleaned_rewards[#cleaned_rewards+1] = v
Impact: high
Show code
table.insert(cleaned_rewards, attrs)
L390 🟢 table_insert_append
table.insert(cleaned_rewards, v) -> cleaned_rewards[#cleaned_rewards+1] = v
Impact: high
Show code
table.insert(cleaned_rewards, {
L547 🟢 table_insert_append
table.insert(var_keys, v) -> var_keys[#var_keys+1] = v
Impact: high
Show code
table.insert(var_keys, tostring(k) .. "=" .. tostring(v))
L1561 🟢 table_insert_append
table.insert(tasks_to_complete, v) -> tasks_to_complete[#tasks_to_complete+1] = v
Impact: high
Show code
table.insert(tasks_to_complete, {
L1568 🟢 table_insert_append
table.insert(tasks_to_cancel, v) -> tasks_to_cancel[#tasks_to_cancel+1] = v
Impact: high
Show code
table.insert(tasks_to_cancel, {
L319 🟢 uncached_globals_summary
Cache 1 globals in calculate_task_compensation
Impact: medium
Show code
L342: tonumber L347: tonumber
L422 🟢 uncached_globals_summary
Cache 1 globals in register_task
Impact: medium
Show code
L493: tostring L511: tostring
L650 🟢 uncached_globals_summary
Cache 1 globals in section_matches
Impact: medium
Show code
L666: string.find L678: string.find
L755 🟢 uncached_globals_summary
Cache 1 globals in validate_assault_kill
Impact: medium
Show code
L821: tostring L821: tostring
L973 🟢 uncached_globals_summary
Cache 3 globals in validate_mutant_hunt_kill
Impact: medium
Show code
L1002: type L1011: type L1047: tostring L1063: tostring L1134: pairs L1146: pairs
L1251 🟢 uncached_globals_summary
Cache 1 globals in should_autocomplete
Impact: medium
Show code
L1368: tostring L1368: tostring
L1510 🟢 uncached_globals_summary
Cache 1 globals in do_autocompletion
Impact: medium
Show code
L1552: tostring L1552: tostring
L1652 🟢 uncached_globals_summary
Cache 2 globals in actor_on_first_update
Impact: medium
Show code
L1658: math.max L1664: math.max L1658: tonumber L1664: tonumber
L4 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] Core script loading...")
L277 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] Couldn't send completion message: task giver is nil")
L285 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] Couldn't send completion message: task giver is an invalid squad")
L293 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] Couldn't send completion message: task giver is invalid")
L411 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] Cached compensation for task %s: %d-%d RU", task_id,
L428 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] Task re-registered (re-taken): %s - updated timestamp", task_id)
L493 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] Got mutant section from squad.player_id: " .. tostring(squad.player_id))
L511 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] Got mutant section from squad member: " .. tostring(reg_data.mutant_section))
L549 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] mutant_hunt var dump for " .. task_id .. ": " .. table.concat(var_keys, ", "))
L562 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] Registered mutant_hunt task: " .. task_id .. " section=" .. tostring(reg_data.mutant_section) .. " smart=" .. tostring(reg_data.smart_terrain))
L597 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] Fixed invalid registered_time, new value: " .. tostring(reg.registered_time))
L777 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] validate_assault: got position from alife_object")
L789 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] validate_assault: got position from smarts_by_names")
L799 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] validate_assault: got position from smarts iteration")
L812 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] validate_assault: got position from smarts by ID")
L821 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] validate_assault: task=" .. tostring(task_id) .. " smart_terrain=" .. tostring(smart_name) .. " smart_id=" .. tostring(smart_id) .. " has_position=" .. tostring(smart_position ~= nil))
L852 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] validate_assault: kill within " .. string.format("%.1f", dist) .. "m of smart terrain")
L854 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] validate_assault: kill too far - " .. string.format("%.1f", dist) .. "m from smart terrain")
L868 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] validate_assault: matched kill - section=" .. tostring(kill_data.section) .. " is_monster=" .. tostring(kill_data.is_monster) .. " location_match=" .. tostring(location_match) .. " nearby_match=" .. tostring(nearby_match))
L877 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] validate_assault: player_kills=" .. tostring(player_kills) .. " (at_location=" .. tostring(player_kills_at_location) .. " nearby=" .. tostring(player_kills_nearby) .. ") total=" .. tostring(total_kills_at_location) .. " at " .. tostring(smart_name))
L883 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] validate_assault: kill_req=" .. tostring(kill_req) .. " player_kills=" .. tostring(player_kills))
L1047 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] Got mutant section from squad.player_id: " .. tostring(squad.player_id))
L1063 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] Got mutant section from squad member: " .. tostring(required_section))
L1098 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] validate_mutant_hunt: task=" .. tostring(task_id) .. ", section=" .. tostring(required_section) .. ", smart=" .. tostring(smart_name) .. ", target_id=" .. tostring(target_id) .. ", reg_time=" .. tostring(task_registered_time))
L1114 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] validate_mutant_hunt: can't validate - unknown section AND location")
L1123 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] validate_mutant_hunt: using loose matching (old task without section info)")
L1144 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] Kill tracker stats: total=" .. total_in_tracker .. " player_monsters=" .. player_monster_kills .. " npc_monsters=" .. npc_monster_kills)
L1153 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] validate_mutant_hunt: skipping kill section=" .. tostring(kill_data.section) .. " monster_type=" .. tostring(kill_data.monster_type) .. " (required=" .. tostring(required_section) .. ")")
L1164 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] validate_mutant_hunt: matched kill at location, section=" .. tostring(kill_data.section) .. " monster_type=" .. tostring(kill_data.monster_type))
L1175 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] validate_mutant_hunt: matched kill at dist=" .. string.format("%.1f", dist) .. " section=" .. tostring(kill_data.section))
L1180 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] validate_mutant_hunt: skipping old kill (kill_time=" .. tostring(kill_time) .. " < reg_time=" .. tostring(task_registered_time) .. ")")
L1187 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] validate_mutant_hunt RESULT: kills_at_location=" .. tostring(kills_at_location) .. " -> PASS")
L1192 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] validate_mutant_hunt RESULT: kills_nearby=" .. tostring(kills_nearby) .. " -> PASS")
L1213 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] validate_mutant_hunt RESULT: matching_monster_kills=" .. tostring(matching_monster_kills) .. " (required=" .. tostring(required_section) .. ") -> PASS (fallback)")
L1218 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] validate_mutant_hunt RESULT: no player kills -> FAIL")
L1354 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] Using whitelist stage override for %s: %d", task_id, whitelist_stage_override)
L1368 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] Task " .. tostring(task_id) .. " type=" .. tostring(task_type) .. " require_player_kill=true")
L1373 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] bounty validation: valid=" .. tostring(valid) .. " reason=" .. tostring(reason))
L1377 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] assault validation: valid=" .. tostring(valid) .. " reason=" .. tostring(reason))
L1381 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] defense validation: valid=" .. tostring(valid) .. " reason=" .. tostring(reason))
L1385 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] mutant_hunt validation: valid=" .. tostring(valid) .. " reason=" .. tostring(reason))
L1389 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] Task type " .. tostring(task_type) .. " not in KILL_VALIDATION_TYPES")
L1392 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] Task " .. tostring(task_id) .. " - require_player_kill is DISABLED")
L1411 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] post_completion_cleanup: no var for spy task %s", task_id)
L1418 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] post_completion_cleanup: spy_obj is nil for task %s", task_id)
L1425 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] post_completion_cleanup: se_squad is nil for task %s", task_id)
L1468 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] Spy task cleanup complete for %s", task_id)
L1551 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] Task %s: should=%s, reason=%s",
L1567 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] Adding to cancel list: " .. tostring(task_id) .. " reason=" .. tostring(reason))
L1576 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![FA] Error checking task %s: %s", tostring(task_id), tostring(err))
L1583 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] AUTOCOMPLETING: %s", task_data.id)
L1611 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] Tasks to cancel: " .. tostring(#tasks_to_cancel) .. ", cancel_if_stolen=" .. tostring(cfg.cancel_if_stolen))
L1616 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] CANCELLING (stolen): " .. tostring(task_data.id) .. " - " .. tostring(task_data.reason))
L1643 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] cancel_if_stolen is disabled, not cancelling tasks")
L1653 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] actor_on_first_update - mod ready!")
L1671 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] on_game_start called")
L1703 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] Fixed registered_time for task: " .. tostring(task_id) .. " (was: " .. tostring(rt) .. ")")
L1729 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] load_state complete - mod ready")
L1755 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] Monkeypatched sim_board.remove_squad for CTD prevention")
L1768 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] task_callback fired: task=%s stage=%s autocomplete_flag=%s",
L1782 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] task_callback: compensation disabled in MCM")
L1789 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] task_callback: not completed stage")
L1797 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] task_callback: no on_complete data")
L1805 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] task_callback: calculating compensation for %s", tostring(tsk_id))
L1811 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] task_callback: no compensation calculated")
L1816 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] Applying item compensation for task %s: " .. tostring(compensation.min or 0) .. "-" .. tostring(compensation.max or 0) .. " RU", tsk_id)
L1824 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] Monkeypatched task_manager.task_callback for item compensation")
L1826 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[FA] Core script loaded successfully")
L1764 🔴 global_write
Global write: task_manager_task_callback
Impact: low
Show code
task_manager_task_callback = task_manager.task_callback

Fermuto's Part Disassembly Fix

1 file (🟢11 🟡6 🔴0 🔵9)

item_parts.script

L164 🟢 table_insert_append
table.insert(parts_tbl, v) -> parts_tbl[#parts_tbl+1] = v
Impact: high
Show code
table.insert(parts_tbl, parts_tbl[math.random(#parts_tbl)])
L258 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details, with_scope:sub(2))
L264 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details, scope)
L268 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details, sil)
L272 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details, gl)
L292 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details,spare_parts[i])
L303 🟢 table_insert_append
table.insert(upgr_tools, v) -> upgr_tools[#upgr_tools+1] = v
Impact: high
Show code
table.insert(upgr_tools,tool)
L308 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details,upgr_tools[i])
L396 🟢 table_insert_append
table.insert(upgr_tools, v) -> upgr_tools[#upgr_tools+1] = v
Impact: high
Show code
table.insert(upgr_tools,tool)
L401 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details,upgr_tools[i])
L465 🟢 uncached_globals_summary
Cache 1 globals in evaluate_parts
Impact: medium
Show code
L547: math.random L556: math.random
L456 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str = str .. "\\n- " .. ui_item.get_sec_name(t[i])
L111 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ item_parts timer | no owner found")
L152 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ item_parts | no owner found for [%s]", obj:name())
L189 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ item_parts timer | no owner found")
L244 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ item_parts | no owner found for [%s]", obj:name())
L336 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ item_parts timer | no owner found")
L373 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ item_parts | no owner found for [%s]", obj:name())
L688 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/ item_parts | %s | id: %s - con: %s", str, k, v)
L696 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/ parts table for (%s)", id)
L698 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/ [%s] - condition: %s", k1, v1)
L181 🟡 potential_nil_access
Potential nil access: 'npc' from :parent() used without nil check
Impact: low
Show code
CreateTimeEvent(0,"delay_disassembly" .. id, delay, timer_disassembly_item, npc:id(), parts_tbl, sec, con, name)
L328 🟡 potential_nil_access
Potential nil access: 'npc' from :parent() used without nil check
Impact: low
Show code
CreateTimeEvent(0,"delay_disassembly" .. id, delay, timer_disassembly_weapon, npc:id(), result_details, result_conditions, name)
L422 🟡 potential_nil_access
Potential nil access: 'npc' from :parent() used without nil check
Impact: low
Show code
CreateTimeEvent(0,"delay_disassembly" .. id, delay, timer_disassembly_outfit, npc:id(), result_details, result_conditions, name)
L250 🟡 unused_local_variable
Local variable 'get_ammo' is assigned but never used
Impact: low
Show code
local get_ammo = {}
L654 🟡 unused_local_variable
Local variable 'sec_2' is assigned but never used
Impact: low
Show code
local sec_2 = obj_2:section()

FishWings XR Reach Task Script Fix

1 file (🟢1 🟡6 🔴0 🔵0)

xr_reach_task.script

L285 🟢 repeated_npc_id()
npc:id() called 5x in commander_execute
Impact: low
Show code
Cache npc:id() result
L97 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(self.object:id())
L102 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local squad = se_obj.group_id and se_obj.group_id ~= 65535 and sim:object(se_obj.group_id)
L104 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local target = squad.assigned_target_id and sim:object(squad.assigned_target_id)
L110 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local smart = se_obj.m_smart_terrain_id and se_obj.m_smart_terrain_id ~= 65535 and sim:object(se_obj.m_smart_terrain_id)
L146 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(self.object:id())
L151 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local squad = se_obj.group_id and se_obj.group_id ~= 65535 and sim:object(se_obj.group_id)

Flueno's Safer Artifact Melting

1 file (🟢0 🟡0 🔴2 🔵0)

safer_af_crafting_mcm.script

L146 🔴 global_write
Global write: af_update_delegatee
Impact: low
Show code
af_update_delegatee = item_artefact.artefact_binder.update
L151 🔴 global_write
Global write: op
Impact: low
Show code
op = { id = "safe_af_craft",

Fuji's ISG Teleport

1 file (🟢0 🟡1 🔴0 🔵2)

fuji_magician.script

L44 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[Fuji] Teleport: Move NPC")
L102 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("snd is nil")
L10 🟡 unused_local_variable
Local variable 'min_rank' is assigned but never used
Impact: low
Show code
local min_rank = 0

G.A.M.M.A. 3D PDA and Headlamp Animations

1 file (🟢10 🟡18 🔴3 🔵4)

actor_effects.script

L1530 🟢 table_insert_append
table.insert(anims, v) -> anims[#anims+1] = v
Impact: high
Show code
table.insert(anims,{e = i,d = v[2] or math.random(0,1),c = cnt})
L31 🟢 uncached_globals_summary
Cache 1 globals in init_settings
Impact: medium
Show code
L43: tonumber L65: tonumber
L133 🟢 uncached_globals_summary
Cache 1 globals in parse_anims
Impact: medium
Show code
L147: tonumber L160: tonumber
L769 🟢 uncached_globals_summary
Cache 1 globals in Update_Rad
Impact: medium
Show code
L787: math.random L788: math.random
L807 🟢 uncached_globals_summary
Cache 1 globals in Update_Mask
Impact: medium
Show code
L834: tostring L871: tostring
L984 🟢 uncached_globals_summary
Cache 1 globals in Update_Blood
Impact: medium
Show code
L1001: math.random L1007: math.random
L1486 🟢 uncached_globals_summary
Cache 1 globals in shoot_effect
Impact: medium
Show code
L1500: math.random L1505: math.random
L253 🟢 repeated_itm_section()
itm:section() called 3x in Hit_TorchToggle
Impact: low
Show code
Cache itm:section() result
L402 🟢 repeated_itm_section()
itm:section() called 3x in Hit_MaskCleaning
Impact: low
Show code
Cache itm:section() result
L1785 🟢 repeated_obj_id()
obj:id() called 3x in actor_item_to_slot
Impact: low
Show code
Cache obj:id() result
L1368 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~WARNING actor_effects.play_item_fx | item animation [%s] doesn't exist!", name)
L1723 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("PDA Out")
L1727 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(state)
L1731 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("PDA Out")
L1724 🔴 global_write
Global write: wpn
Impact: low
Show code
wpn = db.actor:active_item()
L1726 🔴 global_write
Global write: state
Impact: low
Show code
state = wpn:get_state()
L1851 🔴 global_write
Global write: minimap_enabled
Impact: low
Show code
minimap_enabled = ui_options.get("video/hud/show_minimap")
L253 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
local hud = ini_sys:r_string_ex(itm:section(),"hud") or "hud_base"
L258 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
local kind = ini_sys:r_string_ex(itm:section(),"kind") or nil
L259 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
local class = ini_sys:r_string_ex(itm:section(),"class") or nil
L402 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
local hud = ini_sys:r_string_ex(itm:section(),"hud") or "hud_base"
L407 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
local kind = ini_sys:r_string_ex(itm:section(),"kind") or nil
L408 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
local class = ini_sys:r_string_ex(itm:section(),"class") or nil
L602 🟡 potential_nil_access
Potential nil access: 'grn' from :item_in_slot() used without nil check
Impact: low
Show code
grn:switch_state(0)
L604 🟡 potential_nil_access
Potential nil access: 'grn' from :item_in_slot() used without nil check
Impact: low
Show code
elseif hqt_state == 3 and grn:get_state() == 0 then
L607 🟡 potential_nil_access
Potential nil access: 'grn' from :item_in_slot() used without nil check
Impact: low
Show code
elseif hqt_state == 4 and (grn:get_state() == 1 or grn:get_state() == 2) then
L607 🟡 potential_nil_access
Potential nil access: 'grn' from :item_in_slot() used without nil check
Impact: low
Show code
elseif hqt_state == 4 and (grn:get_state() == 1 or grn:get_state() == 2) then
L608 🟡 potential_nil_access
Potential nil access: 'grn' from :item_in_slot() used without nil check
Impact: low
Show code
grn:switch_state(3)
L613 🟡 potential_nil_access
Potential nil access: 'grn' from :item_in_slot() used without nil check
Impact: low
Show code
if grn then grn:switch_state(3) end
L1639 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
cam_dist = actor:bone_position("bip01_head"):distance_to_sqr(device().cam_pos)
L10 🟡 unused_local_variable
Local variable 'last_det' is assigned but never used
Impact: low
Show code
local last_det = 0
L24 🟡 unused_local_variable
Local variable 'allow_states' is assigned but never used
Impact: low
Show code
local allow_states = {
L1380 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_eff:r_line_ex(name,i,"","")
L1146 🟡 unused_local_variable
Local variable 'bar_hp_trigger' is assigned but never used
Impact: low
Show code
local bar_hp_trigger = 0.95
L1306 🟡 unused_local_variable
Local variable 'actor_pos' is assigned but never used
Impact: low
Show code
local actor_pos = db.actor:bone_position("bip01_head")

G.A.M.M.A. AI Rework

4 files (🟢14 🟡39 🔴11 🔵25)

schemes_ai_gamma.script

L40 🟢 repeated_npc_id()
npc:id() called 2x in npc_on_hit_callback
Impact: low
Show code
Cache npc:id() result
L40 🟢 repeated_who_id()
who:id() called 2x in npc_on_hit_callback
Impact: low
Show code
Cache who:id() result
L147 🟢 repeated_npc_id()
npc:id() called 23x in scheme_camper
Impact: low
Show code
Cache npc:id() result
L232 🟢 repeated_npc_id()
npc:id() called 17x in scheme_cover
Impact: low
Show code
Cache npc:id() result
L61 🔴 global_write
Global write: dumb_table
Impact: low
Show code
dumb_table = m_data.dumb_table
L62 🔴 global_write
Global write: table_npc
Impact: low
Show code
table_npc = m_data.table_npc
L63 🔴 global_write
Global write: swicth_table2
Impact: low
Show code
swicth_table2 = m_data.swicth_table2
L2 🟡 unused_local_variable
Local variable 'verification_npc2' is assigned but never used
Impact: low
Show code
local verification_npc2 = {}
L6 🟡 unused_local_variable
Local variable 'trained_f' is assigned but never used
Impact: low
Show code
local trained_f = {
L13 🟡 unused_local_variable
Local variable 'untrained_f' is assigned but never used
Impact: low
Show code
local untrained_f = {
L70 🟡 unused_local_variable
Local variable 'swicth_table' is assigned but never used
Impact: low
Show code
local swicth_table = {}
L148 🟡 unused_local_variable
Local variable 'enemy2' is assigned but never used
Impact: low
Show code
local enemy2 = enemy_id and level.object_by_id(enemy_id)
L149 🟡 unused_local_variable
Local variable 'time_in_memory' is assigned but never used
Impact: low
Show code
local time_in_memory = time_global()

xr_combat_camper.script

L104 🟢 repeated_device
device called 3x in execute
Impact: low
Show code
local dev = device()
L38 🟡 potential_nil_access
Potential nil access: 'be' from :best_enemy() used without nil check
Impact: low
Show code
self.st.last_seen_pos = be:position()
L13 🟡 unused_local_variable
Local variable 'act_look_around' is assigned but never used
Impact: low
Show code
local act_look_around = base + 1

xr_conditions.script

L2183 🟢 table_insert_append
table.insert(reachable_theme, v) -> reachable_theme[#reachable_theme+1] = v
Impact: high
Show code
table.insert(reachable_theme,k)
L2423 🟢 table_insert_append
table.insert(hint_table, v) -> hint_table[#hint_table+1] = v
Impact: high
Show code
table.insert(hint_table, "st_upgr_toolkit_1")
L2428 🟢 table_insert_append
table.insert(hint_table, v) -> hint_table[#hint_table+1] = v
Impact: high
Show code
table.insert(hint_table, "st_upgr_toolkit_2")
L2433 🟢 table_insert_append
table.insert(hint_table, v) -> hint_table[#hint_table+1] = v
Impact: high
Show code
table.insert(hint_table, "st_upgr_toolkit_3")
L2443 🟢 table_insert_append
table.insert(hint_table, v) -> hint_table[#hint_table+1] = v
Impact: high
Show code
table.insert(hint_table, "st_upgr_vodka")
L2445 🟢 table_insert_append
table.insert(hint_table, v) -> hint_table[#hint_table+1] = v
Impact: high
Show code
table.insert(hint_table, "st_upgr_vodka")
L2154 🟢 uncached_globals_summary
Cache 1 globals in jup_b221_who_will_start
Impact: medium
Show code
L2182: tostring L2184: tostring
L2651 🟢 uncached_globals_summary
Cache 1 globals in job_on_point
Impact: medium
Show code
L2666: tonumber L2677: tonumber
L985 🟢 repeated_npc_id()
npc:id() called 3x in deadly_hit
Impact: low
Show code
Cache npc:id() result
L361 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("couldnt find talking npc")
L724 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong parameter in 'dist_to_actor_le' function!!!")
L732 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong parameter in 'dist_to_actor_ge' function!!!")
L908 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong number of params in npc_community")
L928 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong number of params in npc_rank")
L939 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong number of params in npc_profile")
L1374 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Not enough arguments in 'is_squad_enemy_to_actor' funciton!")
L1434 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
if detector_section == nil then printf("Wrong parameters in function 'actor_active_detector'") end
L1562 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Insufficient params in squad_in_zone function. story_id[%s], zone_name[%s]", tostring(story_id), tostring(zone_name))
L1596 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Insufficient params in squad_has_enemy function. story_id [%s]", tostring(story_id))
L1621 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Insufficient params in squad_in_zone_all function. story_id[%s], zone_name[%s]", tostring(story_id), tostring(zone_name))
L1699 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong parameters")
L1721 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong parameters")
L1731 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("Wrong parameter story_id[%s] in squad_exist function", tostring(story_id))
L1749 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("~ERROR squad_name_exist | section [%s] doesn't exist in system_ini", tostring(story_id))
L1758 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~WARNING squad_name_exist | cant' get smart obeject [%s]", smart_name)
L1790 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong parameter squad_id[%s] in 'squad_npc_count_ge' function", tostring(squad_id))
L1829 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Signal rocket name is not set!")
L1834 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("No such signal rocket: [%s] on level", tostring(p[1]))
L1841 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("wrong story id")
L1940 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
if (p and p[1]) == nil then printf("Wrong parameters in function 'check_bloodsucker_state'!!!") end
L2184 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("jup_b221_who_will_start: table reachable_theme ------------------------------> [%s]", tostring(k))
L2188 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("No such parameters in function 'jup_b221_who_will_start'")
L2196 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong parameters in function 'jup_b221_who_will_start'")
L1779 🔴 global_write
Global write: npc_id
Impact: low
Show code
npc_id = npc.id
L1781 🔴 global_write
Global write: npc_id
Impact: low
Show code
npc_id = npc:id()
L1020 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = id and sim:object(id)
L1035 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = id and sim:object(id)
L1070 🟡 potential_nil_access
Potential nil access: 'npc1' from :object() used without nil check
Impact: low
Show code
if npc1 and IsStalker( npc1 ) and npc1:alive( ) then
L1241 🟡 potential_nil_access
Potential nil access: 'be' from :best_enemy() used without nil check (auto-fixable)
Impact: low
Show code
return be and be:alive() or false
L1246 🟡 potential_nil_access
Potential nil access: 'best_enemy' from :best_enemy() used without nil check (auto-fixable)
Impact: low
Show code
return db.actor and best_enemy ~= nil and best_enemy:id() == AC_ID
L1520 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = p[1] and npc and (type(npc.id) == "function" and sim:object(npc:id()) or npc)
L1526 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
if (sim:level_name(gg:vertex(se_obj.m_game_vertex_id):level_id()) == p[1]) then
L1584 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = k.id and sim:object(k.id)
L1635 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = k.object or k.id and sim:object(k.id)
L2221 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = k.object or k.id and sim:object(k.id)
L2254 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = k.object or k.id and sim:object(k.id)
L2558 🟡 potential_nil_access
Potential nil access: 'mgun' from :get_car() used without nil check (auto-fixable)
Impact: low
Show code
return mgun:IsObjectVisible(actor)
L1568 🟡 unused_local_variable
Local variable 'sim_board' is assigned but never used
Impact: low
Show code
local sim_board = SIMBOARD
L1605 🟡 unused_local_variable
Local variable 'obj_by_id' is assigned but never used
Impact: low
Show code
local obj_by_id = level.object_by_id
L1672 🟡 unused_local_variable
Local variable 'al' is assigned but never used
Impact: low
Show code
local al = alife()

xr_danger.script

L978 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("xr_danger: no action id p[%s]",i)
L8 🔴 global_write
Global write: evaid
Impact: low
Show code
evaid = 188113
L9 🔴 global_write
Global write: actid
Impact: low
Show code
actid = 188113
L17 🔴 global_write
Global write: DangerInertion
Impact: low
Show code
DangerInertion = utils_data.collect_section(ini,"danger_inertion",true)
L18 🔴 global_write
Global write: DangerInertionActor
Impact: low
Show code
DangerInertionActor = utils_data.collect_section(ini,"danger_inertion_actor",true)
L19 🔴 global_write
Global write: DangerIgnore
Impact: low
Show code
DangerIgnore = utils_data.collect_section(ini,"danger_object",true)
L20 🔴 global_write
Global write: DangerIgnoreActor
Impact: low
Show code
DangerIgnoreActor = utils_data.collect_section(ini,"danger_object_actor",true)
L82 🟡 potential_nil_access
Potential nil access: 'corpse_object' from :object() used without nil check (auto-fixable)
Impact: low
Show code
return corpse_object and IsStalker(corpse_object) and corpse_object:death_time() or 0
L246 🟡 potential_nil_access
Potential nil access: 'best_danger_object' from :object() used without nil check
Impact: low
Show code
local corpse_st = db.storage[best_danger_object:id()]
L342 🟡 potential_nil_access
Potential nil access: 'danger' from :best_danger() used without nil check
Impact: low
Show code
local from_actor = (danger:object() and (danger:object():id() == db.actor:id()))
L342 🟡 potential_nil_access
Potential nil access: 'danger' from :best_danger() used without nil check
Impact: low
Show code
local from_actor = (danger:object() and (danger:object():id() == db.actor:id()))
L345 🟡 potential_nil_access
Potential nil access: 'danger' from :best_danger() used without nil check
Impact: low
Show code
local bd_type = danger:type()
L794 🟡 potential_nil_access
Potential nil access: 'best_danger' from :best_danger() used without nil check
Impact: low
Show code
local best_danger_object = best_danger:object()
L795 🟡 potential_nil_access
Potential nil access: 'best_danger' from :best_danger() used without nil check
Impact: low
Show code
local bd_type = best_danger:type()
L796 🟡 potential_nil_access
Potential nil access: 'best_danger' from :best_danger() used without nil check
Impact: low
Show code
local dependent_object = best_danger:dependent_object()
L871 🟡 potential_nil_access
Potential nil access: 'bd' from :best_danger() used without nil check
Impact: low
Show code
local bd_type = bd:type()
L934 🟡 potential_nil_access
Potential nil access: 'manager' from :motivation_action_manager() used without nil check
Impact: low
Show code
manager:remove_evaluator(stalker_ids.property_danger)
L935 🟡 potential_nil_access
Potential nil access: 'manager' from :motivation_action_manager() used without nil check
Impact: low
Show code
manager:add_evaluator(stalker_ids.property_danger,evaluator_danger("danger", storage, npc))
L936 🟡 potential_nil_access
Potential nil access: 'manager' from :motivation_action_manager() used without nil check
Impact: low
Show code
manager:add_evaluator(evaid,evaluator_check_danger("script_danger",storage,npc))
L938 🟡 potential_nil_access
Potential nil access: 'manager' from :motivation_action_manager() used without nil check
Impact: low
Show code
local danger_action = manager:action(stalker_ids.action_danger_planner)
L955 🟡 potential_nil_access
Potential nil access: 'manager' from :motivation_action_manager() used without nil check
Impact: low
Show code
manager:add_action(actid,temp.action)
L974 🟡 potential_nil_access
Potential nil access: 'manager' from :motivation_action_manager() used without nil check
Impact: low
Show code
action = manager:action(p[i])
L744 🟡 unused_local_variable
Local variable 'dist_to_bdo' is assigned but never used
Impact: low
Show code
local dist_to_bdo = st.last_pos and npc:position():distance_to_sqr(st.last_pos) or 30

G.A.M.M.A. Accurate Defense Values

2 files (🟢13 🟡39 🔴8 🔵5)

ish_item_stats.script

L199 🔴 global_write
Global write: Base_UIInfoItem_Update
Impact: low
Show code
Base_UIInfoItem_Update = nil
L246 🔴 global_write
Global write: Base_UIInfoItem_Update
Impact: low
Show code
Base_UIInfoItem_Update = utils_ui.UIInfoItem.Update
L157 🟡 unused_local_variable
Local variable 'c_arty' is assigned but never used
Impact: low
Show code
local c_arty = artefact and obj:cast_Artefact()

ui_inventory.script

L823 🟢 table_insert_append
table.insert(context_str, v) -> context_str[#context_str+1] = v
Impact: high
Show code
table.insert(context_str, name)
L828 🟢 table_insert_append
table.insert(context_action, v) -> context_action[#context_action+1] = v
Impact: high
Show code
table.insert(context_action, func_action[1])
L829 🟢 table_insert_append
table.insert(context_params, v) -> context_params[#context_params+1] = v
Impact: high
Show code
table.insert(context_params, {id, bag, unpack(func_action)})
L1233 🟢 table_insert_append
table.insert(free_slots, v) -> free_slots[#free_slots+1] = v
Impact: high
Show code
table.insert(free_slots, cslots[i])
L768 🟢 uncached_globals_summary
Cache 1 globals in InitProperties
Impact: medium
Show code
L789: unpack L798: unpack
L1709 🟢 uncached_globals_summary
Cache 3 globals in UpdateStats
Impact: medium
Show code
L1714: pairs L1749: pairs L1824: math.floor L1929: math.floor L1844: math.ceil L1864: math.ceil
L1994 🟢 uncached_globals_summary
Cache 1 globals in On_Sort
Impact: medium
Show code
L2030: pairs L2033: pairs
L2424 🟢 uncached_globals_summary
Cache 1 globals in LMode_RefreshInventories
Impact: medium
Show code
L2431: pairs L2437: pairs
L2601 🟢 uncached_globals_summary
Cache 1 globals in TMode_RefreshInventories
Impact: medium
Show code
L2609: pairs L2614: pairs
L2920 🟢 uncached_globals_summary
Cache 1 globals in RMode_InitItem
Impact: medium
Show code
L2933: pairs L2979: pairs
L3571 🟢 uncached_globals_summary
Cache 1 globals in On_CC_Mouse1_DB
Impact: medium
Show code
L3629: unpack L3638: unpack
L3791 🟢 uncached_globals_summary
Cache 1 globals in Update
Impact: medium
Show code
L3820: pairs L3835: pairs
L3374 🟢 repeated_obj_from_section()
obj_from:section() called 3x in On_CC_DragDrop
Impact: low
Show code
Cache obj_from:section() result
L735 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR Can't get item game object!")
L915 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR UIInventory:Name_Custom | can't find function (%s) for %s in section [%s]", str[1] .. str[2], "use" .. i .. "_functor", sec)
L1293 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR UIInventory:Action_Custom | can't find function (%s) for %s in section [%s]", str[1] .. str[2], "use" .. i .. "_action_functor", sec)
L1724 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("UIInventory | can't get cast_CustomOutfit of [%s]", outfit:name())
L1757 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("UIInventory | can't get cast_Helmet of [%s]", outfit:name())
L17 🔴 global_write
Global write: display_supply_level
Impact: low
Show code
display_supply_level = true
L66 🔴 global_write
Global write: rounded
Impact: low
Show code
rounded = x + 0.5 - (x + 0.5) % 1
L3396 🔴 global_write
Global write: quick_item
Impact: low
Show code
quick_item = exec_console_cmd("slot_" .. (idx_to - 1) .. " " .. obj_from:section())
L3866 🔴 global_write
Global write: show_full_stats
Impact: low
Show code
show_full_stats = false
L3919 🔴 global_write
Global write: show_full_stats
Impact: low
Show code
show_full_stats = false
L3934 🔴 global_write
Global write: show_full_stats
Impact: low
Show code
show_full_stats = true
L737 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
self:Print(nil, msg, obj:name())
L756 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
return p:id() == AC_ID
L759 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
return npc and p:id() == npc:id()
L1517 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check (auto-fixable)
Impact: low
Show code
self:ShowFaction(actor:character_community(), "player")
L1519 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
self.player_community:SetText( game.translate_string(actor:character_community()) )
L1520 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
self.player_icon:InitTexture( actor:character_icon() )
L1521 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
self.player_money:SetText( actor:money() )
L1522 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
self:ShowRank(actor:character_rank(), "player")
L1555 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local outfit = actor:item_in_slot(7)
L1556 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local backpack = actor:item_in_slot(13)
L1559 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local tot_weight = actor:get_total_weight()
L1562 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local max_weight = actor:get_actor_max_weight()
L1565 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
max_weight = max_weight + (outfit and outfit:get_additional_max_weight() or 0)
L1568 🟡 potential_nil_access
Potential nil access: 'backpack' from :item_in_slot() used without nil check
Impact: low
Show code
max_weight = max_weight + (backpack and backpack:get_additional_max_weight() or 0)
L1579 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:cast_Actor():conditions():BoosterForEach( function(booster_type, booster_time, booster_value)
L1650 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local item = actor:item_in_slot(i)
L1662 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local outfit = actor:item_in_slot(7)
L1679 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local outfit = actor:item_in_slot(7)
L1680 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local cnt_arty = actor:belt_count()
L1681 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local cnt_arty_slot = outfit and outfit:cast_CustomOutfit():get_artefact_count() or 0
L1685 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local item = i <= cnt_arty and actor:item_on_belt(i-1)
L1720 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local outfit = actor:item_in_slot(7)
L1753 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local helm = actor:item_in_slot(12)
L1781 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:iterate_belt( function(owner, obj)
L1805 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:cast_Actor():conditions():BoosterForEach( function(booster_type, booster_time, booster_value)
L1926 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local satiety = actor:cast_Actor():conditions():GetSatiety()
L2215 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
local clsid = obj:clsid()
L2492 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
tot_weight = tot_weight + obj:weight()
L3167 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
local sec = obj:section()
L3168 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
local cond = obj:condition()
L3196 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
inventory_upgrades.effect_repair_item( obj:section(), obj:condition())
L3196 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
inventory_upgrades.effect_repair_item( obj:section(), obj:condition())
L3197 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
obj:set_condition(0.99999)
L1921 🟡 unused_local_variable
Local variable 'tmp1' is assigned but never used
Impact: low
Show code
local fire_wound_helm,tmp1,tmp2,tmp3,tmp4,helm_br = get_protection(h_hit,19, 12)
L1921 🟡 unused_local_variable
Local variable 'tmp2' is assigned but never used
Impact: low
Show code
local fire_wound_helm,tmp1,tmp2,tmp3,tmp4,helm_br = get_protection(h_hit,19, 12)
L1921 🟡 unused_local_variable
Local variable 'tmp3' is assigned but never used
Impact: low
Show code
local fire_wound_helm,tmp1,tmp2,tmp3,tmp4,helm_br = get_protection(h_hit,19, 12)
L1921 🟡 unused_local_variable
Local variable 'tmp4' is assigned but never used
Impact: low
Show code
local fire_wound_helm,tmp1,tmp2,tmp3,tmp4,helm_br = get_protection(h_hit,19, 12)
L2557 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = char_ini:r_line(known_info,i,"","")

G.A.M.M.A. Achievements Balance

1 file (🟢0 🟡2 🔴0 🔵0)

game_achievements.script

L26 🟡 unused_local_variable
Local variable 'junk1' is assigned but never used
Impact: low
Show code
local junk1, section, junk2 = ini_sys:r_line("achievements", i, "", "")
L26 🟡 unused_local_variable
Local variable 'junk2' is assigned but never used
Impact: low
Show code
local junk1, section, junk2 = ini_sys:r_line("achievements", i, "", "")

G.A.M.M.A. Actor Damage Balancer

4 files (🟢4 🟡21 🔴177 🔵8)

grok_actor_damage_balancer.script

L318 🟢 uncached_globals_summary
Cache 1 globals in get_protection
Impact: medium
Show code
L344: math.ceil L346: math.ceil
L525 🟢 uncached_globals_summary
Cache 1 globals in get_outfit_value
Impact: medium
Show code
L547: math.ceil L549: math.ceil
L792 🟢 uncached_globals_summary
Cache 1 globals in actor_on_before_hit
Impact: medium
Show code
L897: string.find L902: string.find
L943 🟢 repeated_shit_draftsman_section()
shit.draftsman:section() called 5x in actor_on_before_hit
Impact: low
Show code
Cache shit.draftsman:section() result
L451 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("ammo didn't penetrate armor, damage reduction applied")
L798 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("cancelling strike damage during climbing")
L810 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("starting radiation protection")
L898 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/// Reducing buckshots damage")
L903 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/// Reducing KS23 damage")
L908 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/// Reducing AP Slugs damage")
L913 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/// Reducing Slugs damage")
L918 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/// Reducing 308 Federal damage")
L176 🔴 global_write
Global write: armor_hit_frac
Impact: low
Show code
armor_hit_frac = ini_sys:r_float_ex(obj:section(), "hit_fraction_actor") or 1
L177 🔴 global_write
Global write: armor_bone_value
Impact: low
Show code
armor_bone_value = (1 - armor_hit_frac) * 0.75 or 0
L181 🔴 global_write
Global write: helmet_hit_frac
Impact: low
Show code
helmet_hit_frac = ini_sys:r_float_ex(obj:section(), "hit_fraction_actor") or 1
L182 🔴 global_write
Global write: armor_bone_value
Impact: low
Show code
armor_bone_value = (1 - helmet_hit_frac) or 0
L192 🔴 global_write
Global write: hit_type
Impact: low
Show code
hit_type = HitTypeID["FireWound"]
L193 🔴 global_write
Global write: immunity
Impact: low
Show code
immunity = "fire_wound_immunity"
L194 🔴 global_write
Global write: protection
Impact: low
Show code
protection = "FireWound"
L195 🔴 global_write
Global write: booster_type_def
Impact: low
Show code
booster_type_def = 15
L196 🔴 global_write
Global write: adjuster
Impact: low
Show code
adjuster = 0.80
L197 🔴 global_write
Global write: arti_adjuster
Impact: low
Show code
arti_adjuster = adjuster
L198 🔴 global_write
Global write: limiter
Impact: low
Show code
limiter = 0.65
L199 🔴 global_write
Global write: cap_stat
Impact: low
Show code
cap_stat = "fire_wound_cap"
L200 🔴 global_write
Global write: defense
Impact: low
Show code
defense = "fire_wound_protection"
L204 🔴 global_write
Global write: hit_type
Impact: low
Show code
hit_type = HitTypeID["Wound"]
L205 🔴 global_write
Global write: immunity
Impact: low
Show code
immunity = "wound_immunity"
L206 🔴 global_write
Global write: protection
Impact: low
Show code
protection = "Wound"
L207 🔴 global_write
Global write: booster_type_def
Impact: low
Show code
booster_type_def = 16
L208 🔴 global_write
Global write: adjuster
Impact: low
Show code
adjuster = 0.58 * 1.20
L209 🔴 global_write
Global write: arti_adjuster
Impact: low
Show code
arti_adjuster = 0.58 * 2
L210 🔴 global_write
Global write: limiter
Impact: low
Show code
limiter = 0.65
L211 🔴 global_write
Global write: cap_stat
Impact: low
Show code
cap_stat = "wound_cap"
L212 🔴 global_write
Global write: defense
Impact: low
Show code
defense = "wound_protection"
L216 🔴 global_write
Global write: hit_type
Impact: low
Show code
hit_type = HitTypeID["Strike"]
L217 🔴 global_write
Global write: immunity
Impact: low
Show code
immunity = "strike_immunity"
L218 🔴 global_write
Global write: protection
Impact: low
Show code
protection = "Strike"
L219 🔴 global_write
Global write: booster_type_def
Impact: low
Show code
booster_type_def = 14
L220 🔴 global_write
Global write: adjuster
Impact: low
Show code
adjuster = 0.55
L221 🔴 global_write
Global write: arti_adjuster
Impact: low
Show code
arti_adjuster = adjuster * 1.3
L222 🔴 global_write
Global write: limiter
Impact: low
Show code
limiter = 0.65
L223 🔴 global_write
Global write: elemental
Impact: low
Show code
elemental = 1
L224 🔴 global_write
Global write: cap_stat
Impact: low
Show code
cap_stat = "strike_cap"
L225 🔴 global_write
Global write: defense
Impact: low
Show code
defense = "strike_protection"
L229 🔴 global_write
Global write: hit_type
Impact: low
Show code
hit_type = HitTypeID["Explosion"]
L230 🔴 global_write
Global write: immunity
Impact: low
Show code
immunity = "explosion_immunity"
L231 🔴 global_write
Global write: protection
Impact: low
Show code
protection = "Explosion"
L232 🔴 global_write
Global write: booster_type_def
Impact: low
Show code
booster_type_def = 13
L233 🔴 global_write
Global write: adjuster
Impact: low
Show code
adjuster = 0.45
L234 🔴 global_write
Global write: arti_adjuster
Impact: low
Show code
arti_adjuster = 0.675
L235 🔴 global_write
Global write: limiter
Impact: low
Show code
limiter = 0.65
L236 🔴 global_write
Global write: elemental
Impact: low
Show code
elemental = 1
L237 🔴 global_write
Global write: cap_stat
Impact: low
Show code
cap_stat = "explosion_cap"
L238 🔴 global_write
Global write: defense
Impact: low
Show code
defense = "explosion_protection"
L242 🔴 global_write
Global write: hit_type
Impact: low
Show code
hit_type = HitTypeID["Burn"]
L243 🔴 global_write
Global write: immunity
Impact: low
Show code
immunity = "burn_immunity"
L244 🔴 global_write
Global write: protection
Impact: low
Show code
protection = "Burn"
L245 🔴 global_write
Global write: booster_type_def
Impact: low
Show code
booster_type_def = 8
L246 🔴 global_write
Global write: adjuster
Impact: low
Show code
adjuster = 1.00
L247 🔴 global_write
Global write: arti_adjuster
Impact: low
Show code
arti_adjuster = adjuster * 2.0
L248 🔴 global_write
Global write: limiter
Impact: low
Show code
limiter = 0.65
L249 🔴 global_write
Global write: elemental
Impact: low
Show code
elemental = 1
L250 🔴 global_write
Global write: cap_stat
Impact: low
Show code
cap_stat = "burn_cap"
L251 🔴 global_write
Global write: defense
Impact: low
Show code
defense = "burn_protection"
L255 🔴 global_write
Global write: hit_type
Impact: low
Show code
hit_type = HitTypeID["LightBurn"]
L256 🔴 global_write
Global write: immunity
Impact: low
Show code
immunity = "burn_immunity"
L257 🔴 global_write
Global write: protection
Impact: low
Show code
protection = "Burn"
L258 🔴 global_write
Global write: booster_type_def
Impact: low
Show code
booster_type_def = 8
L259 🔴 global_write
Global write: adjuster
Impact: low
Show code
adjuster = 1.00
L260 🔴 global_write
Global write: arti_adjuster
Impact: low
Show code
arti_adjuster = adjuster * 2.0
L261 🔴 global_write
Global write: limiter
Impact: low
Show code
limiter = 0.65
L262 🔴 global_write
Global write: elemental
Impact: low
Show code
elemental = 1
L263 🔴 global_write
Global write: cap_stat
Impact: low
Show code
cap_stat = "burn_cap"
L264 🔴 global_write
Global write: defense
Impact: low
Show code
defense = "burn_protection"
L268 🔴 global_write
Global write: hit_type
Impact: low
Show code
hit_type = HitTypeID["Shock"]
L269 🔴 global_write
Global write: immunity
Impact: low
Show code
immunity = "shock_immunity"
L270 🔴 global_write
Global write: protection
Impact: low
Show code
protection = "Shock"
L271 🔴 global_write
Global write: booster_type_def
Impact: low
Show code
booster_type_def = 9
L272 🔴 global_write
Global write: adjuster
Impact: low
Show code
adjuster = 0.102
L273 🔴 global_write
Global write: arti_adjuster
Impact: low
Show code
arti_adjuster = adjuster * 26.5
L274 🔴 global_write
Global write: limiter
Impact: low
Show code
limiter = 0.65
L275 🔴 global_write
Global write: elemental
Impact: low
Show code
elemental = 1
L276 🔴 global_write
Global write: cap_stat
Impact: low
Show code
cap_stat = "shock_cap"
L277 🔴 global_write
Global write: defense
Impact: low
Show code
defense = "shock_protection"
L281 🔴 global_write
Global write: hit_type
Impact: low
Show code
hit_type = HitTypeID["ChemicalBurn"]
L282 🔴 global_write
Global write: immunity
Impact: low
Show code
immunity = "chemical_burn_immunity"
L283 🔴 global_write
Global write: protection
Impact: low
Show code
protection = "ChemicalBurn"
L284 🔴 global_write
Global write: booster_type_def
Impact: low
Show code
booster_type_def = 7
L285 🔴 global_write
Global write: adjuster
Impact: low
Show code
adjuster = 1.32
L286 🔴 global_write
Global write: arti_adjuster
Impact: low
Show code
arti_adjuster = adjuster
L287 🔴 global_write
Global write: limiter
Impact: low
Show code
limiter = 0.65
L288 🔴 global_write
Global write: elemental
Impact: low
Show code
elemental = 1
L289 🔴 global_write
Global write: cap_stat
Impact: low
Show code
cap_stat = "chemical_burn_cap"
L290 🔴 global_write
Global write: defense
Impact: low
Show code
defense = "chemical_burn_protection"
L303 🔴 global_write
Global write: hit_type
Impact: low
Show code
hit_type = HitTypeID["Telepatic"]
L304 🔴 global_write
Global write: immunity
Impact: low
Show code
immunity = "telepatic_immunity"
L305 🔴 global_write
Global write: protection
Impact: low
Show code
protection = "telepatic"
L306 🔴 global_write
Global write: booster_type_def
Impact: low
Show code
booster_type_def = 6
L307 🔴 global_write
Global write: adjuster
Impact: low
Show code
adjuster = 1.70
L308 🔴 global_write
Global write: arti_adjuster
Impact: low
Show code
arti_adjuster = 1.50
L309 🔴 global_write
Global write: limiter
Impact: low
Show code
limiter = 0.65
L310 🔴 global_write
Global write: elemental
Impact: low
Show code
elemental = 1
L311 🔴 global_write
Global write: psy
Impact: low
Show code
psy = 1
L312 🔴 global_write
Global write: cap_stat
Impact: low
Show code
cap_stat = "telepatic_cap"
L313 🔴 global_write
Global write: defense
Impact: low
Show code
defense = "telepatic_protection"
L320 🔴 global_write
Global write: total_prot
Impact: low
Show code
total_prot = 0
L321 🔴 global_write
Global write: headshot
Impact: low
Show code
headshot = 0
L322 🔴 global_write
Global write: elemental
Impact: low
Show code
elemental = 0
L323 🔴 global_write
Global write: psy
Impact: low
Show code
psy = 0
L324 🔴 global_write
Global write: adjuster
Impact: low
Show code
adjuster = 1.00
L332 🔴 global_write
Global write: headshot
Impact: low
Show code
headshot = 1
L348 🔴 global_write
Global write: armor_hit_frac
Impact: low
Show code
armor_hit_frac = ini_sys:r_float_ex(outfit:section(), "hit_fraction_actor") or 1
L366 🔴 global_write
Global write: helmet_hit_frac
Impact: low
Show code
helmet_hit_frac = ini_sys:r_float_ex(helmet:section(), "hit_fraction_actor") or 1
L378 🔴 global_write
Global write: af_bone_value
Impact: low
Show code
af_bone_value = 0
L379 🔴 global_write
Global write: prot
Impact: low
Show code
prot = 0
L382 🔴 global_write
Global write: af_bone_value
Impact: low
Show code
af_bone_value = 0.01
L385 🔴 global_write
Global write: af_bone_value
Impact: low
Show code
af_bone_value = 0.03
L388 🔴 global_write
Global write: af_bone_value
Impact: low
Show code
af_bone_value = 0.04
L391 🔴 global_write
Global write: af_bone_value
Impact: low
Show code
af_bone_value = 0.06
L401 🔴 global_write
Global write: af_bone_value
Impact: low
Show code
af_bone_value = 0
L409 🔴 global_write
Global write: limiter
Impact: low
Show code
limiter = limiter + af_limit
L411 🔴 global_write
Global write: limiter
Impact: low
Show code
limiter = 0.95
L444 🔴 global_write
Global write: no_pen
Impact: low
Show code
no_pen = 0
L452 🔴 global_write
Global write: no_pen
Impact: low
Show code
no_pen = 1
L463 🔴 global_write
Global write: no_pen
Impact: low
Show code
no_pen = 1
L468 🔴 global_write
Global write: total_prot
Impact: low
Show code
total_prot = math.ceil((helmet_protection + armor_protection + artefacts_protection + booster_protection) * 100)/100
L471 🔴 global_write
Global write: total_prot
Impact: low
Show code
total_prot = limiter
L477 🔴 global_write
Global write: protection_to_hit_type
Impact: low
Show code
protection_to_hit_type = {
L489 🔴 global_write
Global write: total_prot
Impact: low
Show code
total_prot = 0
L490 🔴 global_write
Global write: headshot
Impact: low
Show code
headshot = 0
L491 🔴 global_write
Global write: elemental
Impact: low
Show code
elemental = 0
L492 🔴 global_write
Global write: psy
Impact: low
Show code
psy = 0
L493 🔴 global_write
Global write: adjuster
Impact: low
Show code
adjuster = 1.00
L502 🔴 global_write
Global write: af_bone_value
Impact: low
Show code
af_bone_value = 0
L503 🔴 global_write
Global write: prot
Impact: low
Show code
prot = 0
L508 🔴 global_write
Global write: af_prot
Impact: low
Show code
af_prot = math.ceil(prot * 0.6 * arti_adjuster *100)/100
L513 🔴 global_write
Global write: af_bone_value
Impact: low
Show code
af_bone_value = 0
L519 🔴 global_write
Global write: af_prot
Impact: low
Show code
af_prot = math.ceil(prot * 0.6 * arti_adjuster *100)/100
L530 🔴 global_write
Global write: total_prot
Impact: low
Show code
total_prot = 0
L531 🔴 global_write
Global write: headshot
Impact: low
Show code
headshot = 0
L532 🔴 global_write
Global write: elemental
Impact: low
Show code
elemental = 0
L533 🔴 global_write
Global write: psy
Impact: low
Show code
psy = 0
L534 🔴 global_write
Global write: adjuster
Impact: low
Show code
adjuster = 1.00
L573 🔴 global_write
Global write: section_protection
Impact: low
Show code
section_protection = math.ceil(SYS_GetParam(0,sec,"hit_fraction_actor") * adjuster *100) or 0
L575 🔴 global_write
Global write: section_protection
Impact: low
Show code
section_protection = math.ceil(SYS_GetParam(0,sec, defense) * adjuster *100) or 0
L612 🔴 global_write
Global write: rand
Impact: low
Show code
rand = math.random(1,100)
L622 🔴 global_write
Global write: player_protection
Impact: low
Show code
player_protection = get_protection(shit,bone_id,k_ap)
L625 🔴 global_write
Global write: game_num
Impact: low
Show code
game_num = gameplay["type"] or game_num
L626 🔴 global_write
Global write: damage
Impact: low
Show code
damage = shit.power * ( 1 - player_protection ) * difficulty_multiplier[game_num] * 0.90
L652 🔴 global_write
Global write: damage
Impact: low
Show code
damage = shit.power * ( 1 - player_protection )
L657 🔴 global_write
Global write: damage
Impact: low
Show code
damage = damage * body_part_mult
L662 🔴 global_write
Global write: damage
Impact: low
Show code
damage = db.actor.health - 0.25
L701 🔴 global_write
Global write: previous_hitbox
Impact: low
Show code
previous_hitbox = bone_id
L704 🔴 global_write
Global write: helmet
Impact: low
Show code
helmet = db.actor:item_in_slot(12)
L706 🔴 global_write
Global write: cond
Impact: low
Show code
cond = helmet:condition()
L711 🔴 global_write
Global write: armor
Impact: low
Show code
armor = db.actor:item_in_slot(7)
L713 🔴 global_write
Global write: cond
Impact: low
Show code
cond = armor:condition()
L721 🔴 global_write
Global write: helmet
Impact: low
Show code
helmet = db.actor:item_in_slot(12)
L723 🔴 global_write
Global write: cond
Impact: low
Show code
cond = helmet:condition()
L728 🔴 global_write
Global write: armor
Impact: low
Show code
armor = db.actor:item_in_slot(7)
L730 🔴 global_write
Global write: cond
Impact: low
Show code
cond = armor:condition()
L747 🔴 global_write
Global write: tg
Impact: low
Show code
tg = time_global()
L750 🔴 global_write
Global write: grok_delay_field
Impact: low
Show code
grok_delay_field = tg + delay
L760 🔴 global_write
Global write: grok_delay_mine
Impact: low
Show code
grok_delay_mine = tg + delay_mine
L795 🔴 global_write
Global write: tg
Impact: low
Show code
tg = time_global()
L807 🔴 global_write
Global write: rad_grace_delay
Impact: low
Show code
rad_grace_delay = tg + rad_grace
L808 🔴 global_write
Global write: rad_grace_cancel
Impact: low
Show code
rad_grace_cancel = tg + rad_damage
L824 🔴 global_write
Global write: game_num
Impact: low
Show code
game_num = gameplay["type"] or game_num
L836 🔴 global_write
Global write: grok_delay2
Impact: low
Show code
grok_delay2 = tg + delay2
L838 🔴 global_write
Global write: first_hit
Impact: low
Show code
first_hit = 1
L847 🔴 global_write
Global write: first_hit
Impact: low
Show code
first_hit = 0
L870 🔴 global_write
Global write: gameplay
Impact: low
Show code
gameplay = alife_storage_manager.get_state().diff_game
L874 🔴 global_write
Global write: gameplay
Impact: low
Show code
gameplay = alife_storage_manager.get_state().diff_game
L876 🔴 global_write
Global write: game_num
Impact: low
Show code
game_num = gameplay["type"] or game_num
L884 🔴 global_write
Global write: wpn
Impact: low
Show code
wpn = level.object_by_id(shit.weapon_id)
L922 🔴 global_write
Global write: k_ap
Impact: low
Show code
k_ap = ini_sys:r_float_ex(ammo_section, "k_ap") * 10 or 0
L971 🔴 global_write
Global write: gameplay
Impact: low
Show code
gameplay = alife_storage_manager.get_state().diff_game
L975 🔴 global_write
Global write: gameplay
Impact: low
Show code
gameplay = alife_storage_manager.get_state().diff_game
L977 🔴 global_write
Global write: game_num
Impact: low
Show code
game_num = gameplay["type"] or game_num
L980 🔴 global_write
Global write: climbing
Impact: low
Show code
climbing = 0
L983 🔴 global_write
Global write: climbing
Impact: low
Show code
climbing = 1
L987 🔴 global_write
Global write: climbing
Impact: low
Show code
climbing = 0
L338 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local outfit = actor:item_in_slot(7)
L340 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local cond = outfit:condition()
L341 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local c_outfit = outfit:cast_CustomOutfit()
L348 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
armor_hit_frac = ini_sys:r_float_ex(outfit:section(), "hit_fraction_actor") or 1
L358 🟡 potential_nil_access
Potential nil access: 'helmet' from :item_in_slot() used without nil check
Impact: low
Show code
local cond = helmet:condition()
L359 🟡 potential_nil_access
Potential nil access: 'helmet' from :item_in_slot() used without nil check
Impact: low
Show code
local c_helmet = helmet:cast_Helmet()
L366 🟡 potential_nil_access
Potential nil access: 'helmet' from :item_in_slot() used without nil check
Impact: low
Show code
helmet_hit_frac = ini_sys:r_float_ex(helmet:section(), "hit_fraction_actor") or 1
L374 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:iterate_belt( function(owner, obj)
L22 🟡 unused_local_variable
Local variable 'vanilla_diff' is assigned but never used
Impact: low
Show code
local vanilla_diff = {
L38 🟡 unused_local_variable
Local variable 'SCANNED_SLOTS' is assigned but never used
Impact: low
Show code
local SCANNED_SLOTS = {
L87 🟡 unused_local_variable
Local variable 'dtype' is assigned but never used
Impact: low
Show code
local dtype = {
L138 🟡 unused_local_variable
Local variable 'BoosterID' is assigned but never used
Impact: low
Show code
local BoosterID = {
L739 🟡 unused_local_variable
Local variable 'trigger' is assigned but never used
Impact: low
Show code
local trigger = 0

grok_bleed_icon.script

L10 🔴 global_write
Global write: tg
Impact: low
Show code
tg = time_global()
L13 🔴 global_write
Global write: grok_delay
Impact: low
Show code
grok_delay = tg + delay

ish_item_stats.script

L130 🔴 global_write
Global write: Base_UIInfoItem_Update
Impact: low
Show code
Base_UIInfoItem_Update = nil
L177 🔴 global_write
Global write: Base_UIInfoItem_Update
Impact: low
Show code
Base_UIInfoItem_Update = utils_ui.UIInfoItem.Update

momopate_pba_tweaks.script

L4 🔴 global_write
Global write: s_event
Impact: low
Show code
s_event = perk_based_artefacts.add_simple_timed_effect
L5 🔴 global_write
Global write: n_event
Impact: low
Show code
n_event = perk_based_artefacts.add_timed_effect
L441 🔴 global_write
Global write: wpn
Impact: low
Show code
wpn = level.object_by_id(s_hit.weapon_id)
L442 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
sec = wpn:section()
L444 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
local wpn_id = wpn:id()
L445 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
local ammo_type_number = wpn:get_ammo_type()
L563 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check (auto-fixable)
Impact: low
Show code
sim:release(sim:object(monster_id))
L563 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check (auto-fixable)
Impact: low
Show code
sim:release(sim:object(monster_id))
L449 🟡 unused_local_variable
Local variable 'pellet_count' is assigned but never used
Impact: low
Show code
local pellet_count = ini_sys:r_float_ex(ammo_section, "buck_shot") and ini_sys:r_float_ex(ammo_section, "buck_shot") or 1
L550 🟡 unused_local_variable
Local variable 'monster_direction' is assigned but never used
Impact: low
Show code
local monster_direction = monster:direction()
L602 🟡 unused_local_variable
Local variable 'meat_item' is assigned but never used
Impact: low
Show code
local meat_item = alife_create_item(monster_meat, {meat_position, monster_level_vertex_id, monster_game_vertex_id, nil})

G.A.M.M.A. Additional Storylines fixes

2 files (🟢2 🟡0 🔴1 🔵6)

ah_dialogs.script

L136 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Óðîâåíü_"..ah_level_counter)
L139 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Èäåì ê Ñêàáèíñêîìó")
L199 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Òóòòèäó_ÁÈÁÈÁ")
L327 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Ïåðâàÿ îøèáêà")
L330 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Âòîðàÿ îøèáêà")
L333 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Òðåòüÿ îøèáêà")

grok_additional_storyline_npc_invincible.script

L139 🟢 repeated_shit_draftsman_id()
shit.draftsman:id() called 2x in npc_on_before_hit
Impact: low
Show code
Cache shit.draftsman:id() result
L139 🟢 repeated_db_actor_id()
db.actor:id() called 2x in npc_on_before_hit
Impact: low
Show code
Cache db.actor:id() result
L1 🔴 global_write
Global write: ads_npcs
Impact: low
Show code
ads_npcs = {

G.A.M.M.A. Agroprom Underground Remake

1 file (🟢0 🟡0 🔴0 🔵1)

agroprom_drugkit_spawner_gamma.script

L4 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[agroprom_drugkit_spawner_gamma] Initialization...")

G.A.M.M.A. Alife fixes

1 file (🟢2 🟡2 🔴0 🔵9)

alife_storage_manager.script

L88 🟢 uncached_globals_summary
Cache 1 globals in on_after_load_state
Impact: medium
Show code
L95: pairs L117: pairs
L161 🟢 uncached_globals_summary
Cache 1 globals in CALifeStorageManager_before_save
Impact: medium
Show code
L175: pairs L206: pairs
L78 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Marshal Library | Old save detected, switching data from (%s) to (%s) - BEFORE load", prev_version, new_version)
L83 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Marshal Library | companion_assigned_items is adjusted")
L93 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Marshal Library | Old save detected, switching data from (%s) to (%s) - AFTER load", prev_version, new_version)
L107 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Marshal Library | NPC PDA [%s] is shifted to new object [%s]", id, se_pda_new.id)
L121 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Marshal Library | Item [%s] has parts", se_item:name())
L132 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Marshal Library | Outfit [%s] has no patch", se_item:name())
L153 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Marshal Library | Created [%s] for [%s]", sec, se_parent:name())
L227 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!Error: Unable to write to %s",path)
L262 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!Error: Failed to read %s",path)
L145 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(i)
L146 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
local sec = se_obj and se_obj:section_name()

G.A.M.M.A. Anim Checker

1 file (🟢0 🟡0 🔴3 🔵0)

check_anim.script

L1 🔴 global_write
Global write: anim_playing
Impact: low
Show code
anim_playing = false
L3 🔴 global_write
Global write: anim_playing
Impact: low
Show code
function anim_start_func() anim_playing = true end
L5 🔴 global_write
Global write: anim_playing
Impact: low
Show code
function anim_stop_func() anim_playing = false end

G.A.M.M.A. Armors repair like WPO

1 file (🟢1 🟡12 🔴7 🔵1)

item_exo_device.script

L27 🟢 uncached_globals_summary
Cache 1 globals in init
Impact: medium
Show code
L38: tonumber L39: tonumber
L22 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("arti_exo | %s | " .. txt, time_global(), ...)
L88 🔴 global_write
Global write: exo
Impact: low
Show code
exo = false
L92 🔴 global_write
Global write: exo
Impact: low
Show code
exo = true
L96 🔴 global_write
Global write: exo
Impact: low
Show code
exo = true
L390 🔴 global_write
Global write: CanRepair
Impact: low
Show code
CanRepair = inventory_upgrades.can_repair_item
L399 🔴 global_write
Global write: NameCustom
Impact: low
Show code
NameCustom = ui_inventory.UIInventory.Name_Custom
L410 🔴 global_write
Global write: ActionCustom
Impact: low
Show code
ActionCustom = ui_inventory.UIInventory.Action_Custom
L425 🔴 global_write
Global write: original_build_desc_header
Impact: low
Show code
original_build_desc_header = ui_item.build_desc_header
L113 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return false end
L184 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then
L189 🟡 potential_nil_access
Potential nil access: 'suit' from :item_in_slot() used without nil check
Impact: low
Show code
local id = suit:id()
L200 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then
L205 🟡 potential_nil_access
Potential nil access: 'suit' from :item_in_slot() used without nil check
Impact: low
Show code
local id = suit:id()
L214 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then
L220 🟡 potential_nil_access
Potential nil access: 'suit' from :item_in_slot() used without nil check
Impact: low
Show code
local id = suit:id()
L227 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then
L232 🟡 potential_nil_access
Potential nil access: 'suit' from :item_in_slot() used without nil check
Impact: low
Show code
local data = get_data(suit:id())
L233 🟡 potential_nil_access
Potential nil access: 'suit' from :item_in_slot() used without nil check
Impact: low
Show code
if not data then data = init_data(suit:id()) end
L50 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, sec, value = ini_exo_device:r_line_ex("suit_drain",i,"","")
L257 🟡 unused_local_variable
Local variable 'current_outfit' is assigned but never used
Impact: low
Show code
local current_outfit

G.A.M.M.A. Artefacts Reinvention

16 files (🟢40 🟡86 🔴114 🔵220)

dialogs_agr_u.script

L7 🟡 unused_local_variable
Local variable 'agr_u_boss_name' is assigned but never used
Impact: low
Show code
local agr_u_boss_name
L65 🟡 unused_local_variable
Local variable 'docs_id' is assigned but never used
Impact: low
Show code
local docs_id

drx_da_main_artefacts.script

L11 🔴 global_write
Global write: allowed_artefacts
Impact: low
Show code
allowed_artefacts = (function() -- Allowed artefacts to spawn
L123 🔴 global_write
Global write: artefacts_map_chances
Impact: low
Show code
artefacts_map_chances = {
L157 🔴 global_write
Global write: artefacts_map_tiers
Impact: low
Show code
artefacts_map_tiers = {
L532 🔴 global_write
Global write: anomaly_type_to_artefacts
Impact: low
Show code
anomaly_type_to_artefacts = {

exo_loot.script

L110 🟢 uncached_globals_summary
Cache 1 globals in spawn_gear
Impact: medium
Show code
L115: math.random L120: math.random
L1 🔴 global_write
Global write: get_data
Impact: low
Show code
get_data = item_exo_device.get_data
L2 🔴 global_write
Global write: set_data
Impact: low
Show code
set_data = item_exo_device.set_data
L3 🔴 global_write
Global write: init_data
Impact: low
Show code
init_data = item_exo_device.init_data
L4 🔴 global_write
Global write: get_config
Impact: low
Show code
get_config = exo_mcm.get_config
L95 🔴 global_write
Global write: SpawnCosmetics
Impact: low
Show code
SpawnCosmetics = death_manager.spawn_cosmetics
L136 🔴 global_write
Global write: bar_tele
Impact: low
Show code
bar_tele = xr_effects.bar_arena_teleport

grok_artefacts_bip.script

L1 🔴 global_write
Global write: get_config
Impact: low
Show code
get_config = grok_artefacts_bip_mcm.get_config
L91 🔴 global_write
Global write: enabled
Impact: low
Show code
enabled = get_config("enabled")
L95 🔴 global_write
Global write: tg
Impact: low
Show code
tg = time_global()
L98 🔴 global_write
Global write: grok_delay
Impact: low
Show code
grok_delay = tg + delay
L104 🔴 global_write
Global write: available_det_tier
Impact: low
Show code
available_det_tier = 0
L116 🔴 global_write
Global write: available_det_tier
Impact: low
Show code
available_det_tier = detectors[sec]
L139 🔴 global_write
Global write: af_detected
Impact: low
Show code
af_detected = 1
L148 🔴 global_write
Global write: snd
Impact: low
Show code
snd = sound_object('detectors\\art_beep1')
L156 🔴 global_write
Global write: artefact
Impact: low
Show code
artefact = 1
L158 🔴 global_write
Global write: artefact
Impact: low
Show code
artefact = 0
L167 🔴 global_write
Global write: artefact
Impact: low
Show code
artefact = 0
L168 🔴 global_write
Global write: af_detected
Impact: low
Show code
af_detected = 0
L172 🔴 global_write
Global write: af_detected
Impact: low
Show code
af_detected = 0
L89 🟡 unused_local_variable
Local variable 'obj_det' is assigned but never used
Impact: low
Show code
local obj_det = db.actor:active_detector()

grok_artefacts_bip_mcm.script

L10 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "grok_artefacts_bip",sh=true ,gr={

grok_artefacts_melter.script

L107 🟢 uncached_globals_summary
Cache 1 globals in InitControls
Impact: medium
Show code
L128: tostring L129: tostring
L221 🟢 uncached_globals_summary
Cache 1 globals in InitInventory
Impact: medium
Show code
L271: math.floor L273: math.floor
L346 🟢 uncached_globals_summary
Cache 1 globals in OnItemSelect
Impact: medium
Show code
L360: math.floor L369: math.floor
L228 🟢 repeated_obj_section()
obj:section() called 6x in InitInventory
Impact: low
Show code
Cache obj:section() result
L253 🟢 repeated_obj_s_section()
obj_s:section() called 4x in InitInventory
Impact: low
Show code
Cache obj_s:section() result
L353 🟢 repeated_obj_n_section()
obj_n:section() called 3x in OnItemSelect
Impact: low
Show code
Cache obj_n:section() result
L357 🟢 repeated_obj_1_section()
obj_1:section() called 3x in OnItemSelect
Impact: low
Show code
Cache obj_1:section() result
L64 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!ERROR item_repair | no game object passed!")
L60 🔴 global_write
Global write: tool_obj
Impact: low
Show code
tool_obj = obj
L61 🔴 global_write
Global write: tool_sec
Impact: low
Show code
tool_sec = sec
L228 🔴 global_write
Global write: artefact_to_repair
Impact: low
Show code
artefact_to_repair = obj:section()
L253 🔴 global_write
Global write: obj_s_kind
Impact: low
Show code
obj_s_kind = SYS_GetParam(0, obj_s:section(), "kind")
L254 🔴 global_write
Global write: obj_kind
Impact: low
Show code
obj_kind = SYS_GetParam(0, obj:section(), "kind")
L259 🔴 global_write
Global write: strengthen
Impact: low
Show code
strengthen = "strong"
L261 🔴 global_write
Global write: strengthen
Impact: low
Show code
strengthen = "weak"
L15 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L29 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then
L357 🟡 unused_local_variable
Local variable 'is_part_match' is assigned but never used
Impact: low
Show code
local is_part_match = (self.parts_match and sec == obj_1:section())
L402 🟡 unused_local_variable
Local variable 'tg' is assigned but never used
Impact: low
Show code
local tg = time_global()
L458 🟡 unused_local_variable
Local variable 'bind' is assigned but never used
Impact: low
Show code
local bind = dik_to_bind(dik)

grok_artefacts_melter_charge.script

L78 🔴 global_write
Global write: new_charges
Impact: low
Show code
new_charges = clamp(uses + num, 0, 10)
L115 🔴 global_write
Global write: d_flag
Impact: low
Show code
d_flag = true
L121 🔴 global_write
Global write: d_flag
Impact: low
Show code
d_flag = false

grok_artefacts_random_condition.script

L1 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("1057 error fix")

grok_artefacts_random_spawner.script

L31 🟢 uncached_globals_summary
Cache 1 globals in grok_artefact_spawner
Impact: medium
Show code
L37: math.random L53: math.random
L39 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Spawning artefacts in %s",delay)
L44 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Spawning artefacts")
L54 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Tried Spawning artefacts dynamic")
L60 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Tried Spawning artefacts in field")
L84 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(actor_level)
L1 🔴 global_write
Global write: spawned
Impact: low
Show code
spawned = 0
L3 🔴 global_write
Global write: regular_fields_chance
Impact: low
Show code
regular_fields_chance = 50
L4 🔴 global_write
Global write: dynamic_fields_chance
Impact: low
Show code
dynamic_fields_chance = 15
L5 🔴 global_write
Global write: per_field_probability
Impact: low
Show code
per_field_probability = 40
L7 🔴 global_write
Global write: black_listed_levels
Impact: low
Show code
black_listed_levels = {
L32 🔴 global_write
Global write: tg
Impact: low
Show code
tg = time_global()
L35 🔴 global_write
Global write: delay1
Impact: low
Show code
delay1 = delay1 * 1.2 or 22687
L36 🔴 global_write
Global write: delay2
Impact: low
Show code
delay2 = delay2 * 1.2 or 54264
L37 🔴 global_write
Global write: delay
Impact: low
Show code
delay = math.random(delay1,delay2)
L38 🔴 global_write
Global write: grok_delay
Impact: low
Show code
grok_delay = tg + delay
L40 🔴 global_write
Global write: spawned
Impact: low
Show code
spawned = 1
L48 🔴 global_write
Global write: spawned
Impact: low
Show code
spawned = 0
L64 🔴 global_write
Global write: spawned
Impact: low
Show code
spawned = 0
L71 🔴 global_write
Global write: spawn_chance
Impact: low
Show code
spawn_chance = math.random(1,100)
L88 🔴 global_write
Global write: delay1
Impact: low
Show code
delay1 = 30250
L89 🔴 global_write
Global write: delay2
Impact: low
Show code
delay2 = 77520
L92 🔴 global_write
Global write: delay1
Impact: low
Show code
delay1 = 30250
L93 🔴 global_write
Global write: delay2
Impact: low
Show code
delay2 = 77520
L96 🔴 global_write
Global write: map_previous_name
Impact: low
Show code
map_previous_name = actor_level
L106 🔴 global_write
Global write: map_previous_name
Impact: low
Show code
map_previous_name = m_data.map_previous_name
L107 🔴 global_write
Global write: delay1
Impact: low
Show code
delay1 = m_data.delay1
L108 🔴 global_write
Global write: delay2
Impact: low
Show code
delay2 = m_data.delay2
L83 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local actor_level = sim:level_name(gg:vertex(sim:actor().m_game_vertex_id):level_id())
L83 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local actor_level = sim:level_name(gg:vertex(sim:actor().m_game_vertex_id):level_id())

grok_remove_belt_duplicates.script

L34 🟢 uncached_globals_summary
Cache 1 globals in get_artefact_from_container
Impact: medium
Show code
L36: string.find L38: string.find
L37 🔴 global_write
Global write: res
Impact: low
Show code
res = sec:gsub("_lead_box", "")
L39 🔴 global_write
Global write: res
Impact: low
Show code
res = sec:gsub("_af_iam", "")
L41 🔴 global_write
Global write: res
Impact: low
Show code
res = sec:gsub("_af_aac", "")
L43 🔴 global_write
Global write: res
Impact: low
Show code
res = sec:gsub("_af_aam", "")
L50 🔴 global_write
Global write: slot_item_sec
Impact: low
Show code
slot_item_sec = slot_item:section()
L53 🔴 global_write
Global write: itm_tbl
Impact: low
Show code
itm_tbl={}
L70 🔴 global_write
Global write: cat
Impact: low
Show code
cat = categories[section]
L86 🔴 global_write
Global write: cat_to_check
Impact: low
Show code
cat_to_check = categories[slot_item_sec]

item_artefact.script

L277 🟢 uncached_globals_summary
Cache 1 globals in Refresh
Impact: medium
Show code
L306: math.ceil L307: math.ceil
L28 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("item_artefact | %s | " .. txt, time_global(), ...)
L110 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(" %s %s ", imm_sect, cond_loss)
L134 🟡 potential_nil_access
Potential nil access: 'backpack' from :item_in_slot() used without nil check
Impact: low
Show code
print_dbg("Backpack degradation | artefact: %s - hit_power: %s - cond_loss: %s", backpack:name(), s_hit.power, cond_loss)
L135 🟡 potential_nil_access
Potential nil access: 'backpack' from :item_in_slot() used without nil check
Impact: low
Show code
local temp_cond = backpack:condition() - (cond_loss*ini_sys:r_float_ex(backpack:section(),"degrade_rate",1))
L135 🟡 potential_nil_access
Potential nil access: 'backpack' from :item_in_slot() used without nil check
Impact: low
Show code
local temp_cond = backpack:condition() - (cond_loss*ini_sys:r_float_ex(backpack:section(),"degrade_rate",1))
L137 🟡 potential_nil_access
Potential nil access: 'backpack' from :item_in_slot() used without nil check
Impact: low
Show code
backpack:set_condition(temp_cond)
L358 🟡 potential_nil_access
Potential nil access: 'ini' from :spawn_ini() used without nil check
Impact: low
Show code
if ini and ini:section_exist("fixed_bone") then
L430 🟡 potential_nil_access
Potential nil access: 'suit' from :item_in_slot() used without nil check
Impact: low
Show code
local diff = db.actor:get_total_weight() - db.actor:get_actor_max_walk_weight() - (suit and suit:get_additional_max_weight() or 0)
L483 🟡 potential_nil_access
Potential nil access: 'artefact' from :get_artefact() used without nil check
Impact: low
Show code
artefact:FollowByPath(bind_anomaly_zone.artefact_ways_by_id[id],bind_anomaly_zone.artefact_points_by_id[id],vector():set(force_xz,force_y,force_xz))

perk_based_artefacts.script

L171 🟢 uncached_globals_summary
Cache 1 globals in print_table
Impact: medium
Show code
L180: type L182: type
L775 🟢 repeated_obj_id()
obj:id() called 5x in <global>
Impact: low
Show code
Cache obj:id() result
L775 🟢 repeated_enemy_id()
enemy:id() called 3x in <global>
Impact: low
Show code
Cache enemy:id() result
L918 🟢 repeated_who_id()
who:id() called 3x in <global>
Impact: low
Show code
Cache who:id() result
L2435 🟢 repeated_obj_section()
obj:section() called 9x in <global>
Impact: low
Show code
Cache obj:section() result
L3216 🟢 repeated_get_console
get_console called 6x in <global>
Impact: low
Show code
local console = get_console()
L3812 🟢 repeated_obj_2_section()
obj_2:section() called 5x in <global>
Impact: low
Show code
Cache obj_2:section() result
L3187 🟢 repeated_get_console
get_console called 3x in af_serofim_cheat_death
Impact: low
Show code
local console = get_console()
L4644 🟢 repeated_monster_section()
monster:section() called 2x in monster_on_before_hit
Impact: low
Show code
Cache monster:section() result
L4666 🟢 repeated_monster_section()
monster:section() called 2x in monster_on_hit_callback
Impact: low
Show code
Cache monster:section() result
L4698 🟢 repeated_obj_1_section()
obj_1:section() called 3x in on_item_drag_dropped
Impact: low
Show code
Cache obj_1:section() result
L4698 🟢 repeated_obj_2_section()
obj_2:section() called 3x in on_item_drag_dropped
Impact: low
Show code
Cache obj_2:section() result
L183 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = function",k)
L186 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s",k,utils_data.vector_to_string(v))
L188 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = userdata", k)
L193 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = true",k)
L195 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = true")
L199 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = false", k)
L201 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = false")
L206 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s", k,v)
L208 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = nil", k,v)
L217 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Perk Based Artefacts: " .. str, ...)
L231 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Perk Based Artefacts: Table Print")
L318 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("snd is nil")
L443 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("lucifer exists, %s, %s", af_lucifer:id(), af_lucifer:name())
L479 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("refresh artefacts triggered")
L482 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("artefacts are different, refreshing")
L487 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("artefacts are same")
L512 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("registering callback %s, key %s", callback, key)
L523 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("unregistering callback %s, %s", key, callbacks[key].callback)
L552 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("added cooldown, name %s, time %s, current_time %s", name, time_elapsed + (cooldown or 0), time_elapsed)
L562 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("cooldown not expired yet, name %s, time %s, current_time %s", name, cooldowns[name], time_elapsed)
L584 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("can't add effect, already existing with timer")
L585 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("effect %s, timer %s, remaining_time %s, new timer %s", key, status_effects[key].timer, remaining_time, timer)
L588 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("can't add effect, already existing with bigger timer")
L589 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("effect %s, timer %s, remaining_time %s, new timer %s", key, status_effects[key].timer, remaining_time, timer)
L604 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("added status_effect, key %s, time %s, current_time %s", key, time_elapsed + (timer or 0), time_elapsed)
L617 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("status_effect active, key %s, time %s, current_time %s", key, status_effects[key].timer, time_elapsed)
L633 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("removing status effect, key %s, time %s, current_time %s", key, status_effects[key].timer, time_elapsed)
L653 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("current_time %s, adding effect %s", time_elapsed, time_elapsed + (timer or 0))
L662 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
effect_function = effect_function and dump(effect_function),
L667 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
on_end_function = on_end_function and dump(on_end_function),
L681 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("current_time %s, adding effect %s", time_elapsed, time_elapsed + (timer or 0))
L690 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("effect has on end function %s", effect.on_end)
L702 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("removing effect, key %s", key)
L704 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("removing effect, firing on end, key %s", key)
L717 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("effect %s, timer %s, current_time %s", key, props.timer, time_elapsed)
L719 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("removing effect, effect timer %s, current_time %s", props.timer, time_elapsed)
L784 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Medallion, former companions are dead")
L792 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Medallion, Registering former companions callbacks")
L818 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Teleporting actor")
L912 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Monster %s near Tapeworm, stun", obj:name())
L969 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("time %s, hit %s, last_hit %s", time, s_hit.power, last_hit.power)
L991 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("time %s, hit %s", time, s_hit.power)
L1076 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Claw, not a valid hit type %s", s_hit.type)
L1108 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Overpowered Claw, dice_roll %s, chance %s", self.dice_roll, lucifer_bonus)
L1118 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("gibs not found")
L1126 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Claw not triggered")
L1180 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Lamp, adding stash %s", id)
L1183 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Lamp, no active stashes on a level")
L1196 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Lamp, adding target %s", id)
L1204 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Lamp, no active targets on level")
L1217 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Lamp, creating light")
L1302 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Phantom Star, weapon hidden, hidden_num %s", self.hidden_num)
L1308 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Phantom Star, weapon restroed, hidden_num %s", self.hidden_num)
L1312 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Phantom Star, resetting num, hidden_num %s", self.hidden_num)
L1337 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Dragon's Eye, no current_weapon")
L1343 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Dragon's Eye, no casted weapon")
L1348 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("ammo type %s", ammo_type)
L1352 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Dragon's Eye, no valid ammo type")
L1360 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Dragon Eye not triggered, dice roll %s, chance %s", self.dice_roll, chance)
L1368 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Dragon Eye not triggered, dice roll %s, chance %s", self.dice_roll, chance)
L1373 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Victim's id: %s", npc_id)
L1383 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("explode_obj spawned")
L1387 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("explode obj exploded")
L1395 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("gibs not found")
L1399 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("explode_obj not spawned yet")
L1509 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Spike, Final Damage %s, bonus %s", s_hit.power, self.damage_multiplier)
L1582 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Sandstone, no active item")
L1588 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Sandstone, weapon %s not infused", actor_weapon)
L1599 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Sandstone, effect power %s, hit_type %s", elemental_hit.power, elemental_hit.type)
L1620 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Thistle, npc health %s", npc.health)
L1657 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Cocoon: stack reset")
L1663 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Cocoon, stacks %s, reduction %s", self.protection_stacks, self.protection_bonus[self.protection_stacks])
L1684 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("af_moh remove speed")
L1691 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("af_moh remove effect")
L1698 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("af_moh unregister callback")
L1702 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("af_moh reset")
L1753 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("pseudodog hit %s", hit.telepatic)
L1844 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("snork meat active")
L1896 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Moss, Eating food %s", food_section)
L1902 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("actor satiety %s", satiety)
L2376 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Bat, too many tries to find random artefact, returning same section %s", sec)
L2391 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Bat, upgrade artefact table not found for %s", sec)
L2404 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Bat, upgrade artefact not found for %s", sec)
L2438 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Bat, transforming perk artefact %s", sec)
L2443 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Bat, transforming artefact %s to different kind", sec)
L2446 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Bat, upgrading artefact %s", sec)
L2450 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Bat, resulting artefact %s", new_sec)
L2560 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("lucifer id %s", id)
L2561 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("condition %s", self.condition)
L2567 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("new condition %s", af_lucifer:condition())
L2623 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
_G.printf("p %s, t %s, i %s, d %s, dm %s", s_hit.power, s_hit.type, s_hit.impulse, s_hit.direction, s_hit.draftsman)
L2663 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Dark time penalty, time %s, level %s, health %s, power %s", hours, actor_level, actor.health, actor.power)
L2667 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Sun: Weather not defined")
L2674 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Clear boost, time %s, current_weather %s, health %s, power %s", hours, current_weather, actor.health, actor.power)
L2677 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Partly boost, time %s, current_weather %s, health %s, power %s", hours, current_weather, actor.health, actor.power)
L2680 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Not clear penalty, time %s, current_weather %s, health %s, power %s", hours, current_weather, actor.health, actor.power)
L2690 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Tapeworm not triggered, cooldown active")
L2709 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("firing Will to Live, health %s", health)
L2745 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("firing Signet, health %s", actor.health)
L2784 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("before bleeding %s", actor.bleeding)
L2787 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("after bleeding %s", actor.bleeding)
L2794 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Chain, actor community %s", actor_community)
L2808 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Chain, no companions alive")
L2822 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("found companion %s, community %s, health %s", id, obj_community, heal_companion_min_health)
L2828 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Chain, no companions need healing")
L2832 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Chain, healing companion %s", heal_companion:id())
L2865 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Scar, action not triggered, dice roll %s, chance %s", dice_roll, chance)
L2937 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("sky color %s, %s, %s", mod_R, mod_G, mod_B)
L3054 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Lucifer, time %s, last time %s, degradation %s, cond %s, new_cond %s", time_elapsed, saved_time_elapsed, round_idp(adjust_condition, 8), round_idp(condition, 4), round_idp(_self.condition, 4))
L3116 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Spike, on_weapon_fired weapon_shot %s", af_spaika.weapon_shot)
L3125 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Spike, Creating time event")
L3135 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Sandstone, weapon %s not infused", actor_weapon)
L3151 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Food object not found")
L3162 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
_G.printf("health increased by %s", satiety_increase)
L3170 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Food object not found")
L3258 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("ironman is active, death count %s, new_count %s, limit %s", ironman.death_count, new_ironman_death_count, ironman.death_limit)
L3269 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("unregistering callback")
L3298 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Black Angel, not a valid hit type %s", s_hit.type)
L3312 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Medallion, not a valid hit type %s", s_hit.type)
L3318 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Medallion, perk not triggered, dice_roll %s, chance %s", dice_roll, af_medallion.reflect_chance[math.min(artefact_count, 5)])
L3326 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Medallion, has non_task_companions")
L3329 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Medallion, has companion_squads")
L3344 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Medallion, doesn't have both companion_squads, non_task_companions")
L3349 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Medallion, no companion found")
L3353 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Medallion, current companion %s", companion.id)
L3360 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Medallion, hitting companion %s, power %s", member:name(), redirect_hit.power)
L3364 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Medallion, squad %s became enemy", squad_id)
L3370 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Medallion, squad companion %s became enemy", k)
L3378 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Medallion, companion became enemy")
L3382 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Medallion, member %s became enemy", member:id())
L3398 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Electron, hit draftsman is actor")
L3403 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Electron, not a valid hit type %s", s_hit.type)
L3437 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Cell, not a valid hit type %s", s_hit.type)
L3446 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Cell: resulted radiation %s", rad_amount)
L3464 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Cocoon, not a valid hit type %s", s_hit.type)
L3475 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Scar, not a valid hit type %s", s_hit.type)
L3485 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Sun, not under Lucifer effect")
L3491 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Sun, not a valid hit type %s", s_hit.type)
L3501 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Sun, Lucifer effect active, hitting with fire coeff %s, damage %s", fire_damage, fire_hit.power)
L3522 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Black Angel not triggered, dice roll %s, chance %s", af_black_angel.dice_roll, af_black_angel.reflect_chance[math.min(artefact_count, 5)])
L3531 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Black Angel not triggered, not valid hit")
L3540 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("hit %s, last_hit %s", s_hit.power, last_hit.power)
L3547 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Tapeworm not triggered, cooldown active")
L3558 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Tapeworm not triggered, not valid hit")
L3569 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Sandstone, not valid hit type")
L3574 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Sandstone, not Anomaly %s", who:section())
L3580 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Sandstone, no active actor_weapon")
L3639 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Miser's Skull not triggered, bone index %s", last_npc_hit_bone_index)
L3653 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("money spawned")
L3661 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("money not spawned yet")
L3763 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Fountain not fired, selling item")
L3772 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Fountain fired")
L3776 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Actor last money %s, actor current money %s", actor_last_money, money)
L3779 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Fountain not fired, not enough money")
L3784 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Fountain, Money given %s", cashback)
L3812 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Sandstone, target is not weapon, %s", obj_2:section())
L3818 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Sandstone, target is knife or binocs, %s", obj_2:section())
L3824 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Sandstone, target is throwable, %s", obj_2:section())
L3886 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("ironman is active, saving death count %s, death limit %s", ironman.death_count, ironman.death_limit)
L3900 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("stash id %s, freq %s, coords %s %s %s", k, v, pos.x, pos.y, pos.z)
L4133 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("monster dead, physics shell works")
L4161 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("monster not dead yet")
L4289 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("restoring item")
L4299 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("hiding item")
L4445 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("artefact %s", artefact)
L4471 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("actor_on_item_use, item %s", obj:section())
L4506 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("%s is valid for degradation, cond %s, new_cond %s", sec, cond * 100, new_cond * 100)
L4509 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("%s is critical, releasing, cond %s", sec, obj:condition() * 100)
L4547 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("weapon fired %s", wpn:section())
L4554 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("actor_on_before hit, draftsman not defined")
L4558 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("actor_on_before_hit damage type %s", s_hit.type)
L4566 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("actor_on_hit_callback not triggered, who not defined")
L4570 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("actor_on_hit_callback, %s, %s, %s", obj:section(), amount, who:section())
L4576 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("actor_on_before_death triggered")
L4582 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("actor_on_item_buy triggered")
L4588 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("actor_on_item_sell triggered")
L4595 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("npc_on_before hit, draftsman not defined")
L4600 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("npc_on_before_hit not triggered %s, %s", npc:section(), s_hit.draftsman:section())
L4611 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("on_hit_callback not triggered, who not defined")
L4616 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("npc_on_hit_callback not triggered %s, %s, %s", npc:section(), amount, who:section())
L4625 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("on_death_callback not triggered, who not defined")
L4630 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("npc_on_death_callback not triggered %s, %s", npc:section(), who:section())
L4639 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("monster_on_before hit, draftsman not defined")
L4644 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("monster_on_before_hit not triggered %s, %s", monster:section(), s_hit.draftsman:section())
L4649 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("monster_on_before_hit not triggered, monster %s not alive anymore", monster:section())
L4661 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("on_hit_callback not triggered, who not defined")
L4666 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("monster_on_hit_callback not triggered %s, %s, %s", monster:section(), amount, who:section())
L4671 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("monster_on_hit not triggered, monster %s not alive anymore", monster:section())
L4680 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("on_death_callback not triggered, who not defined")
L4685 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("monster_on_death_callback not triggered %s, %s", monster:section(), who:section())
L4698 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("No obj_1 or obj_2 found, o1 %s, o2 %s", obj_1 and obj_1:section(), obj_2 and obj_2:section())
L4716 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("tg_now %s, tg_add %s", tg_now, tg_add)
L4827 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Registering")
L4829 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("tg_on_game_start %s", tg_lag)
L133 🔴 global_write
Global write: hud_state
Impact: low
Show code
hud_state = 1
L382 🔴 global_write
Global write: virtual_artefacts
Impact: low
Show code
virtual_artefacts = {}
L436 🔴 global_write
Global write: iterate_belt
Impact: low
Show code
iterate_belt = function(actor)
L478 🔴 global_write
Global write: refresh_artefacts
Impact: low
Show code
refresh_artefacts = function(force)
L492 🔴 global_write
Global write: refresh_artefacts_time_event_func
Impact: low
Show code
refresh_artefacts_time_event_func = function(force)
L498 🔴 global_write
Global write: callbacks
Impact: low
Show code
callbacks = {}
L550 🔴 global_write
Global write: cooldowns
Impact: low
Show code
cooldowns = {} -- Table of cooldowns of artefacts (["artefact"] = time_elapsed + cooldown)
L570 🔴 global_write
Global write: status_effects
Impact: low
Show code
status_effects = {} -- Table of status effects of artefacts (["artefact"] = time_elapsed + cooldown)
L651 🔴 global_write
Global write: timed_effects
Impact: low
Show code
timed_effects = {}
L728 🔴 global_write
Global write: speed_boosts
Impact: low
Show code
speed_boosts = { -- Table of speed boosts for different artefacts
L755 🔴 global_write
Global write: artefact_props
Impact: low
Show code
artefact_props = { -- Special props of artefacts that are used in processing
L2649 🔴 global_write
Global write: artefact_on_update_functions
Impact: low
Show code
artefact_on_update_functions = {
L3061 🔴 global_write
Global write: artefact_on_weapon_fired_functions
Impact: low
Show code
artefact_on_weapon_fired_functions = {
L3146 🔴 global_write
Global write: artefact_on_item_use_functions
Impact: low
Show code
artefact_on_item_use_functions = {
L3199 🔴 global_write
Global write: artefact_on_before_death_functions
Impact: low
Show code
artefact_on_before_death_functions = {
L3216 🔴 global_write
Global write: hud_state
Impact: low
Show code
hud_state = get_console():get_bool("hud_draw") and 1 or 0
L3292 🔴 global_write
Global write: artefact_on_before_hit_functions
Impact: low
Show code
artefact_on_before_hit_functions = {
L3516 🔴 global_write
Global write: artefact_on_hit_functions
Impact: low
Show code
artefact_on_hit_functions = {
L3593 🔴 global_write
Global write: artefact_on_npc_before_hit_functions
Impact: low
Show code
artefact_on_npc_before_hit_functions = {
L3623 🔴 global_write
Global write: artefact_on_npc_hit_functions
Impact: low
Show code
artefact_on_npc_hit_functions = {
L3633 🔴 global_write
Global write: artefact_on_npc_death_functions
Impact: low
Show code
artefact_on_npc_death_functions = {
L3697 🔴 global_write
Global write: artefact_on_monster_before_hit_functions
Impact: low
Show code
artefact_on_monster_before_hit_functions = {
L3727 🔴 global_write
Global write: artefact_on_monster_hit_functions
Impact: low
Show code
artefact_on_monster_hit_functions = {
L3737 🔴 global_write
Global write: artefact_on_monster_death_functions
Impact: low
Show code
artefact_on_monster_death_functions = {
L3757 🔴 global_write
Global write: artefact_on_trade_functions
Impact: low
Show code
artefact_on_trade_functions = {
L3808 🔴 global_write
Global write: artefact_on_item_drag_dropped_functions
Impact: low
Show code
artefact_on_item_drag_dropped_functions = {
L3853 🔴 global_write
Global write: artefact_on_equip_functions
Impact: low
Show code
artefact_on_equip_functions = {
L3942 🔴 global_write
Global write: bat_transmutate_func
Impact: low
Show code
bat_transmutate_func = {
L3962 🔴 global_write
Global write: lucifer_sacrifice_func
Impact: low
Show code
lucifer_sacrifice_func = {
L3982 🔴 global_write
Global write: artefact_on_key_press_functions
Impact: low
Show code
artefact_on_key_press_functions = {
L4442 🔴 global_write
Global write: process_artefacts
Impact: low
Show code
process_artefacts = function(artefacts_table, ...)
L4489 🔴 global_write
Global write: degradation_valid_artys
Impact: low
Show code
degradation_valid_artys = (function()
L4809 🔴 global_write
Global write: timed_effects
Impact: low
Show code
timed_effects = t
L4810 🔴 global_write
Global write: cooldowns
Impact: low
Show code
cooldowns = m_data.perk_based_artefacts_cooldowns or {}
L4811 🔴 global_write
Global write: status_effects
Impact: low
Show code
status_effects = m_data.perk_based_artefacts_status_effects or {}
L4813 🔴 global_write
Global write: virtual_artefacts
Impact: low
Show code
virtual_artefacts = m_data.perk_based_artefacts_virtual_artefacts or {}
L1110 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check (auto-fixable)
Impact: low
Show code
sim:release(sim:object(monster_id))
L1110 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check (auto-fixable)
Impact: low
Show code
sim:release(sim:object(monster_id))
L1190 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(id)
L1192 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local lvl = sim:level_name(gg:vertex(se_obj.m_game_vertex_id):level_id())
L1385 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check (auto-fixable)
Impact: low
Show code
sim:release(sim:object(npc_id))
L1385 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check (auto-fixable)
Impact: low
Show code
sim:release(sim:object(npc_id))
L2412 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local af_bat = actor:object("af_bat")
L2418 🟡 potential_nil_access
Potential nil access: 'af_bat' from :object() used without nil check
Impact: low
Show code
alife_release_id(af_bat:id())
L2662 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_power(power_not_clear_penalty * artefact_count)
L2672 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_health(health_boost * artefact_count)
L2673 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_power(power_clear_boost * artefact_count)
L2676 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_power(power_partly_boost * artefact_count)
L2679 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_power(power_not_clear_penalty * artefact_count)
L2694 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
iterate_nearest(actor:position(), af_tapeworm.iterate_func_radius, function(obj)
L2708 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_health(health)
L2740 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_health(health_boost)
L2755 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_power(radiation * power_boost * artefact_count)
L2756 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_radiation(radiation_cure * artefact_count)
L2767 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local item = actor:item_in_slot(i)
L2786 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_satiety(satiety_drain)
L2793 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local actor_community = actor:character_community()
L2800 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_health(health_boost)
L2801 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_power(power_boost)
L2838 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_health(health_boost)
L2839 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_power(power_boost)
L2851 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_health(health_boost)
L2908 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_health(health_boost * normal_condition + health_boost * 0.5 * overcharge)
L2909 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_power(power_boost * normal_condition + power_boost * overcharge)
L2916 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_power(power_boost * normal_condition * 0.5)
L2918 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_health(health_boost * normal_condition * 0.27)
L2923 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:set_health_ex(0)
L3133 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local actor_weapon = actor:active_item():name()
L3212 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
if actor:is_talking() then
L3213 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:stop_talk()
L3219 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local actor_weapon = actor:active_item()
L3222 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:drop_item(actor_weapon)
L3245 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:set_health_ex(0.5)
L3408 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local item = actor:item_in_slot(i)
L3413 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:iterate_inventory(function(npc, item)
L3447 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:change_radiation(rad_amount)
L3502 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:hit(fire_hit)
L3578 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local actor_weapon = actor:active_item()
L3762 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor_last_money = actor:money()
L3775 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local money = actor:money()
L3785 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:give_money(cashback)
L3791 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:give_game_news(news_caption, news_text, news_ico, 0, 7000, 0)
L3794 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor_last_money = actor:money()
L3993 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
level.iterate_nearest(actor:position(), af_ball.scan_radius + 1, function(obj)
L4012 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
and obj:position():distance_to(actor:position()) <= af_ball.scan_radius
L4018 🟡 potential_nil_access
Potential nil access: 'pointed' from level.get_target_obj() used without nil check
Impact: low
Show code
if pointed and pointed:id() == obj:id() then
L4067 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local res = ray:get(pos, actor:position():sub(pos):normalize())
L4095 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local dist = pos:distance_to_sqr(actor:position())
L4107 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local pos = actor:position()
L4371 🟡 potential_nil_access
Potential nil access: 'crow' from level.object_by_id() used without nil check
Impact: low
Show code
if (crow and crow.alive and crow:alive() and pos < crow:position().z) then
L4371 🟡 potential_nil_access
Potential nil access: 'crow' from level.object_by_id() used without nil check
Impact: low
Show code
if (crow and crow.alive and crow:alive() and pos < crow:position().z) then
L4391 🟡 potential_nil_access
Potential nil access: 'crow' from level.object_by_id() used without nil check
Impact: low
Show code
if(crow and crow.alive and crow:alive() and distance_2d(pos, crow:position())<25) then
L4391 🟡 potential_nil_access
Potential nil access: 'crow' from level.object_by_id() used without nil check
Impact: low
Show code
if(crow and crow.alive and crow:alive() and distance_2d(pos, crow:position())<25) then
L110 🟡 unused_local_variable
Local variable 'string_gsub' is assigned but never used
Impact: low
Show code
local string_gsub = string.gsub
L1099 🟡 unused_local_variable
Local variable 'monster_direction' is assigned but never used
Impact: low
Show code
local monster_direction = monster:direction()
L1137 🟡 unused_local_variable
Local variable 'meat_item' is assigned but never used
Impact: low
Show code
local meat_item = alife_create_item(monster_meat, {meat_position, monster_level_vertex_id, monster_game_vertex_id, nil})

ui_workshop.script

L263 🟢 uncached_globals_summary
Cache 1 globals in InitControls
Impact: medium
Show code
L278: tostring L279: tostring
L292 🟢 uncached_globals_summary
Cache 1 globals in Reset
Impact: medium
Show code
L303: tostring L306: tostring
L392 🟢 uncached_globals_summary
Cache 1 globals in InitControls
Impact: medium
Show code
L424: tostring L425: tostring
L1245 🟢 uncached_globals_summary
Cache 1 globals in EvaluateUpgrades
Impact: medium
Show code
L1248: pairs L1249: pairs
L1559 🟢 uncached_globals_summary
Cache 1 globals in InitControls
Impact: medium
Show code
L1591: tostring L1592: tostring
L1702 🟢 uncached_globals_summary
Cache 2 globals in LoadRecipes
Impact: medium
Show code
L1711: tostring L1712: tostring L1727: tonumber L1731: tonumber
L1779 🟢 uncached_globals_summary
Cache 1 globals in ListRecipes
Impact: medium
Show code
L1784: pairs L1792: pairs
L1920 🟢 uncached_globals_summary
Cache 2 globals in UpdateItem
Impact: medium
Show code
L1961: pairs L1969: pairs L1986: tostring L1986: tostring
L1083 🟡 string_concat_in_loop
String concat in loop: prereq = prereq .. x
Impact: critical
Show code
prereq = prereq .. "\\n - " .. str
L792 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopRepair:UpdateToolkits(%s) | no proper repair toolkit is found for item [%s], make sure it is supported by repair tools sections", num, main_sec)
L858 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR UIWorkshopRepair:Repair() | can't discharge toolkit with id (%s). Object not found!", self.toolkit_pick[i])
L873 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopRepair:Repair() | object with id (%s) is either not found. Or didn't register new condition (%s)!", id, final_con)
L1147 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! Workshop UI | no proper repair toolkit is found for item [%s], make sure it is supported by repair tools sections", obj:section())
L1734 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! Workshop UI craft | componenet section [%s] not found for [%s] recipe!", tostring(t[3]), id)
L1742 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopCraft:LoadRecipes() | componenet section [%s] not found for [%s] recipe!", tostring(t[5]), id)
L1750 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopCraft:LoadRecipes() | componenet section [%s] not found for [%s] recipe!", tostring(t[7]), id)
L1758 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopCraft:LoadRecipes() | componenet section [%s] not found for [%s] recipe!", tostring(t[9]), id)
L1763 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopCraft:LoadRecipes() | section [%s] not found!",id)
L2216 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
if enable_debug then printf(fmt,...) end
L12 🔴 global_write
Global write: workshop_toolkits
Impact: low
Show code
workshop_toolkits = {
L2164 🟡 unused_local_variable
Local variable 'bind' is assigned but never used
Impact: low
Show code
local bind = dik_to_bind(dik)
L821 🟡 unused_local_variable
Local variable 'sim' is assigned but never used
Impact: low
Show code
local sim = alife()
L1933 🟡 unused_local_variable
Local variable 'counter' is assigned but never used
Impact: low
Show code
local counter = 0

workshop_tool.script

L76 🟢 repeated_obj_section()
obj:section() called 6x in tool_workshop
Impact: low
Show code
Cache obj:section() result
L106 🟢 repeated_obj_section()
obj:section() called 6x in tool_artefact_craft
Impact: low
Show code
Cache obj:section() result

zz_item_artefact.script

L50 🟢 uncached_globals_summary
Cache 1 globals in itms_manager.use_arty_container
Impact: medium
Show code
L55: string.find L58: string.find
L32 🟢 repeated_obj_1_id()
obj_1:id() called 4x in itms_manager.dropdrop_ArtyContainer
Impact: low
Show code
Cache obj_1:id() result
L77 🟢 repeated_obj_id()
obj:id() called 4x in itms_manager.use_arty_container
Impact: low
Show code
Cache obj:id() result
L112 🟢 repeated_self_object_id()
self.object:id() called 14x in <global>
Impact: low
Show code
Cache self.object:id() result
L134 🟢 repeated_self_object_section()
self.object:section() called 4x in <global>
Impact: low
Show code
Cache self.object:section() result
L361 🟢 repeated_item_section()
item:section() called 6x in itr
Impact: low
Show code
Cache item:section() result
L427 🟢 repeated_item_id()
item:id() called 4x in actor_item_to_ruck
Impact: low
Show code
Cache item:id() result
L177 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("loaded condition for %s "..tonumber(m_data.offline_condition), se_obj:section_name())
L256 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("saved condition for %s "..tonumber(m_data.offline_condition), se_obj:section_name())
L267 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("adding %s, %s to se_obj state", self.id, self:name())
L276 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("clearing object %s, %s from m_data", self.id, self:name())
L452 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
function pr(...) if art_dbg then printf(...) end end
L6 🔴 global_write
Global write: cond_t
Impact: low
Show code
cond_t = {}
L7 🔴 global_write
Global write: dist_t
Impact: low
Show code
dist_t = {}
L12 🔴 global_write
Global write: arti_min_eff
Impact: low
Show code
arti_min_eff = 29
L13 🔴 global_write
Global write: arti_max_eff
Impact: low
Show code
arti_max_eff = 37
L15 🔴 global_write
Global write: arti_min_eff
Impact: low
Show code
arti_min_eff = 30
L16 🔴 global_write
Global write: arti_max_eff
Impact: low
Show code
arti_max_eff = 44
L320 🔴 global_write
Global write: base_add_bar
Impact: low
Show code
base_add_bar = utils_ui.UICellItem.Add_ProgressBar
L364 🔴 global_write
Global write: max_mutant_part_cond
Impact: low
Show code
max_mutant_part_cond = knifesm[item:section()].max
L365 🔴 global_write
Global write: min_mutant_part_cond
Impact: low
Show code
min_mutant_part_cond = knifesm[item:section()].min
L368 🔴 global_write
Global write: max_mutant_part_cond
Impact: low
Show code
max_mutant_part_cond = knifesm[item:section()].max
L369 🔴 global_write
Global write: min_mutant_part_cond
Impact: low
Show code
min_mutant_part_cond = knifesm[item:section()].min
L449 🔴 global_write
Global write: cond_t
Impact: low
Show code
cond_t = m_data.cond_t or {}
L117 🟡 potential_nil_access
Potential nil access: 'artefact' from :get_artefact() used without nil check
Impact: low
Show code
artefact:FollowByPath(bind_anomaly_zone.artefact_ways_by_id[id],bind_anomaly_zone.artefact_points_by_id[id],vector():set(force_xz,force_y,force_xz))
L183 🟡 potential_nil_access
Potential nil access: 'ini' from :spawn_ini() used without nil check
Impact: low
Show code
if not (ini and ini:section_exist("fixed_bone")) then
L4 🟡 unused_local_variable
Local variable 'dgr_tg_step' is assigned but never used
Impact: low
Show code
local dgr_tg_step = 2000 --[ms]
L215 🟡 unused_local_variable
Local variable 'val' is assigned but never used
Impact: low
Show code
local val = 0

zz_ui_workshop_keep_crafting_window_open.script

L216 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR UIWorkshopRepair:Repair() | can't discharge toolkit with id (%s). Object not found!", self.toolkit_pick[i])
L231 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopRepair:Repair() | object with id (%s) is either not found. Or didn't register new condition (%s)!", id, final_con)
L101 🔴 global_write
Global write: kind
Impact: low
Show code
kind = SYS_GetParam(0, self.craft_item_r[1], "kind")
L185 🟡 unused_local_variable
Local variable 'sim' is assigned but never used
Impact: low
Show code
local sim = alife()

G.A.M.M.A. Arti Recipes Overhaul

12 files (🟢41 🟡27 🔴31 🔵71)

ammo_maker.script

L23 🟢 table_insert_append
table.insert(to_breakdown, v) -> to_breakdown[#to_breakdown+1] = v
Impact: high
Show code
table.insert(to_breakdown, item)
L106 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str = str .. "\\n- " .. v .. " " .. ui_item.get_sec_name(k)
L14 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ breakdown | no owner found for [%s]", ammo:name())
L88 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ breakdown timer | no owner found")
L111 🔴 global_write
Global write: Disassemble
Impact: low
Show code
Disassemble = item_parts.disassembly_item
L155 🔴 global_write
Global write: NameCustom
Impact: low
Show code
NameCustom = ui_inventory.UIInventory.Name_Custom
L165 🔴 global_write
Global write: ActionCustom
Impact: low
Show code
ActionCustom = ui_inventory.UIInventory.Action_Custom
L37 🟡 potential_nil_access
Potential nil access: 'npc' from db.actor() used without nil check
Impact: low
Show code
CreateTimeEvent("ammo_maker","delay_disassembly" .. ammo:id(), delay, timer_disassembly_item, npc:id(), tbl, name)
L4 🟡 unused_local_variable
Local variable 'd_flag' is assigned but never used
Impact: low
Show code
local d_flag = false
L5 🟡 unused_local_variable
Local variable 'd_key' is assigned but never used
Impact: low
Show code
local d_key = "DIK_LSHIFT" -- Saftey key hold (Left Alt)
L182 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_ammo:r_line(ammo , i , "", "")

custom_functor_autoinject.script

L114 🟢 string_len
string.len(pos) -> #pos
Impact: low
Show code
sub_print_r(val,indent..string.rep(" ",string.len(pos)+8))
L115 🟢 string_len
string.len(pos) -> #pos
Impact: low
Show code
printf(indent..string.rep(" ",string.len(pos)+6).."}")
L105 🟢 uncached_globals_summary
Cache 1 globals in sub_print_r
Impact: medium
Show code
L106: tostring L107: tostring
L128 🟢 uncached_globals_summary
Cache 1 globals in print_table
Impact: medium
Show code
L137: type L139: type
L107 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."*"..tostring(t))
L113 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."["..pos.."] => "..tostring(t).." {")
L115 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent..string.rep(" ",string.len(pos)+6).."}")
L117 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."["..pos.."] => "..tostring(val))
L121 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent..tostring(t))
L140 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = function",k)
L143 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s",k,utils_data.vector_to_string(v))
L145 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = userdata", k)
L150 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = true",k)
L152 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = true")
L156 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = false", k)
L158 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = false")
L163 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s", k,v)
L165 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = nil", k,v)
L319 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s, %s", k, v.index)
L322 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s, %s, max custom_functor reached", k, v.index)
L424 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Custom functors, processing queue")
L427 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Custom functors, type %s", v.type)
L464 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("functor slot is not valid, min 1, max 10, your slot: %s", slot)
L479 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("functor slot is not valid min 1, max 10, your slot: %s", slot)
L515 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[" .. k .. "] => ")
L98 🟡 unused_local_variable
Local variable 'table_remove' is assigned but never used
Impact: low
Show code
local table_remove = table.remove

demonized_time_events.script

L23 🟢 uncached_globals_summary
Cache 1 globals in print_table
Impact: medium
Show code
L32: type L34: type
L35 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = function",k)
L38 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s",k,utils_data.vector_to_string(v))
L40 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = userdata", k)
L45 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = true",k)
L47 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = true")
L51 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = false", k)
L53 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = false")
L58 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s", k,v)
L60 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = nil", k,v)
L199 🟡 unused_local_variable
Local variable 'tg_past' is assigned but never used
Impact: low
Show code
local tg_past = 0

inventory_upgrades_mp.script

L4 🔴 global_write
Global write: ini_parts
Impact: low
Show code
ini_parts = itms_manager.ini_parts
L14 🟡 unused_local_variable
Local variable 'class' is assigned but never used
Impact: low
Show code
local class = ini_sys:r_string_ex(item_name, "class")

larp.script

L62 🟢 uncached_globals_summary
Cache 1 globals in get_min_max
Impact: medium
Show code
L63: unpack L63: unpack
L88 🟢 uncached_globals_summary
Cache 1 globals in pick
Impact: medium
Show code
L97: math.random L99: math.random
L69 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR str_explode | missing parameter str = %s, sep = %s",str,sep)
L91 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("Input for coord string %s produced inequal output, returning", str)
L121 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("Input for coord string %s produced inequal output, returning", str)
L97 🔴 global_write
Global write: rnd_x
Impact: low
Show code
rnd_x = math.random(minx, maxx)
L112 🔴 global_write
Global write: coords
Impact: low
Show code
coords = {
L116 🔴 global_write
Global write: buffer
Impact: low
Show code
buffer = str_explode(str, ":")

optimized_time_events.script

L46 🟢 uncached_globals_summary
Cache 1 globals in print_table
Impact: medium
Show code
L55: type L57: type
L58 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = function",k)
L61 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s",k,utils_data.vector_to_string(v))
L63 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = userdata", k)
L68 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = true",k)
L70 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = true")
L74 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = false", k)
L76 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = false")
L81 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s", k,v)
L83 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = nil", k,v)
L222 🟡 unused_local_variable
Local variable 'tg_past' is assigned but never used
Impact: low
Show code
local tg_past = 0

thirst_sleep_changer.script

L4 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(str, ...)
L38 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("thirst not enabled, nothing changed")
L57 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("thirst changed by %s%", perc)
L62 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("sleep not enabled, nothing changed")
L81 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("sleep changed by %s%", perc)
L86 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("thirst not enabled, nothing changed")
L105 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("thirst changed by %s%", perc * 0.1)
L110 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("sleep not enabled, nothing changed")
L129 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("sleep changed by %s%", perc * 0.1)

trader_autoinject.script

L34 🟢 repeated_npc_id()
npc:id() called 3x in trade_manager.update
Impact: low
Show code
Cache npc:id() result
L182 🟢 repeated_item_section()
item:section() called 4x in itr_inv
Impact: low
Show code
Cache item:section() result
L16 🔴 global_write
Global write: find
Impact: low
Show code
find = string.find
L32 🔴 global_write
Global write: TraderUpdate
Impact: low
Show code
TraderUpdate = trade_manager.update

ui_pda_autoinject.script

L16 🟢 table_insert_append
table.insert(new_cat, v) -> new_cat[#new_cat+1] = v
Impact: high
Show code
table.insert(new_cat, section)
L27 🟢 table_insert_append
table.insert(new_art[category].articles, v) -> new_art[category].articles[#new_art[category].articles+1] = v
Impact: high
Show code
table.insert(new_art[category].articles, article)
L15 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("category: processing %s", section)
L21 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("article: processing %s", section)
L58 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("there are %s new categories", #new_cat)
L32 🔴 global_write
Global write: InitArticles
Impact: low
Show code
InitArticles = ui_pda_encyclopedia_tab.pda_encyclopedia_tab.InitArticles
L55 🔴 global_write
Global write: InitCategories
Impact: low
Show code
InitCategories = ui_pda_encyclopedia_tab.pda_encyclopedia_tab.InitCategories
L61 🔴 global_write
Global write: item
Impact: low
Show code
item = ui_pda_encyclopedia_tab.pda_encyclopedia_entry(v, k, clr)
L24 🟡 unused_local_variable
Local variable 'junk1' is assigned but never used
Impact: low
Show code
local junk1, article, category = ini_art:r_line(section, i, "", "")

weight.script

L43 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check (auto-fixable)
Impact: low
Show code
actor:set_actor_max_weight(result_weight)
L44 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:set_actor_max_walk_weight(max_walk_weight)

workshop_autoinject.script

L118 🟢 uncached_globals_summary
Cache 1 globals in ListRecipes
Impact: medium
Show code
L123: pairs L131: pairs
L151 🟢 uncached_globals_summary
Cache 1 globals in LoadRecipes
Impact: medium
Show code
L198: pairs L202: pairs
L305 🟢 uncached_globals_summary
Cache 2 globals in add_recipe
Impact: medium
Show code
L312: tonumber L316: tonumber L315: tostring L317: tostring
L349 🟢 uncached_globals_summary
Cache 2 globals in add_recipe_ui
Impact: medium
Show code
L354: tonumber L357: tonumber L356: tostring L358: tostring
L13 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( "workshop auto: | %s | "..text ,time_global(), ...)
L191 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopCraft:LoadRecipes() | section [%s] not found!",id)
L260 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! workshop_craft_ui:LoadRecipes() | section [%s] not found!",id)
L319 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! Workshop UI craft | componenet section [%s] not found for [%s] recipe!", tostring(t[3]), id)
L327 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopCraft:LoadRecipes() | componenet section [%s] not found for [%s] recipe!", tostring(t[5]), id)
L335 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopCraft:LoadRecipes() | componenet section [%s] not found for [%s] recipe!", tostring(t[7]), id)
L343 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopCraft:LoadRecipes() | componenet section [%s] not found for [%s] recipe!", tostring(t[9]), id)
L360 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! Workshop UI craft | componenet section [%s] not found for [%s] recipe!", tostring(t[3]), id)
L368 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopCraft:LoadRecipes() | componenet section [%s] not found for [%s] recipe!", tostring(t[5]), id)
L376 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopCraft:LoadRecipes() | componenet section [%s] not found for [%s] recipe!", tostring(t[7]), id)
L384 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopCraft:LoadRecipes() | componenet section [%s] not found for [%s] recipe!", tostring(t[9]), id)
L241 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_craft:r_line(ind_str , i , "", "")

zzzz_arti_jamming_repairs.script

L256 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details, with_scope:sub(2))
L262 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details, scope)
L266 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details, sil)
L270 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details, gl)
L290 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details,spare_parts[i])
L301 🟢 table_insert_append
table.insert(upgr_tools, v) -> upgr_tools[#upgr_tools+1] = v
Impact: high
Show code
table.insert(upgr_tools,tool)
L306 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details,upgr_tools[i])
L693 🟢 table_insert_append
table.insert(context_str, v) -> context_str[#context_str+1] = v
Impact: high
Show code
table.insert(context_str, replace_name(k, false))
L694 🟢 table_insert_append
table.insert(context_action, v) -> context_action[#context_action+1] = v
Impact: high
Show code
table.insert(context_action, "replace_part")
L695 🟢 table_insert_append
table.insert(context_params, v) -> context_params[#context_params+1] = v
Impact: high
Show code
table.insert(context_params, {obj:id(), k, repair_kit:section(), false})
L698 🟢 table_insert_append
table.insert(context_str, v) -> context_str[#context_str+1] = v
Impact: high
Show code
table.insert(context_str, replace_name(k, true))
L699 🟢 table_insert_append
table.insert(context_action, v) -> context_action[#context_action+1] = v
Impact: high
Show code
table.insert(context_action, "clean_part")
L700 🟢 table_insert_append
table.insert(context_params, v) -> context_params[#context_params+1] = v
Impact: high
Show code
table.insert(context_params, {obj:id(), k, clean_kit:section(), true})
L702 🟢 table_insert_append
table.insert(context_str, v) -> context_str[#context_str+1] = v
Impact: high
Show code
table.insert(context_str, replace_name(k, true))
L703 🟢 table_insert_append
table.insert(context_action, v) -> context_action[#context_action+1] = v
Impact: high
Show code
table.insert(context_action, "replace_part")
L704 🟢 table_insert_append
table.insert(context_params, v) -> context_params[#context_params+1] = v
Impact: high
Show code
table.insert(context_params, {obj:id(), k, repair_kit:section(), true})
L766 🟢 table_insert_append
table.insert(context_str, v) -> context_str[#context_str+1] = v
Impact: high
Show code
table.insert(context_str, remove_name(k))
L767 🟢 table_insert_append
table.insert(context_action, v) -> context_action[#context_action+1] = v
Impact: high
Show code
table.insert(context_action, "remove_part")
L768 🟢 table_insert_append
table.insert(context_params, v) -> context_params[#context_params+1] = v
Impact: high
Show code
table.insert(context_params, {obj:id(), k, v})
L774 🟢 table_insert_append
table.insert(context_str, v) -> context_str[#context_str+1] = v
Impact: high
Show code
table.insert(context_str, remove_name(nil))
L775 🟢 table_insert_append
table.insert(context_action, v) -> context_action[#context_action+1] = v
Impact: high
Show code
table.insert(context_action, "remove_part")
L776 🟢 table_insert_append
table.insert(context_params, v) -> context_params[#context_params+1] = v
Impact: high
Show code
table.insert(context_params, {obj:id(), k, v})
L55 🟢 uncached_globals_summary
Cache 1 globals in weapon_eval_parts
Impact: medium
Show code
L70: math.random L71: math.random
L695 🟢 repeated_obj_id()
obj:id() called 3x in init_maintenance_menu
Impact: low
Show code
Cache obj:id() result
L577 🟡 string_concat_in_loop
String concat in loop: display_str = display_str .. x
Impact: critical
Show code
display_str = display_str .. process_part(k, v)
L805 🟡 string_concat_in_loop
String concat in loop: str_msg = str_msg .. x
Impact: critical
Show code
str_msg = str_msg .. "\\n -" .. ui_item.get_sec_name(k)
L192 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ item_parts timer | no owner found")
L242 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ item_parts | no owner found for [%s]", obj:name())
L451 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR UIWorkshopRepair:Repair() | can't discharge toolkit with id (%s). Object not found!", self.toolkit_pick[i])
L469 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopRepair:Repair() | object with id (%s) is either not found. Or didn't register new condition (%s)!", id, final_con)
L7 🔴 global_write
Global write: gc
Impact: low
Show code
gc = game.translate_string
L8 🔴 global_write
Global write: has_parts
Impact: low
Show code
has_parts = arti_jamming.has_parts
L9 🔴 global_write
Global write: is_part
Impact: low
Show code
is_part = arti_jamming.is_part
L10 🔴 global_write
Global write: print_dbg
Impact: low
Show code
print_dbg = arti_jamming.print_dbg
L11 🔴 global_write
Global write: print_ws
Impact: low
Show code
print_ws = ui_workshop.print_ws
L12 🔴 global_write
Global write: get_config
Impact: low
Show code
get_config = a_arti_jamming_mcm.get_config
L13 🔴 global_write
Global write: math_floor
Impact: low
Show code
math_floor = math.floor
L14 🔴 global_write
Global write: current_id
Impact: low
Show code
current_id = arti_jamming.current_id
L15 🔴 global_write
Global write: reset_cgd
Impact: low
Show code
reset_cgd = arti_jamming.reset_cgd
L16 🔴 global_write
Global write: SetTip
Impact: low
Show code
SetTip = ui_workshop.SetTip
L82 🔴 global_write
Global write: EvaluateParts
Impact: low
Show code
EvaluateParts = item_parts.evaluate_parts
L220 🔴 global_write
Global write: DisassemblyWeapon
Impact: low
Show code
DisassemblyWeapon = item_parts.disassembly_weapon
L330 🔴 global_write
Global write: WorkshopReplacePart
Impact: low
Show code
WorkshopReplacePart = ui_workshop.UIWorkshopRepair.ReplacePart
L399 🔴 global_write
Global write: WorkshopRepair
Impact: low
Show code
WorkshopRepair = ui_workshop.UIWorkshopRepair.Repair
L495 🔴 global_write
Global write: HowMuch
Impact: low
Show code
HowMuch = inventory_upgrades_mp.how_much_repair
L506 🔴 global_write
Global write: quality_map
Impact: low
Show code
quality_map = {
L513 🔴 global_write
Global write: unique_mapping
Impact: low
Show code
unique_mapping = {
L524 🔴 global_write
Global write: name_mapping
Impact: low
Show code
name_mapping = {
L568 🔴 global_write
Global write: original_build_desc_header
Impact: low
Show code
original_build_desc_header = ui_item.build_desc_header
L326 🟡 potential_nil_access
Potential nil access: 'npc' from :parent() used without nil check
Impact: low
Show code
CreateTimeEvent(0,"delay_disassembly" .. id, delay, timer_disassembly_weapon, npc:id(), result_details, result_conditions, name)
L660 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check (auto-fixable)
Impact: low
Show code
wpn:set_condition( clamp(wpn:condition() + 0.1, 0, 0.999) )
L660 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check (auto-fixable)
Impact: low
Show code
wpn:set_condition( clamp(wpn:condition() + 0.1, 0, 0.999) )
L795 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
wpn:force_unload_magazine(true)
L6 🟡 unused_local_variable
Local variable 'parts_info' is assigned but never used
Impact: low
Show code
local parts_info = {}
L88 🟡 unused_local_variable
Local variable 'm_con' is assigned but never used
Impact: low
Show code
local m_con = math.ceil(obj:condition() * 100) -- default condition of the item
L117 🟡 unused_local_variable
Local variable 'temp_con' is assigned but never used
Impact: low
Show code
local temp_con = {}
L248 🟡 unused_local_variable
Local variable 'get_ammo' is assigned but never used
Impact: low
Show code
local get_ammo = {}
L412 🟡 unused_local_variable
Local variable 'sim' is assigned but never used
Impact: low
Show code
local sim = alife()
L499 🟡 unused_local_variable
Local variable 'class' is assigned but never used
Impact: low
Show code
local class = ini_sys:r_string_ex(item_name, "class")
L534 🟡 unused_local_variable
Local variable 'math_ceil' is assigned but never used
Impact: low
Show code
local math_ceil = math.ceil
L539 🟡 unused_local_variable
Local variable 'clr_y' is assigned but never used
Impact: low
Show code
local clr_y = utils_xml.get_color("yellow")

G.A.M.M.A. Better Quick Release System

1 file (🟢1 🟡8 🔴0 🔵0)

item_backpack.script

L40 🟢 repeated_item_section()
item:section() called 4x in itr_inv
Impact: low
Show code
Cache item:section() result
L20 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local se_obj = alife_create("inv_backpack",actor:position(),actor:level_vertex_id(),actor:game_vertex_id())
L20 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local se_obj = alife_create("inv_backpack",actor:position(),actor:level_vertex_id(),actor:game_vertex_id())
L20 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local se_obj = alife_create("inv_backpack",actor:position(),actor:level_vertex_id(),actor:game_vertex_id())
L103 🟡 potential_nil_access
Potential nil access: 'wpn' from :item_in_slot() used without nil check
Impact: low
Show code
local ammos = utils_item.get_ammo(wpn:section(), wpn:id(), true)
L103 🟡 potential_nil_access
Potential nil access: 'wpn' from :item_in_slot() used without nil check
Impact: low
Show code
local ammos = utils_item.get_ammo(wpn:section(), wpn:id(), true)
L115 🟡 potential_nil_access
Potential nil access: 'item' from :item_in_slot() used without nil check
Impact: low
Show code
if (item and item:id() == obj:id()) then
L128 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L241 🟡 unused_local_variable
Local variable 'bind' is assigned but never used
Impact: low
Show code
local bind = dik_to_bind(dik)

G.A.M.M.A. Binoculars Rework

1 file (🟢2 🟡4 🔴1 🔵0)

bas_nvg_scopes.script

L10 🟢 uncached_globals_summary
Cache 1 globals in zoom_in
Impact: medium
Show code
L12: string.find L15: string.find
L12 🟢 repeated_weapon_section()
weapon:section() called 4x in zoom_in
Impact: low
Show code
Cache weapon:section() result
L101 🔴 global_write
Global write: scoped
Impact: low
Show code
scoped = wpn:cast_Weapon():IsScopeAttached()
L12 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
if weapon and SYS_GetParam(0, weapon:section(), "nv_scope_status") == "1" or string.find(weapon:section(),"wpn_binoc") or upg == true then
L12 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
if weapon and SYS_GetParam(0, weapon:section(), "nv_scope_status") == "1" or string.find(weapon:section(),"wpn_binoc") or upg == true then
L34 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local wpn_sec = weapon:section()
L101 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
scoped = wpn:cast_Weapon():IsScopeAttached()

G.A.M.M.A. Books Pass Time

1 file (🟢0 🟡2 🔴4 🔵0)

Wait.script

L44 🔴 global_write
Global write: NameCustom
Impact: low
Show code
NameCustom = ui_inventory.UIInventory.Name_Custom
L49 🔴 global_write
Global write: sec
Impact: low
Show code
sec = obj:section()
L58 🔴 global_write
Global write: ActionCustom
Impact: low
Show code
ActionCustom = ui_inventory.UIInventory.Action_Custom
L62 🔴 global_write
Global write: sec
Impact: low
Show code
sec = obj:section()
L34 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L40 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end

G.A.M.M.A. Bounty Squads Rework

1 file (🟢1 🟡3 🔴0 🔵1)

sim_squad_bounty.script

L95 🟢 uncached_globals_summary
Cache 1 globals in collect_actor_information
Impact: medium
Show code
L100: pairs L119: pairs
L220 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(message)
L20 🟡 unused_local_variable
Local variable 'delta' is assigned but never used
Impact: low
Show code
local delta = 60*60 -- not used for now
L113 🟡 unused_local_variable
Local variable 'closest_smrt' is assigned but never used
Impact: low
Show code
local closest_smrt = closest_smarts[1][2]
L432 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_bounty_squad:r_line_ex("bounty_squads_by_actor_rank",i,"","")

G.A.M.M.A. Camera reanimation fixes

1 file (🟢1 🟡0 🔴3 🔵0)

camera_reanim_project.script

L108 🟢 table_getn
table.getn(fire_modes) -> #fire_modes
Impact: low
Show code
if fire_modes and table.getn(fire_modes) > 1 then
L115 🔴 global_write
Global write: tg_anim1
Impact: low
Show code
tg_anim1 = 0
L116 🔴 global_write
Global write: tg_anim1_delay
Impact: low
Show code
tg_anim1_delay = 1000
L121 🔴 global_write
Global write: tg_anim1
Impact: low
Show code
tg_anim1 = time_global() + tg_anim1_delay

G.A.M.M.A. Close Quarter Combat

2 files (🟢9 🟡18 🔴135 🔵22)

grok_bo.script

L235 🟢 uncached_globals_summary
Cache 2 globals in monster_on_before_hit
Impact: medium
Show code
L276: string.match L281: string.match L292: string.find L358: string.find
L504 🟢 uncached_globals_summary
Cache 3 globals in npc_on_before_hit
Impact: medium
Show code
L569: string.find L594: string.find L660: math.random L742: math.random L699: tonumber L725: tonumber
L260 🟢 repeated_wpn_section()
wpn:section() called 2x in monster_on_before_hit
Impact: low
Show code
Cache wpn:section() result
L286 🟢 repeated_wpn_id()
wpn:id() called 2x in monster_on_before_hit
Impact: low
Show code
Cache wpn:id() result
L527 🟢 repeated_wpn_section()
wpn:section() called 3x in npc_on_before_hit
Impact: low
Show code
Cache wpn:section() result
L543 🟢 repeated_npc_section()
npc:section() called 2x in npc_on_before_hit
Impact: low
Show code
Cache npc:section() result
L554 🟢 repeated_wpn_id()
wpn:id() called 2x in npc_on_before_hit
Impact: low
Show code
Cache wpn:id() result
L656 🟢 repeated_npc_id()
npc:id() called 2x in npc_on_before_hit
Impact: low
Show code
Cache npc:id() result
L745 🟢 repeated_device
device called 8x in npc_on_before_hit
Impact: low
Show code
local dev = device()
L273 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/////////// Mutant Hit registered: GBO v1.6.6 //////////////////")
L274 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('%s about to be hit by %s in bone %s', monster and monster:name(), shit and shit.draftsman and shit.draftsman:name(), bone_id)
L278 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('Close quarter combat hit detected')
L283 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('Close quarter combat hit detected')
L412 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Critical Hit!")
L420 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Critical Hit!")
L432 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Critical Hit!")
L440 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Critical Hit!")
L455 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Critical Hit!")
L463 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Critical Hit!")
L472 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Critical Hit!")
L481 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Critical Hit!")
L497 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Barrel condition: %s, GBO output damage: %s", barrel_condition, shit.power)
L517 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("npc is surrendering or wounded.")
L538 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/////////// Stalker Hit registered: GBO v1.6.6 //////////////////")
L539 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('%s about to be hit by %s in bone %s', npc and npc:name(), shit and shit.draftsman and shit.draftsman:name(), bone_id)
L706 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Custom bone found. Loading custom_bone values")
L714 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("NPC visual model: %s",npc_viz)
L717 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("NPC model doesn't have a bone profile, loading berill no helm config")
L840 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('%s shot with %s, Weapon power= %s, AP power= %s, Hit multiplier= %s, Air res= %s, Distance= %s m, Barrel condition: %s', ammo_section, sec, wpn_hit_power, k_ap, k_hit, air_res, dist, barrel_condition)
L841 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('Bone hit= %s, Bone damage mult= %s, Bone AP scale= %s, Bone hit fraction= %s, Bone armor= %s', custom_bone_name, custom_bone_dmg[custom_bone_id], custom_bone_ap[custom_bone_id], custom_bone_hf[custom_bone_id], custom_bone_value[custom_bone_id])
L937 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Real AP power= %s, Bone armor after hit= %s, Damages inflicted= %s, Remaining health= %s", k_ap, custom_bone_value[custom_bone_id], life_remove, npc.health)
L1 🔴 global_write
Global write: custom_bone_value
Impact: low
Show code
custom_bone_value = {} -- this a table with each identifier being npcid_boneid, these returns custom bonearmor value. It is filled, alongside the other custom tables, after every new bone hit
L2 🔴 global_write
Global write: custom_bone_ap
Impact: low
Show code
custom_bone_ap = {}
L3 🔴 global_write
Global write: custom_bone_hf
Impact: low
Show code
custom_bone_hf = {}
L4 🔴 global_write
Global write: custom_bone_dmg
Impact: low
Show code
custom_bone_dmg = {}
L5 🔴 global_write
Global write: invincible_npcs_sections
Impact: low
Show code
invincible_npcs_sections = {}
L6 🔴 global_write
Global write: ini_capture
Impact: low
Show code
ini_capture = ini_file("creatures\\grok_bo_models_capture.ltx")
L7 🔴 global_write
Global write: ini_bones
Impact: low
Show code
ini_bones = ini_file("creatures\\grok_bo_bone_profiles.ltx")
L8 🔴 global_write
Global write: ini_damage
Impact: low
Show code
ini_damage = ini_file("creatures\\damages.ltx")
L10 🔴 global_write
Global write: leg_meta_sniper_null
Impact: low
Show code
leg_meta_sniper_null = 1
L11 🔴 global_write
Global write: sniper_bad_bone_shit_reduce
Impact: low
Show code
sniper_bad_bone_shit_reduce = 1
L14 🔴 global_write
Global write: integrated_silencer
Impact: low
Show code
integrated_silencer = {
L30 🔴 global_write
Global write: snipers
Impact: low
Show code
snipers = {
L58 🔴 global_write
Global write: Bone_IDs
Impact: low
Show code
Bone_IDs = {
L128 🔴 global_write
Global write: stalker_damage
Impact: low
Show code
stalker_damage = {
L178 🔴 global_write
Global write: hp_rounds
Impact: low
Show code
hp_rounds = {
L250 🔴 global_write
Global write: wpn
Impact: low
Show code
wpn = level.object_by_id(shit.weapon_id)
L260 🔴 global_write
Global write: sec
Impact: low
Show code
sec = wpn:section()
L267 🔴 global_write
Global write: cqc_mult
Impact: low
Show code
cqc_mult = 1
L268 🔴 global_write
Global write: mutant_mult
Impact: low
Show code
mutant_mult = 0.85
L269 🔴 global_write
Global write: ammo_mult
Impact: low
Show code
ammo_mult = 0.85
L270 🔴 global_write
Global write: spec_monster_mult
Impact: low
Show code
spec_monster_mult = 1.00
L271 🔴 global_write
Global write: bone_mult
Impact: low
Show code
bone_mult = 1.00
L277 🔴 global_write
Global write: cqc_mult
Impact: low
Show code
cqc_mult = 1.50
L282 🔴 global_write
Global write: cqc_mult
Impact: low
Show code
cqc_mult = 1.50
L310 🔴 global_write
Global write: ammo_mult
Impact: low
Show code
ammo_mult = 0.90
L314 🔴 global_write
Global write: ammo_mult
Impact: low
Show code
ammo_mult = 1.00
L318 🔴 global_write
Global write: ammo_mult
Impact: low
Show code
ammo_mult = 1.00
L322 🔴 global_write
Global write: ammo_mult
Impact: low
Show code
ammo_mult = 1.00
L329 🔴 global_write
Global write: ammo_mult
Impact: low
Show code
ammo_mult = 1.00
L333 🔴 global_write
Global write: ammo_mult
Impact: low
Show code
ammo_mult = 1.00
L337 🔴 global_write
Global write: ammo_mult
Impact: low
Show code
ammo_mult = 1.75
L341 🔴 global_write
Global write: ammo_mult
Impact: low
Show code
ammo_mult = 1.00
L345 🔴 global_write
Global write: ammo_mult
Impact: low
Show code
ammo_mult = 1.00
L349 🔴 global_write
Global write: ammo_mult
Impact: low
Show code
ammo_mult = 1.00
L354 🔴 global_write
Global write: barrel_condition
Impact: low
Show code
barrel_condition = nil
L359 🔴 global_write
Global write: barrel_condition
Impact: low
Show code
barrel_condition = v / 100
L364 🔴 global_write
Global write: barrel_condition
Impact: low
Show code
barrel_condition = 1
L367 🔴 global_write
Global write: barrel_condition
Impact: low
Show code
barrel_condition = 1
L370 🔴 global_write
Global write: barrel_condition_corrected
Impact: low
Show code
barrel_condition_corrected = ( 130 - ( 1.12 * barrel_condition ) ) * ( barrel_condition * 1.12 ) / 100
L373 🔴 global_write
Global write: barrel_condition_corrected
Impact: low
Show code
barrel_condition_corrected = 1
L376 🔴 global_write
Global write: barrel_condition
Impact: low
Show code
barrel_condition = 1
L377 🔴 global_write
Global write: barrel_condition_corrected
Impact: low
Show code
barrel_condition_corrected = 1
L383 🔴 global_write
Global write: spec_monster_mult
Impact: low
Show code
spec_monster_mult = 0.85
L387 🔴 global_write
Global write: ammo_mult
Impact: low
Show code
ammo_mult = 1.4
L391 🔴 global_write
Global write: ammo_mult
Impact: low
Show code
ammo_mult = 2.2
L395 🔴 global_write
Global write: ammo_mult
Impact: low
Show code
ammo_mult = 2.3
L399 🔴 global_write
Global write: ammo_mult
Impact: low
Show code
ammo_mult = 1.3
L403 🔴 global_write
Global write: ammo_mult
Impact: low
Show code
ammo_mult = 1.3
L407 🔴 global_write
Global write: ammo_mult
Impact: low
Show code
ammo_mult = 2.00
L411 🔴 global_write
Global write: bone_mult
Impact: low
Show code
bone_mult = 2.00
L417 🔴 global_write
Global write: spec_monster_mult
Impact: low
Show code
spec_monster_mult = 0.75
L419 🔴 global_write
Global write: bone_mult
Impact: low
Show code
bone_mult = 2.00
L425 🔴 global_write
Global write: spec_monster_mult
Impact: low
Show code
spec_monster_mult = 0.95
L429 🔴 global_write
Global write: spec_monster_mult
Impact: low
Show code
spec_monster_mult = 0.85
L431 🔴 global_write
Global write: bone_mult
Impact: low
Show code
bone_mult = 1.40
L437 🔴 global_write
Global write: spec_monster_mult
Impact: low
Show code
spec_monster_mult = 0.85
L439 🔴 global_write
Global write: bone_mult
Impact: low
Show code
bone_mult = 1.60
L445 🔴 global_write
Global write: spec_monster_mult
Impact: low
Show code
spec_monster_mult = 0.95
L447 🔴 global_write
Global write: bone_mult
Impact: low
Show code
bone_mult = 1.30
L452 🔴 global_write
Global write: spec_monster_mult
Impact: low
Show code
spec_monster_mult = 0.80
L454 🔴 global_write
Global write: bone_mult
Impact: low
Show code
bone_mult = 2.00
L460 🔴 global_write
Global write: spec_monster_mult
Impact: low
Show code
spec_monster_mult = 1.10
L462 🔴 global_write
Global write: bone_mult
Impact: low
Show code
bone_mult = 2.00
L469 🔴 global_write
Global write: spec_monster_mult
Impact: low
Show code
spec_monster_mult = 0.85
L471 🔴 global_write
Global write: bone_mult
Impact: low
Show code
bone_mult = 1.50
L478 🔴 global_write
Global write: spec_monster_mult
Impact: low
Show code
spec_monster_mult = 0.60
L480 🔴 global_write
Global write: bone_mult
Impact: low
Show code
bone_mult = 2.20
L521 🔴 global_write
Global write: wpn
Impact: low
Show code
wpn = level.object_by_id(shit.weapon_id)
L527 🔴 global_write
Global write: sec
Impact: low
Show code
sec = wpn:section()
L544 🔴 global_write
Global write: invincible_mult
Impact: low
Show code
invincible_mult = 0
L546 🔴 global_write
Global write: invincible_mult
Impact: low
Show code
invincible_mult = 1
L560 🔴 global_write
Global write: silencer_boost
Impact: low
Show code
silencer_boost = 1.07
L562 🔴 global_write
Global write: silencer_boost
Impact: low
Show code
silencer_boost = 1
L566 🔴 global_write
Global write: silencer_boost
Impact: low
Show code
silencer_boost = 1.07
L590 🔴 global_write
Global write: barrel_condition
Impact: low
Show code
barrel_condition = nil
L595 🔴 global_write
Global write: barrel_condition
Impact: low
Show code
barrel_condition = v / 100
L600 🔴 global_write
Global write: barrel_condition
Impact: low
Show code
barrel_condition = 1
L603 🔴 global_write
Global write: barrel_condition
Impact: low
Show code
barrel_condition = 1
L606 🔴 global_write
Global write: barrel_condition_corrected
Impact: low
Show code
barrel_condition_corrected = ( 130 - ( 1.12 * barrel_condition ) ) * ( barrel_condition * 1.12 ) / 100
L609 🔴 global_write
Global write: barrel_condition_corrected
Impact: low
Show code
barrel_condition_corrected = 1
L612 🔴 global_write
Global write: barrel_condition
Impact: low
Show code
barrel_condition = 1
L613 🔴 global_write
Global write: barrel_condition_corrected
Impact: low
Show code
barrel_condition_corrected = 1
L618 🔴 global_write
Global write: ammo_mult
Impact: low
Show code
ammo_mult = 1.00
L621 🔴 global_write
Global write: ammo_mult
Impact: low
Show code
ammo_mult = 1.75
L634 🔴 global_write
Global write: leg_meta_sniper_null
Impact: low
Show code
leg_meta_sniper_null = 0
L640 🔴 global_write
Global write: hp_no_penetration_penalty
Impact: low
Show code
hp_no_penetration_penalty = hp_rounds[ammo_section]
L642 🔴 global_write
Global write: hp_no_penetration_penalty
Impact: low
Show code
hp_no_penetration_penalty = 1
L684 🔴 global_write
Global write: bone_ap_boost
Impact: low
Show code
bone_ap_boost = bone_id
L723 🔴 global_write
Global write: ini_npc_armor
Impact: low
Show code
ini_npc_armor = ini_file(npc_armor_path)
L726 🔴 global_write
Global write: npc_bone_profile_name
Impact: low
Show code
npc_bone_profile_name = ini_bones:r_string(npc_armor_section,"head_profile")
L728 🔴 global_write
Global write: npc_bone_profile_name
Impact: low
Show code
npc_bone_profile_name = ini_bones:r_string(npc_armor_section,"bone_profile")
L740 🔴 global_write
Global write: pos
Impact: low
Show code
pos = npc:bone_position(custom_bone_name)
L741 🔴 global_write
Global write: fxdir
Impact: low
Show code
fxdir = shit.direction
L745 🔴 global_write
Global write: camdir
Impact: low
Show code
camdir = device().cam_pos:add(device().cam_dir:mul(dist))
L748 🔴 global_write
Global write: fx
Impact: low
Show code
fx = particles_object("anomaly2\\gravi_anomaly_shield_00")
L769 🔴 global_write
Global write: sin_res
Impact: low
Show code
sin_res = 1
L771 🔴 global_write
Global write: sin_res
Impact: low
Show code
sin_res = 0.30
L772 🔴 global_write
Global write: isg_res
Impact: low
Show code
isg_res = 0.90
L773 🔴 global_write
Global write: pos
Impact: low
Show code
pos = npc:bone_position(custom_bone_name)
L774 🔴 global_write
Global write: fxdir
Impact: low
Show code
fxdir = shit.direction
L778 🔴 global_write
Global write: camdir
Impact: low
Show code
camdir = device().cam_pos:add(device().cam_dir:mul(dist))
L781 🔴 global_write
Global write: fx
Impact: low
Show code
fx = particles_object("monsters\\effects\\bloodsucker_trail")
L784 🔴 global_write
Global write: fx
Impact: low
Show code
fx = particles_object("monsters\\effects\\polter_trails_02")
L787 🔴 global_write
Global write: fx
Impact: low
Show code
fx = particles_object("anomaly2\\effects\\bloodsucker_shleyf")
L795 🔴 global_write
Global write: sin_res
Impact: low
Show code
sin_res = 0.3
L796 🔴 global_write
Global write: isg_res
Impact: low
Show code
isg_res = 1
L801 🔴 global_write
Global write: isg_res
Impact: low
Show code
isg_res = 1
L803 🔴 global_write
Global write: isg_res
Impact: low
Show code
isg_res = 0.65
L804 🔴 global_write
Global write: sin_res
Impact: low
Show code
sin_res = 0.70
L805 🔴 global_write
Global write: pos
Impact: low
Show code
pos = npc:bone_position(custom_bone_name)
L806 🔴 global_write
Global write: fx
Impact: low
Show code
fx = particles_object("hit_fx\\hit_metal_0" .. math.random(0,3))
L807 🔴 global_write
Global write: fxdir
Impact: low
Show code
fxdir = shit.direction
L812 🔴 global_write
Global write: camdir
Impact: low
Show code
camdir = device().cam_pos:add(device().cam_dir:mul(dist))
L819 🔴 global_write
Global write: isg_res
Impact: low
Show code
isg_res = 0.90
L820 🔴 global_write
Global write: sin_res
Impact: low
Show code
sin_res = 0.80
L824 🔴 global_write
Global write: isg_res
Impact: low
Show code
isg_res = 1.10
L877 🔴 global_write
Global write: pbadamage
Impact: low
Show code
pbadamage = hit(shit)
L893 🔴 global_write
Global write: pos
Impact: low
Show code
pos = npc:bone_position(custom_bone_name)
L894 🔴 global_write
Global write: fx
Impact: low
Show code
fx = particles_object("hit_fx\\hit_metal_0" .. math.random(0,3))
L895 🔴 global_write
Global write: fxdir
Impact: low
Show code
fxdir = shit.direction
L900 🔴 global_write
Global write: camdir
Impact: low
Show code
camdir = device().cam_pos:add(device().cam_dir:mul(dist))
L911 🔴 global_write
Global write: fx
Impact: low
Show code
fx = particles_object("anomaly2\\effects\\body_tear_blood_01")
L912 🔴 global_write
Global write: pos
Impact: low
Show code
pos = npc:bone_position(custom_bone_name)
L922 🔴 global_write
Global write: life_remove
Impact: low
Show code
life_remove = shit.power * invincible_mult
L954 🔴 global_write
Global write: life_remove
Impact: low
Show code
life_remove = nil
L966 🔴 global_write
Global write: bone_name
Impact: low
Show code
bone_name = head_bones[bone_id] or "bip01_spine"
L260 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
sec = wpn:section()
L286 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
local wpn_id = wpn:id()
L287 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
local ammo_type_number = wpn:get_ammo_type()
L353 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
if (IsWeapon(wpn) and (not IsItem("fake_ammo_wpn",wpn:section()))) or (wpn:parent() and wpn:parent():id() ~= 0) then
L353 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
if (IsWeapon(wpn) and (not IsItem("fake_ammo_wpn",wpn:section()))) or (wpn:parent() and wpn:parent():id() ~= 0) then
L353 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
if (IsWeapon(wpn) and (not IsItem("fake_ammo_wpn",wpn:section()))) or (wpn:parent() and wpn:parent():id() ~= 0) then
L355 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
local parts = se_load_var(wpn:id(), wpn:name(), "parts")
L355 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
local parts = se_load_var(wpn:id(), wpn:name(), "parts")
L527 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
sec = wpn:section()
L554 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
local wpn_id = wpn:id()
L555 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
local ammo_type_number = wpn:get_ammo_type()
L559 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
if wpn and wpn:weapon_is_silencer() then
L581 🟡 unused_local_variable
Local variable 'wm_size' is assigned but never used
Impact: low
Show code
local wm_size = ini_sys:r_float_ex(ammo_section, "wm_size") or 0.05

quickdraw.script

L80 🔴 global_write
Global write: knife_to_degrade
Impact: low
Show code
knife_to_degrade = db.actor:object(knifesm[1])
L85 🔴 global_write
Global write: knife_to_degrade
Impact: low
Show code
knife_to_degrade = db.actor:object(knifesm[2])
L90 🔴 global_write
Global write: knife_to_degrade
Impact: low
Show code
knife_to_degrade = db.actor:object(knifesm[3])
L95 🔴 global_write
Global write: knife_to_degrade
Impact: low
Show code
knife_to_degrade = db.actor:object(knifesm[4])
L100 🔴 global_write
Global write: knife_to_degrade
Impact: low
Show code
knife_to_degrade = db.actor:object(knifesm[5])
L106 🔴 global_write
Global write: knife_to_degrade
Impact: low
Show code
knife_to_degrade = db.actor:object(knifesm[6])
L112 🔴 global_write
Global write: knife_to_degrade
Impact: low
Show code
knife_to_degrade = db.actor:object(knifesm[7])
L118 🔴 global_write
Global write: knife_to_degrade
Impact: low
Show code
knife_to_degrade = db.actor:object(knifesm[8])
L144 🔴 global_write
Global write: last_slot
Impact: low
Show code
last_slot = db.actor:active_slot() or 0
L139 🟡 potential_nil_access
Potential nil access: 'anm' from :item_in_slot() used without nil check
Impact: low
Show code
alife():release(alife_object(anm:id()))
L147 🟡 potential_nil_access
Potential nil access: 'wpn' from :item_in_slot() used without nil check
Impact: low
Show code
if (wpn) then wpn:switch_state(3) end
L166 🟡 potential_nil_access
Potential nil access: 'wpn' from :item_in_slot() used without nil check
Impact: low
Show code
if (wpn) then wpn:switch_state(3) end
L176 🟡 potential_nil_access
Potential nil access: 'anm' from :item_in_slot() used without nil check
Impact: low
Show code
anm:switch_state(5)
L180 🟡 potential_nil_access
Potential nil access: 'anm' from :item_in_slot() used without nil check
Impact: low
Show code
if (anm) then alife():release(alife_object(anm:id())) end

G.A.M.M.A. Companions Rework

1 file (🟢0 🟡1 🔴0 🔵0)

grok_get_companions.script

L5 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local actor_rank = actor:character_rank() or 0

G.A.M.M.A. Cooking Overhaul

4 files (🟢1 🟡7 🔴37 🔵6)

bind_campfire.script

L15 🔴 global_write
Global write: campfires_all
Impact: low
Show code
campfires_all = {}
L173 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 0
L174 🔴 global_write
Global write: delay
Impact: low
Show code
delay = 225
L181 🔴 global_write
Global write: tg
Impact: low
Show code
tg = time_global()
L184 🔴 global_write
Global write: grok_delay
Impact: low
Show code
grok_delay = tg + delay
L185 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 1
L189 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 0
L197 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
if obj and (pos:distance_to_sqr(obj:position()) <= dist_cf + 2) then

campfire_placeable.script

L51 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("tbl is empty || .level_name is now: %s", prev_level.level_name)
L53 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("tbl is not empty")
L55 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(".level_name is not equal curr_level")
L61 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("- Object deleted (id): %s", se_obj.id)
L230 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s degraded for: %s %", sec, degr_for * 100)
L242 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Time spent on chopping wood: %s Minutes", minutes)
L265 🔴 global_write
Global write: NameCustom
Impact: low
Show code
NameCustom = ui_inventory.UIInventory.Name_Custom
L282 🔴 global_write
Global write: ActionCustom
Impact: low
Show code
ActionCustom = ui_inventory.UIInventory.Action_Custom
L426 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update
L73 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
local cobj = obj and obj:cast_ZoneCampfire()
L252 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L259 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L269 🟡 potential_nil_access
Potential nil access: 'active_item' from :active_item() used without nil check
Impact: low
Show code
local active_id = active_item and active_item:id()
L285 🟡 potential_nil_access
Potential nil access: 'active_item' from :active_item() used without nil check
Impact: low
Show code
local active_id = active_item and active_item:id()
L285 🟡 unused_local_variable
Local variable 'active_id' is assigned but never used
Impact: low
Show code
local active_id = active_item and active_item:id()

enhanced_animations.script

L30 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = true
L31 🔴 global_write
Global write: mutant_loot_mod
Impact: low
Show code
mutant_loot_mod = true
L34 🔴 global_write
Global write: used_item
Impact: low
Show code
used_item,ea_flag,fake_monster,det_active = nil
L34 🔴 global_write
Global write: ea_flag
Impact: low
Show code
used_item,ea_flag,fake_monster,det_active = nil
L34 🔴 global_write
Global write: fake_monster
Impact: low
Show code
used_item,ea_flag,fake_monster,det_active = nil
L34 🔴 global_write
Global write: det_active
Impact: low
Show code
used_item,ea_flag,fake_monster,det_active = nil
L52 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = not enable_animations
L58 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = ui_mcm.get("EA_settings/enable_animations")
L59 🔴 global_write
Global write: mutant_loot_mod
Impact: low
Show code
mutant_loot_mod = ui_mcm.get("EA_settings/mutant_loot")
L61 🔴 global_write
Global write: mutant_loot_mod
Impact: low
Show code
mutant_loot_mod = false
L65 🔴 global_write
Global write: mutant_loot_mod
Impact: low
Show code
mutant_loot_mod = ini_eff:r_bool_ex("anim_settings", "mutant_loot_mod")
L66 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = ui_options.get("video/player/animations")
L92 🔴 global_write
Global write: used_item
Impact: low
Show code
used_item = item
L131 🔴 global_write
Global write: tmr
Impact: low
Show code
tmr = ini_eff:r_float_ex(used_item, "tm")
L148 🔴 global_write
Global write: tmr
Impact: low
Show code
tmr = ini_eff:r_float_ex("item_ea_harv_wpn_knife", "anim_length")
L262 🔴 global_write
Global write: used_item
Impact: low
Show code
used_item = nil
L273 🔴 global_write
Global write: fake_monster
Impact: low
Show code
fake_monster = used_monster
L275 🔴 global_write
Global write: ea_flag
Impact: low
Show code
ea_flag = true
L277 🔴 global_write
Global write: ea_flag
Impact: low
Show code
ea_flag = nil
L279 🔴 global_write
Global write: fake_monster
Impact: low
Show code
fake_monster = nil
L306 🔴 global_write
Global write: det_active
Impact: low
Show code
det_active = db.actor:active_detector() or nil

take_item_anim.script

L35 🟢 repeated_item_section()
item:section() called 2x in actor_on_item_take
Impact: low
Show code
Cache item:section() result
L21 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = ui_mcm.get("EA_settings/enable_animations")
L22 🔴 global_write
Global write: default_dist
Impact: low
Show code
default_dist = ui_mcm.get("EA_settings/take_dist")
L24 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = ui_options.get("video/player/animations")
L25 🔴 global_write
Global write: default_dist
Impact: low
Show code
default_dist = 0.12
L38 🔴 global_write
Global write: anim_used
Impact: low
Show code
anim_used = true
L61 🔴 global_write
Global write: anim_used
Impact: low
Show code
anim_used = false

G.A.M.M.A. Crook's Identification UI Fix

2 files (🟢1 🟡5 🔴14 🔵1)

factionID_hud_mcm.script

L419 🟢 repeated_obj_id()
obj:id() called 2x in actor_on_update
Impact: low
Show code
Cache obj:id() result
L381 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("ERROR: faction ID nil in tick")
L222 🔴 global_write
Global write: op
Impact: low
Show code
op ={ id= "targetID" , sh = true , gr =
L306 🔴 global_write
Global write: rank
Impact: low
Show code
rank = game.translate_string("st_rank_" .. ranks.get_obj_rank_name(obj)) or ""
L308 🔴 global_write
Global write: rank
Impact: low
Show code
if not rankID then rank = nil end
L313 🔴 global_write
Global write: rank
Impact: low
Show code
rank = nil
L402 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 0
L403 🔴 global_write
Global write: delay
Impact: low
Show code
delay = 100
L407 🔴 global_write
Global write: tg
Impact: low
Show code
tg = time_global()
L410 🔴 global_write
Global write: grok_delay
Impact: low
Show code
grok_delay = tg + delay
L411 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 1
L415 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 0
L419 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
if HUD and obj and IsStalker(obj) and obj:id() ~= 0 and (obj.health > 0 or deadID) and obj:character_community() and HUD.factions[obj:character_community()] then
L419 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
if HUD and obj and IsStalker(obj) and obj:id() ~= 0 and (obj.health > 0 or deadID) and obj:character_community() and HUD.factions[obj:character_community()] then
L419 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
if HUD and obj and IsStalker(obj) and obj:id() ~= 0 and (obj.health > 0 or deadID) and obj:character_community() and HUD.factions[obj:character_community()] then
L422 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
if obj:id() ~= LastHitObject:id() then
L516 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
if obj and obj.health <= 0 and LastHitObject and LastHitObject:id() == obj:id() then

grok_crooks_ui_data_remover.script

L3 🔴 global_write
Global write: clear_id
Impact: low
Show code
clear_id = 0
L4 🔴 global_write
Global write: clear_name
Impact: low
Show code
clear_name = 0
L18 🔴 global_write
Global write: clear_id
Impact: low
Show code
clear_id = 1
L23 🔴 global_write
Global write: clear_name
Impact: low
Show code
clear_name = 1

G.A.M.M.A. DNPCAV Crash Fix

1 file (🟢0 🟡0 🔴1 🔵0)

grok_dnpcav_base_move_monkey_patch.script

L1 🔴 global_write
Global write: Base_Action_Move
Impact: low
Show code
Base_Action_Move = ui_inventory.UIInventory.Action_Move

G.A.M.M.A. Disguise does not remove patches

1 file (🟢2 🟡11 🔴3 🔵17)

gameplay_disguise.script

L433 🟢 uncached_globals_summary
Cache 1 globals in time_to_str
Impact: medium
Show code
L434: tostring L434: tostring
L571 🟢 uncached_globals_summary
Cache 1 globals in get_npc_awareness
Impact: medium
Show code
L574: string.find L576: string.find
L1290 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str = str .. h_a
L183 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR update default community | community (%s) doesn't exist", tostring(comm))
L229 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR update community | community (%s) doesn't exist", tostring(new_comm))
L308 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("% Disguise highest_suspicion = %s", highest_suspicion.value)
L449 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("% Disguise | npc seeing you | id: %s - comm: %s - name: %s", id, character_community(npc), npc:character_name())
L450 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("% Disguise | [%s] memory | awareness: %s - memory: %s - first_seen: %s - last_seen: %s", id, m.awareness, m.memo, time_to_str(m.first_seen), time_to_str(m.last_seen))
L451 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("% Disguise | [%s] on equipment | active item: %s - weapon: %s - outfit: %s - helmet: %s - backpack: %s - inv: %s ", id, t.active_item, t.weapon, t.outfit, t.helmet, t.backpack, t.inventory)
L452 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("% Disguise | [%s] on behaviour | speed: %s - distance: %s - stay_time: %s", id, t.speed, t.distance, t.stay_time)
L453 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("% Disguise | [%s] suspicion | spike: %s - result: %s", id, spike, m.suspicion)
L454 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("--==============================================================")
L464 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("% Disguise debug_memoery | [%s] still remembers you (%s sec left)",k, (v.memo - time_passed))
L466 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("% Disguise debug_memoery | [%s] forgot you",k)
L855 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("% Disguise calc | fraction [%s] = active_item [%s] + weapon [%s] + outfit [%s] + helmet [%s] + backpack [%s] + inventory [%s]", fraction, (factor.active_item and 1 or 0), (factor.weapon and 1 or 0), (factor.outfit and 1 or 0), (factor.helmet and 1 or 0), (factor.backpack and 1 or 0), (factor.inventory and 1 or 0))
L856 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("% Disguise calc | itm_factor [%s] = active_item [%s]x[%s] + weapon [%s]x[%s] + outfit [%s]x[%s] + helmet [%s]x[%s] + backpack [%s]x[%s] + inventory [%s]x[%s] / fraction [%s]", itm_factor, t.active_item, factor.active_item_factor, t.weapon, factor.weapon_factor, t.outfit, factor.outfit_factor, t.helmet, factor.helmet_factor, t.backpack, factor.backpack_factor, t.inventory, factor.inventory_factor, fraction)
L857 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("% Disguise calc | suspicion [%s] = (awareness [%s] x ( t.stay_time [%s] x t.distance [%s] x t.speed [%s]) x itm_factor [%s]) + spike [%s] - best enemy [%s]", suspicion, awareness , t.stay_time , t.distance , t.speed ,itm_factor,((game_achievements.has_achievement("unforeseen_guest")) and clamp(spike-15,0,spike) or spike), (be and (be:id() ~= AC_ID) and 50 or 0))
L858 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("-------------------------------------------------------------")
L1205 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/ Disguise | attached patch to %s", section)
L1219 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/ Disguise | torn patch of %s", section)
L838 🔴 global_write
Global write: itm_factor
Impact: low
Show code
itm_factor = (
L846 🔴 global_write
Global write: itm_factor
Impact: low
Show code
itm_factor = 100 - itm_factor
L848 🔴 global_write
Global write: itm_factor
Impact: low
Show code
itm_factor = 1
L595 🟡 potential_nil_access
Potential nil access: 'active_item' from :active_item() used without nil check
Impact: low
Show code
local section = active_item and active_item:section() or false
L659 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local section = outfit and outfit:section() or false
L686 🟡 potential_nil_access
Potential nil access: 'helmet' from :item_in_slot() used without nil check
Impact: low
Show code
local section = helmet and helmet:section() or false
L717 🟡 potential_nil_access
Potential nil access: 'backpack' from :item_in_slot() used without nil check
Impact: low
Show code
local section = backpack and backpack:section() or false
L852 🟡 potential_nil_access
Potential nil access: 'be' from :best_enemy() used without nil check
Impact: low
Show code
local suspicion = (awareness * ( t.stay_time * t.distance * t.speed ) * itm_factor) + ((game_achievements.has_achievement("unforeseen_guest")) and clamp(spike-15,0,spike) or spike) - (be and (be:id() ~= AC_ID) and 50 or 0)
L857 🟡 potential_nil_access
Potential nil access: 'be' from :best_enemy() used without nil check
Impact: low
Show code
printf("% Disguise calc | suspicion [%s] = (awareness [%s] x ( t.stay_time [%s] x t.distance [%s] x t.speed [%s]) x itm_factor [%s]) + spike [%s] - best enemy [%s]", suspicion, awareness , t.stay_time , t.distance , t.speed ,itm_factor,((game_achievements.has_achievement("unforeseen_guest")) and clamp(spike-15,0,spike) or spike), (be and (be:id() ~= AC_ID) and 50 or 0))
L1066 🟡 potential_nil_access
Potential nil access: 'item' from :item_in_slot() used without nil check
Impact: low
Show code
local id = item and item:id() or 0
L1161 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L322 🟡 unused_local_variable
Local variable 'hs_clean' is assigned but never used
Impact: low
Show code
local time_passed, hs_clean
L836 🟡 unused_local_variable
Local variable 'item_factor' is assigned but never used
Impact: low
Show code
local item_factor

G.A.M.M.A. Dynamic Despawner

2 files (🟢3 🟡1 🔴35 🔵0)

grok_dynamic_despawner.script

L250 🟢 uncached_globals_summary
Cache 2 globals in actor_on_update
Impact: medium
Show code
L264: pairs L271: pairs L286: table.remove L290: table.remove
L204 🟢 repeated_npc_id()
npc:id() called 3x in npc_on_update
Impact: low
Show code
Cache npc:id() result
L233 🟢 repeated_npc_id()
npc:id() called 3x in monster_on_update
Impact: low
Show code
Cache npc:id() result
L179 🔴 global_write
Global write: check_tasks
Impact: low
Show code
check_tasks = grok_dynamic_despawner_mcm.get_config("check_tasks") or true
L180 🔴 global_write
Global write: enabled
Impact: low
Show code
enabled = grok_dynamic_despawner_mcm.get_config("enabled") or true
L181 🔴 global_write
Global write: npc_threshold
Impact: low
Show code
npc_threshold = grok_dynamic_despawner_mcm.get_config("npc_threshold") or 40
L183 🔴 global_write
Global write: online_npcs
Impact: low
Show code
online_npcs = {}
L185 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 0
L186 🔴 global_write
Global write: delay
Impact: low
Show code
delay = 30
L189 🔴 global_write
Global write: tg
Impact: low
Show code
tg = time_global()
L192 🔴 global_write
Global write: grok_delay
Impact: low
Show code
grok_delay = tg + delay
L193 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 1
L197 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 0
L218 🔴 global_write
Global write: trigger3
Impact: low
Show code
trigger3 = 0
L219 🔴 global_write
Global write: delay3
Impact: low
Show code
delay3 = 22
L222 🔴 global_write
Global write: tg
Impact: low
Show code
tg = time_global()
L225 🔴 global_write
Global write: grok_delay3
Impact: low
Show code
grok_delay3 = tg + delay3
L226 🔴 global_write
Global write: trigger3
Impact: low
Show code
trigger3 = 1
L230 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 0
L248 🔴 global_write
Global write: trigger2
Impact: low
Show code
trigger2 = 0
L249 🔴 global_write
Global write: delay2
Impact: low
Show code
delay2 = 2600
L252 🔴 global_write
Global write: tg
Impact: low
Show code
tg = time_global()
L255 🔴 global_write
Global write: grok_delay2
Impact: low
Show code
grok_delay2 = tg + delay2
L256 🔴 global_write
Global write: trigger2
Impact: low
Show code
trigger2 = 1
L260 🔴 global_write
Global write: trigger2
Impact: low
Show code
trigger2 = 0
L263 🔴 global_write
Global write: nrows
Impact: low
Show code
nrows = 0
L265 🔴 global_write
Global write: nrows
Impact: low
Show code
nrows = nrows + 1
L268 🔴 global_write
Global write: number_to_remove
Impact: low
Show code
number_to_remove = nrows - npc_threshold
L269 🔴 global_write
Global write: counter
Impact: low
Show code
counter = 0
L272 🔴 global_write
Global write: counter
Impact: low
Show code
counter = counter + 1
L274 🔴 global_write
Global write: online_npcs
Impact: low
Show code
online_npcs = {}
L288 🔴 global_write
Global write: se_item
Impact: low
Show code
se_item = alife_object(npc_id_to_remove)
L297 🔴 global_write
Global write: online_npcs
Impact: low
Show code
online_npcs = {}
L299 🔴 global_write
Global write: online_npcs
Impact: low
Show code
online_npcs = {}
L305 🔴 global_write
Global write: check_tasks
Impact: low
Show code
check_tasks = ui_mcm.get("grok_dd/check_tasks")
L306 🔴 global_write
Global write: enabled
Impact: low
Show code
enabled = ui_mcm.get("grok_dd/enabled")
L307 🔴 global_write
Global write: npc_threshold
Impact: low
Show code
npc_threshold = ui_mcm.get("grok_dd/npc_threshold")
L240 🟡 unused_local_variable
Local variable 'pos' is assigned but never used
Impact: low
Show code
local pos = db.actor:position()

grok_dynamic_despawner_mcm.script

L13 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "grok_dd",sh=true ,gr={

G.A.M.M.A. Economy

11 files (🟢27 🟡35 🔴164 🔵23)

TB_RF_Receiver_Packages.script

L974 🟢 table_insert_append
table.insert(tb_new_queue, v) -> tb_new_queue[#tb_new_queue+1] = v
Impact: high
Show code
local tb_map_names = {}
L1117 🟢 table_insert_append
table.insert(tb_package_queue, v) -> tb_package_queue[#tb_package_queue+1] = v
Impact: high
Show code
end
L1120 🟢 table_insert_append
table.insert(tb_package_queue, v) -> tb_package_queue[#tb_package_queue+1] = v
Impact: high
Show code
local m_data = alife_storage_manager.get_state()
L1255 🟢 table_insert_append
table.insert(notfriends, v) -> notfriends[#notfriends+1] = v
Impact: high
Show code
local bg_array = {}
L1265 🟢 table_insert_append
table.insert(bg_array, v) -> bg_array[#bg_array+1] = v
Impact: high
Show code
local abadguy = tb_maybe_badguys[badguygroup][math.random(#tb_maybe_badguys[badguygroup])]
L892 🟢 uncached_globals_summary
Cache 2 globals in give_bonus_items
Impact: medium
Show code
L909: math.random L910: math.random L911: tostring L914: tostring
L1001 🟢 uncached_globals_summary
Cache 2 globals in failsafepackagespawn
Impact: medium
Show code
L1026: math.random L1032: math.random L1037: tostring L1045: tostring
L1168 🟢 uncached_globals_summary
Cache 2 globals in tb_radio_thing
Impact: medium
Show code
L1194: math.random L1213: math.random L1225: tostring L1233: tostring
L1247 🟢 uncached_globals_summary
Cache 1 globals in spawn_some_badguys
Impact: medium
Show code
L1248: math.random L1258: math.random
L1341 🟢 uncached_globals_summary
Cache 1 globals in actor_on_item_take
Impact: medium
Show code
L1365: tostring L1366: tostring
L1261 🟢 repeated_alife
alife called 3x in spawn_some_badguys
Impact: low
Show code
local sim = alife()
L947 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
--[TB] SET tb_radio_has_run_once FLAG WHEN ADDING ADDON MID-GAME
L978 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
tb_map_names[tb_package_queue[i][2]] = true
L44 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
tb_target_item = 0
L45 🔴 global_write
Global write: tb_sufficient_passed
Impact: low
Show code
tb_sufficient_passed = false
L46 🔴 global_write
Global write: tb_package_active
Impact: low
Show code
tb_package_active = false
L47 🔴 global_write
Global write: tb_reminder
Impact: low
Show code
tb_reminder = "empty"
L48 🔴 global_write
Global write: tb_package_in_level
Impact: low
Show code
tb_package_in_level = "empty"
L49 🔴 global_write
Global write: tb_freq
Impact: low
Show code
tb_freq = 0
L50 🔴 global_write
Global write: tb_sender_icon
Impact: low
Show code
tb_sender_icon = "empty"
L51 🔴 global_write
Global write: tb_scan_time
Impact: low
Show code
tb_scan_time = 4000
L52 🔴 global_write
Global write: tb_tg_scan
Impact: low
Show code
tb_tg_scan = 0
L53 🔴 global_write
Global write: tb_device
Impact: low
Show code
tb_device = "detector_radio"
L54 🔴 global_write
Global write: tb_relation_diff
Impact: low
Show code
tb_relation_diff = 250
L56 🔴 global_write
Global write: tb_target_lvid
Impact: low
Show code
tb_target_lvid = 0
L57 🔴 global_write
Global write: tb_target_gvid
Impact: low
Show code
tb_target_gvid = 0
L58 🔴 global_write
Global write: tb_bonus_items
Impact: low
Show code
tb_bonus_items = 0
L59 🔴 global_write
Global write: tb_badguy_spawned
Impact: low
Show code
tb_badguy_spawned = false
L60 🔴 global_write
Global write: tb_tg_badguys
Impact: low
Show code
tb_tg_badguys = 0
L62 🔴 global_write
Global write: tb_previous_level
Impact: low
Show code
tb_previous_level = "empty"
L64 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
tb_making_package = false
L66 🔴 global_write
Global write: cb_note_given
Impact: low
Show code
cb_note_given = false
L74 🔴 global_write
Global write: cb_reminders
Impact: low
Show code
cb_reminders = "transitions"
L79 🔴 global_write
Global write: cb_upgrades
Impact: low
Show code
-- "never" stops all reminders except for when the package first spawns | "never" сообщение присылается 1 раз при появлении посылки
L83 🔴 global_write
Global write: cb_unpack
Impact: low
Show code
будут наборы улучшений из Anomaly
L93 🔴 global_write
Global write: cb_reminders
Impact: low
Show code
----------------------------------------------------------------------------------------------------------------------------------------------
L94 🔴 global_write
Global write: cb_upgrades
Impact: low
Show code
----------------------------------------------------------------------------------------------------------------------------------------------
L128 🔴 global_write
Global write: tb_package_active
Impact: low
Show code
end
L129 🔴 global_write
Global write: tb_badguy_spawned
Impact: low
L130 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
local function package_cancel(obj, actor_equ, inventory)
L131 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
item_radio.clear_target(tb_target_item)
L132 🔴 global_write
Global write: tb_reminder
Impact: low
Show code
RemoveTimeEvent(tb_target_item,"remind_about_radio_package")
L133 🔴 global_write
Global write: tb_package_in_level
Impact: low
Show code
tb_package_active = false
L134 🔴 global_write
Global write: tb_scan_time
Impact: low
Show code
tb_badguy_spawned = false
L143 🔴 global_write
Global write: tb_relations
Impact: low
Show code
db.actor:give_game_news(game.translate_string("tb_anon_sender"), game.translate_string("cb_cancel_package_success"), tb_sender_icon, 0, 20000, 0)
L159 🔴 global_write
Global write: tb_maybe_badguys
Impact: low
Show code
["renegade"] = {0,"ui_tb_package_icon_renegade"},
L175 🔴 global_write
Global write: tb_factions
Impact: low
Show code
["renegade"] = {"sim_default_renegade_0","sim_default_renegade_1","sim_default_renegade_2"},
L177 🔴 global_write
Global write: tb_cut_factions
Impact: low
Show code
}
L179 🔴 global_write
Global write: tb_homebases
Impact: low
Show code
--[TB] LIST OF FACTION NAMES
L182 🔴 global_write
Global write: tb_package_queue
Impact: low
Show code
tb_cut_factions = {"army", "bandit", "csky", "dolg", "ecolog", "freedom", "killer", "renegade", "stalker"}
L185 🔴 global_write
Global write: tb_allmaps
Impact: low
L223 🔴 global_write
Global write: tb_package_coords
Impact: low
Show code
["l13u_warlab"] = {"l13_generators", "l12_stancia_2"},
L711 🔴 global_write
Global write: tb_extraloot
Impact: low
Show code
{-7.923800945282, 0.018068969249725, 0.52995783090591, 94, 5303, "tb_loc_w_r", "tb_loc_dbg"}
L728 🔴 global_write
Global write: tb_extraupgrades
Impact: low
Show code
{"batteries_dead","st_batteries"},
L818 🔴 global_write
Global write: CB_streamlined_extraupgrades
Impact: low
Show code
{"upgr_w_3_scope_mount","st_upgr_w_scope_mount"},
L839 🔴 global_write
Global write: tb_junks
Impact: low
Show code
{"upgr_w_3_internal", "st_upgr_w_internal"},
L874 🔴 global_write
Global write: tb_copy_of_itms_manager
Impact: low
Show code
{"af_tapeworm","st_af_tapeworm_name"},
L887 🔴 global_write
Global write: tb_bonus_items
Impact: low
Show code
return true
L900 🔴 global_write
Global write: cb_upgrades
Impact: low
Show code
local extrabonus = false
L977 🔴 global_write
Global write: tb_package_queue
Impact: low
Show code
if not tb_map_names[tb_package_queue[i][2]] then
L1002 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
end
L1006 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
function failsafepackagespawn()
L1010 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
if (surge_state) or (psi_storm_state) then
L1016 🔴 global_write
Global write: tb_package_active
Impact: low
Show code
return false
L1017 🔴 global_write
Global write: tb_badguy_spawned
Impact: low
Show code
end
L1018 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
if tb_making_package == true then
L1019 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
item_radio.clear_target(tb_target_item)
L1020 🔴 global_write
Global write: tb_reminder
Impact: low
Show code
RemoveTimeEvent(tb_target_item,"remind_about_radio_package")
L1021 🔴 global_write
Global write: tb_package_in_level
Impact: low
Show code
tb_package_active = false
L1022 🔴 global_write
Global write: tb_scan_time
Impact: low
Show code
tb_badguy_spawned = false
L1025 🔴 global_write
Global write: tb_package_in_level
Impact: low
Show code
tb_reminder = "empty"
L1033 🔴 global_write
Global write: tb_freq
Impact: low
Show code
local rpos = vector():set(packagespot[1],packagespot[2],packagespot[3])
L1039 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
local rlocat = packagespot[6]
L1040 🔴 global_write
Global write: tb_target_lvid
Impact: low
Show code
local rplace = packagespot[7]
L1041 🔴 global_write
Global write: tb_target_gvid
Impact: low
Show code
local se_obj
L1044 🔴 global_write
Global write: tb_package_active
Impact: low
Show code
tb_target_item = se_obj.id
L1046 🔴 global_write
Global write: tb_reminder
Impact: low
Show code
tb_target_gvid = rgvid
L1050 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
local anonpdamessage = game.translate_string("cb_package_lost") .. " " .. game.translate_string(rlocat) .. " " .. game.translate_string(rplace) .. game.translate_string("tb_use_rf_on_freq") .. " " .. tostring(rfreq) .. game.translate_string("tb_mhz_to_search")
L1054 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
CreateTimeEvent(tb_target_item, "remind_about_radio_package", math.random(900,1800), remindaboutpackage)
L1064 🔴 global_write
Global write: tb_tg_badguys
Impact: low
Show code
function actor_on_update()
L1069 🔴 global_write
Global write: tb_badguy_spawned
Impact: low
Show code
tb_tg_badguys = tg + 2000
L1091 🔴 global_write
Global write: tb_tg_scan
Impact: low
L1108 🔴 global_write
Global write: tb_sender_icon
Impact: low
Show code
if (not tb_making_package) then
L1113 🔴 global_write
Global write: tb_sufficient_passed
Impact: low
Show code
tb_sender_icon = tb_relations[tb_factions[i]][2]
L1131 🔴 global_write
Global write: tb_sender_icon
Impact: low
Show code
tb_radio_thing()
L1132 🔴 global_write
Global write: tb_reminder
Impact: low
Show code
end
L1135 🔴 global_write
Global write: tb_sufficient_passed
Impact: low
Show code
if newrelation >= oldrelation+50 then
L1149 🔴 global_write
Global write: cb_reminders
Impact: low
L1169 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
end
L1173 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
function tb_radio_thing()
L1177 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
if (surge_state) or (psi_storm_state) then
L1187 🔴 global_write
Global write: tb_sender_icon
Impact: low
Show code
local actor_faction = get_actor_true_community()
L1201 🔴 global_write
Global write: tb_package_in_level
Impact: low
Show code
if chosenmap == tb_previous_level then
L1212 🔴 global_write
Global write: tb_previous_level
Impact: low
Show code
else
L1221 🔴 global_write
Global write: tb_freq
Impact: low
Show code
local rpos = vector():set(packagespot[1],packagespot[2],packagespot[3])
L1227 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
local rlocat = packagespot[6]
L1228 🔴 global_write
Global write: tb_target_lvid
Impact: low
Show code
local rplace = packagespot[7]
L1229 🔴 global_write
Global write: tb_target_gvid
Impact: low
Show code
local se_obj
L1232 🔴 global_write
Global write: tb_package_active
Impact: low
Show code
tb_target_item = se_obj.id
L1234 🔴 global_write
Global write: tb_reminder
Impact: low
Show code
tb_target_gvid = rgvid
L1238 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
local anonpdamessage = game.translate_string("tb_package_can_be_found") .. " " .. game.translate_string(rlocat) .. " " .. game.translate_string(rplace) .. game.translate_string("tb_use_rf_on_freq") .. " " .. tostring(rfreq) .. game.translate_string("tb_mhz_to_search")
L1241 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
utils_obj.play_sound("device\\pda\\pda_sos")
L1298 🔴 global_write
Global write: tb_scan_time
Impact: low
Show code
if dist_pos < 10 then
L1309 🔴 global_write
Global write: tb_scan_time
Impact: low
Show code
if (dist_pos >= 10) and (dist_pos < 50) then
L1320 🔴 global_write
Global write: tb_scan_time
Impact: low
Show code
if (dist_pos >= 50) and (dist_pos < 75) then
L1330 🔴 global_write
Global write: tb_scan_time
Impact: low
Show code
end
L1346 🔴 global_write
Global write: cb_unpack
Impact: low
Show code
function actor_on_item_take(item)
L1351 🔴 global_write
Global write: tb_package_active
Impact: low
Show code
cb_unpack = ui_mcm.get ("RF_package_patch/unpacking")
L1352 🔴 global_write
Global write: tb_badguy_spawned
Impact: low
Show code
end
L1353 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
if (itemid == tb_target_item) and tb_package_active == true then
L1354 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
item_radio.clear_target(tb_target_item)
L1355 🔴 global_write
Global write: tb_reminder
Impact: low
Show code
RemoveTimeEvent(tb_target_item,"remind_about_radio_package")
L1356 🔴 global_write
Global write: tb_package_in_level
Impact: low
Show code
tb_package_active = false
L1357 🔴 global_write
Global write: tb_scan_time
Impact: low
Show code
tb_badguy_spawned = false
L1369 🔴 global_write
Global write: tb_bonus_items
Impact: low
Show code
for i=1, 8 do
L1371 🔴 global_write
Global write: tb_bonus_items
Impact: low
Show code
local givename = "quest_package_" .. tostring(i)
L1389 🔴 global_write
Global write: note_given
Impact: low
L1418 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
--[TB] USING tb_radio_has_run_once FLAG FOR ADDING ADDON MID-GAME ELSE NIL DATA IS SET ON GAME LOAD
L1419 🔴 global_write
Global write: tb_sufficient_passed
Impact: low
Show code
--[TB] ADDED tb_radio_1_3_has_run_once FLAG
L1420 🔴 global_write
Global write: tb_package_active
Impact: low
Show code
function load_state(m_data)
L1421 🔴 global_write
Global write: tb_reminder
Impact: low
Show code
local m_data = alife_storage_manager.get_state()
L1422 🔴 global_write
Global write: tb_package_in_level
Impact: low
Show code
if m_data.tb_radio_has_run_once then
L1423 🔴 global_write
Global write: tb_freq
Impact: low
Show code
tb_target_item = m_data.tb_target_item
L1424 🔴 global_write
Global write: tb_sender_icon
Impact: low
Show code
tb_sufficient_passed = m_data.tb_sufficient_passed
L1425 🔴 global_write
Global write: tb_relations
Impact: low
Show code
tb_package_active = m_data.tb_package_active
L1426 🔴 global_write
Global write: tb_package_queue
Impact: low
Show code
tb_reminder = m_data.tb_reminder
L1429 🔴 global_write
Global write: tb_target_lvid
Impact: low
Show code
tb_sender_icon = m_data.tb_sender_icon
L1430 🔴 global_write
Global write: tb_target_gvid
Impact: low
Show code
tb_relations = m_data.tb_relations
L1431 🔴 global_write
Global write: tb_bonus_items
Impact: low
Show code
tb_package_queue = m_data.tb_package_queue
L1432 🔴 global_write
Global write: tb_badguy_spawned
Impact: low
Show code
end
L1435 🔴 global_write
Global write: tb_previous_level
Impact: low
Show code
tb_target_gvid = m_data.tb_target_gvid
L1438 🔴 global_write
Global write: cb_note_given
Impact: low
Show code
end
L1087 🟡 potential_nil_access
Potential nil access: 'obj_det' from :active_detector() used without nil check
Impact: low
Show code
else
L1087 🟡 potential_nil_access
Potential nil access: 'obj_det' from :active_detector() used without nil check
Impact: low
Show code
else
L1087 🟡 potential_nil_access
Potential nil access: 'obj_det' from :active_detector() used without nil check
Impact: low
Show code
else
L1277 🟡 unused_local_variable
Local variable 'tb_highbeep_flash_time' is assigned but never used
Impact: low
Show code
local midbeep = sound_object("detectors\\tb_midbeep")

death_manager.script

L42 🟢 uncached_globals_summary
Cache 3 globals in init_drop_settings
Impact: medium
Show code
L52: pairs L53: pairs L67: tonumber L83: tonumber L85: math.ceil L85: math.ceil
L510 🟢 uncached_globals_summary
Cache 1 globals in itr
Impact: medium
Show code
L516: math.random L520: math.random
L589 🟢 uncached_globals_summary
Cache 1 globals in try_spawn_powders
Impact: medium
Show code
L590: math.random L595: math.random
L610 🟢 uncached_globals_summary
Cache 1 globals in try_spawn_bullets
Impact: medium
Show code
L611: math.random L627: math.random
L634 🟢 uncached_globals_summary
Cache 1 globals in try_spawn_casings
Impact: medium
Show code
L635: math.random L647: math.random
L699 🟢 uncached_globals_summary
Cache 1 globals in set_weapon_drop_condition
Impact: medium
Show code
L704: math.random L706: math.random
L512 🟢 repeated_itm_section()
itm:section() called 3x in itr
Impact: low
Show code
Cache itm:section() result
L737 🟢 repeated_itm_section()
itm:section() called 3x in set_weapon_drop_condition
Impact: low
Show code
Cache itm:section() result
L1070 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str = str .. " , " .. info.sec .. " (" .. info.num .. ")" .. add
L348 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR [%s] is not spawned by ItemProcessor",section)
L1055 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("----------------------------------------------------------")
L1072 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(str)
L1074 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("----------------------------------------------------------")
L21 🔴 global_write
Global write: item_by_story_id
Impact: low
Show code
item_by_story_id = {}
L62 🔴 global_write
Global write: result
Impact: low
Show code
result, id, value = death_ini:r_line_ex(x,i,"","")
L103 🔴 global_write
Global write: item_by_story_id
Impact: low
Show code
item_by_story_id = {}
L153 🔴 global_write
Global write: items_by_npc
Impact: low
Show code
items_by_npc = {} -- table = trade, false = no trade, nil = not asked yet
L520 🔴 global_write
Global write: rng
Impact: low
Show code
rng = math.random(1,3)
L536 🔴 global_write
Global write: rng
Impact: low
Show code
rng = math.random(1,3)
L573 🔴 global_write
Global write: chance
Impact: low
Show code
chance = math.random(0,100)
L590 🔴 global_write
Global write: powder_chance
Impact: low
Show code
powder_chance = math.random(100)
L595 🔴 global_write
Global write: powder_type_chance
Impact: low
Show code
powder_type_chance = math.random(100)
L596 🔴 global_write
Global write: powder_type
Impact: low
Show code
powder_type = "powder_2"
L598 🔴 global_write
Global write: powder_type
Impact: low
Show code
powder_type = "powder_1"
L600 🔴 global_write
Global write: powder_type
Impact: low
Show code
powder_type = "powder_2"
L602 🔴 global_write
Global write: powder_type
Impact: low
Show code
powder_type = "powder_3"
L605 🔴 global_write
Global write: powder_qty
Impact: low
Show code
powder_qty = math.random(8,16)
L611 🔴 global_write
Global write: bullet_chance
Impact: low
Show code
bullet_chance = math.random(100)
L616 🔴 global_write
Global write: bullet_type_tbl
Impact: low
Show code
bullet_type_tbl = {
L627 🔴 global_write
Global write: bullet_type
Impact: low
Show code
bullet_type = bullet_type_tbl[math.random(#bullet_type_tbl)]
L629 🔴 global_write
Global write: bullet_qty
Impact: low
Show code
bullet_qty = math.random(8,16)
L635 🔴 global_write
Global write: casing_chance
Impact: low
Show code
casing_chance = math.random(100)
L640 🔴 global_write
Global write: casing_type_tbl
Impact: low
Show code
casing_type_tbl = {
L647 🔴 global_write
Global write: casing_type
Impact: low
Show code
casing_type = casing_type_tbl[math.random(#casing_type_tbl)]
L649 🔴 global_write
Global write: casing_qty
Impact: low
Show code
casing_qty = math.random(5,15)
L661 🔴 global_write
Global write: af_chance
Impact: low
Show code
af_chance = math.random(100)
L666 🔴 global_write
Global write: af_type_tbl
Impact: low
Show code
af_type_tbl = {
L693 🔴 global_write
Global write: af_type
Impact: low
Show code
af_type = af_type_tbl[math.random(#af_type_tbl)]
L762 🔴 global_write
Global write: chance
Impact: low
Show code
chance = math.random(0,100)
L925 🔴 global_write
Global write: items_by_npc
Impact: low
Show code
items_by_npc = m_data.items_by_npc or {}
L210 🟡 potential_nil_access
Potential nil access: 'ini' from :spawn_ini() used without nil check
Impact: low
Show code
if ini and ini:section_exist("dont_spawn_loot") then
L402 🟡 potential_nil_access
Potential nil access: 'ini' from :spawn_ini() used without nil check
Impact: low
Show code
if ini and ini:section_exist("dont_keep_items") then
L26 🟡 unused_local_variable
Local variable 'visuals' is assigned but never used
Impact: low
Show code
local visuals = {}
L161 🟡 unused_local_variable
Local variable 'sim' is assigned but never used
Impact: low
Show code
local sim = alife()

despawn_monolith_grenades.script

L16 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update

dialogs_yantar.script

L23 🟡 potential_nil_access
Potential nil access: 'o' from :object() used without nil check
Impact: low
Show code
alife_release_id(o:id())

game_statistics.script

L171 🟢 repeated_item_id()
item:id() called 4x in actor_on_item_take
Impact: low
Show code
Cache item:id() result
L250 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Player used debug mode!")
L19 🔴 global_write
Global write: actor_achievements
Impact: low
Show code
actor_achievements = {
L48 🔴 global_write
Global write: actor_artefacts
Impact: low
Show code
actor_artefacts = {
L52 🔴 global_write
Global write: actor_anomaly_maps
Impact: low
Show code
actor_anomaly_maps = {
L56 🔴 global_write
Global write: actor_miscellaneous
Impact: low
Show code
actor_miscellaneous = {
L62 🔴 global_write
Global write: actor_visited_levels
Impact: low
Show code
actor_visited_levels = {
L100 🔴 global_write
Global write: actor_visited_smarts
Impact: low
Show code
actor_visited_smarts = {
L104 🔴 global_write
Global write: actor_statistics
Impact: low
Show code
actor_statistics = {
L140 🔴 global_write
Global write: npc_statistics
Impact: low
Show code
npc_statistics = {
L536 🔴 global_write
Global write: actor_artefacts
Impact: low
Show code
actor_artefacts = data.game_statistics.actor_artefacts or actor_artefacts
L537 🔴 global_write
Global write: actor_anomaly_maps
Impact: low
Show code
actor_anomaly_maps = data.game_statistics.actor_anomaly_maps or actor_anomaly_maps
L538 🔴 global_write
Global write: actor_miscellaneous
Impact: low
Show code
actor_miscellaneous = data.game_statistics.actor_miscellaneous or actor_miscellaneous
L539 🔴 global_write
Global write: actor_visited_levels
Impact: low
Show code
actor_visited_levels = data.game_statistics.actor_visited_levels or actor_visited_levels
L540 🔴 global_write
Global write: actor_visited_smarts
Impact: low
Show code
actor_visited_smarts = data.game_statistics.actor_visited_smarts or actor_visited_smarts
L175 🟡 potential_nil_access
Potential nil access: 'artefact' from :get_artefact() used without nil check
Impact: low
Show code
artefact:FollowByPath("NULL", 0, vector():set(500,500,500))

grok_companions_no_ammo.script

L7 🔴 global_write
Global write: npc
Impact: low
Show code
npc = inventory:GetPartner()

item_recipe.script

L213 🟢 uncached_globals_summary
Cache 2 globals in LoadRecipes
Impact: medium
Show code
L224: tostring L225: tostring L236: tonumber L239: tonumber
L65 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!ERROR item_recipe | no section passed!")
L242 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! Workshop UI craft | componenet section [%s] not found for [%s] recipe!", tostring(t[3]), id)
L250 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! workshop_craft_ui:LoadRecipes() | componenet section [%s] not found for [%s] recipe!", tostring(t[5]), id)
L258 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! workshop_craft_ui:LoadRecipes() | componenet section [%s] not found for [%s] recipe!", tostring(t[7]), id)
L266 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! workshop_craft_ui:LoadRecipes() | componenet section [%s] not found for [%s] recipe!", tostring(t[9]), id)
L271 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! workshop_craft_ui:LoadRecipes() | section [%s] not found!",id)
L16 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L228 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_craft:r_line(ind_str , i , "", "")
L312 🟡 unused_local_variable
Local variable 'bind' is assigned but never used
Impact: low
Show code
local bind = dik_to_bind(dik)

target_prior.script

L233 🟢 uncached_globals_summary
Cache 1 globals in simulation_objects.evaluate_prior
Impact: medium
Show code
L312: pairs L317: pairs
L235 🟢 repeated_alife
alife called 4x in simulation_objects.evaluate_prior
Impact: low
Show code
local sim = alife()
L238 🟢 repeated_target_clsid()
target:clsid() called 4x in simulation_objects.evaluate_prior
Impact: low
Show code
Cache target:clsid() result
L207 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L253 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
if (not is_on_the_same_level(sim:actor(), squad)) then
L267 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local target_of_my_target = target.assigned_target_id and sim:object(target.assigned_target_id)
L336 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local target_level_name = sim:level_name(target_level_id)
L211 🟡 unused_local_variable
Local variable 'pos1' is assigned but never used
Impact: low
Show code
local pos1,lv1,gv1 = obj1:get_location()
L211 🟡 unused_local_variable
Local variable 'lv1' is assigned but never used
Impact: low
Show code
local pos1,lv1,gv1 = obj1:get_location()
L212 🟡 unused_local_variable
Local variable 'pos2' is assigned but never used
Impact: low
Show code
local pos2,lv2,gv2 = obj2:get_location()
L212 🟡 unused_local_variable
Local variable 'lv2' is assigned but never used
Impact: low
Show code
local pos2,lv2,gv2 = obj2:get_location()

ui_mutant_loot.script

L348 🟢 uncached_globals_summary
Cache 1 globals in SetMutantImage
Impact: medium
Show code
L360: tostring L361: tostring
L203 🟢 repeated_obj_id()
obj:id() called 5x in monster_on_actor_use_callback
Impact: low
Show code
Cache obj:id() result
L179 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!ERROR ui_mutant_loot | no game object passed!")
L519 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR ui_mutant_loot | can't retrieve online object of mutant [%s](%s)", self.section, self.id)
L387 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local backpack = actor:item_in_slot(13)
L391 🟡 potential_nil_access
Potential nil access: 'backpack' from :item_in_slot() used without nil check
Impact: low
Show code
if (needs_equipped_hk and (backpack and (backpack:section() == sec_kit_hunt))) or (not needs_equipped_hk and db.actor:object(sec_kit_hunt)) then
L385 🟡 unused_local_variable
Local variable 'sim' is assigned but never used
Impact: low
Show code
local sim = alife()
L115 🟡 unused_local_variable
Local variable 'npc_id' is assigned but never used
Impact: low
Show code
local npc_id = npc and npc:id()
L116 🟡 unused_local_variable
Local variable 'npc_pos' is assigned but never used
Impact: low
Show code
local npc_pos = npc and npc:position()
L117 🟡 unused_local_variable
Local variable 'npc_lvl_id' is assigned but never used
Impact: low
Show code
local npc_lvl_id = npc and npc:level_vertex_id()
L118 🟡 unused_local_variable
Local variable 'npc_game_id' is assigned but never used
Impact: low
Show code
local npc_game_id = npc and npc:game_vertex_id()
L143 🟡 unused_local_variable
Local variable 'uses' is assigned but never used
Impact: low
Show code
local sec_d, uses = utils_item.get_defined_uses(sec)

wpo_loot.script

L39 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("no partskit_tool")
L3 🔴 global_write
Global write: print_dbg
Impact: low
Show code
print_dbg = arti_jamming.print_dbg
L4 🔴 global_write
Global write: has_parts
Impact: low
Show code
has_parts = arti_jamming.has_parts
L6 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update
L18 🟡 unused_local_variable
Local variable 'se_itm' is assigned but never used
Impact: low
Show code
local se_itm = alife_object(item:id())
L49 🟡 unused_local_variable
Local variable 'part_section' is assigned but never used
Impact: low
Show code
local part_section = utils_data.collect_section(prices, "wpo_part_prices")
L53 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, sec, value = prices:r_line("wpo_part_prices" , i , "", "")
L53 🟡 unused_local_variable
Local variable 'value' is assigned but never used
Impact: low
Show code
local result, sec, value = prices:r_line("wpo_part_prices" , i , "", "")

xrs_rnd_npc_loadout.script

L106 🟢 uncached_globals_summary
Cache 1 globals in create_item_on_npc
Impact: medium
Show code
L129: math.random L137: math.random
L291 🟡 string_concat_in_loop
String concat in loop: loadout = loadout .. x
Impact: critical
Show code
loadout = loadout .. "_" .. tbl_rank[k2]
L76 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR: NPC Loadouts | something is wrong in [%s] - %s", section, tmp[1])
L184 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR: NPC Loadouts | wrong ammo_type set for [%s], missing value in ammo_class", section)
L233 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L254 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR: NPC Loadouts | section [%s] doesn't exist", slot)
L300 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR: NPC Loadouts | loadout [%s] doesn't exist", loadout)
L306 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(print_tbl[i])
L32 🟡 unused_local_variable
Local variable 'sfind' is assigned but never used
Impact: low
Show code
local sfind = string.find

G.A.M.M.A. Economy (don't disable, turn on Black Market to buy gear)

11 files (🟢27 🟡35 🔴164 🔵23)

TB_RF_Receiver_Packages.script

L973 🟢 table_insert_append
table.insert(tb_new_queue, v) -> tb_new_queue[#tb_new_queue+1] = v
Impact: high
Show code
local tb_map_names = {}
L1116 🟢 table_insert_append
table.insert(tb_package_queue, v) -> tb_package_queue[#tb_package_queue+1] = v
Impact: high
Show code
end
L1119 🟢 table_insert_append
table.insert(tb_package_queue, v) -> tb_package_queue[#tb_package_queue+1] = v
Impact: high
Show code
local m_data = alife_storage_manager.get_state()
L1280 🟢 table_insert_append
table.insert(notfriends, v) -> notfriends[#notfriends+1] = v
Impact: high
Show code
local bg_array = {}
L1290 🟢 table_insert_append
table.insert(bg_array, v) -> bg_array[#bg_array+1] = v
Impact: high
Show code
local abadguy = tb_maybe_badguys[badguygroup][math.random(#tb_maybe_badguys[badguygroup])]
L891 🟢 uncached_globals_summary
Cache 2 globals in give_bonus_items
Impact: medium
Show code
L908: math.random L909: math.random L910: tostring L913: tostring
L1000 🟢 uncached_globals_summary
Cache 2 globals in failsafepackagespawn
Impact: medium
Show code
L1025: math.random L1031: math.random L1036: tostring L1044: tostring
L1167 🟢 uncached_globals_summary
Cache 2 globals in tb_radio_thing
Impact: medium
Show code
L1198: math.random L1234: math.random L1250: tostring L1258: tostring
L1272 🟢 uncached_globals_summary
Cache 1 globals in spawn_some_badguys
Impact: medium
Show code
L1273: math.random L1283: math.random
L1366 🟢 uncached_globals_summary
Cache 1 globals in actor_on_item_take
Impact: medium
Show code
L1390: tostring L1391: tostring
L1286 🟢 repeated_alife
alife called 3x in spawn_some_badguys
Impact: low
Show code
local sim = alife()
L946 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
--[TB] SET tb_radio_has_run_once FLAG WHEN ADDING ADDON MID-GAME
L977 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
tb_map_names[tb_package_queue[i][2]] = true
L44 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
tb_target_item = 0
L45 🔴 global_write
Global write: tb_sufficient_passed
Impact: low
Show code
tb_sufficient_passed = false
L46 🔴 global_write
Global write: tb_package_active
Impact: low
Show code
tb_package_active = false
L47 🔴 global_write
Global write: tb_reminder
Impact: low
Show code
tb_reminder = "empty"
L48 🔴 global_write
Global write: tb_package_in_level
Impact: low
Show code
tb_package_in_level = "empty"
L49 🔴 global_write
Global write: tb_freq
Impact: low
Show code
tb_freq = 0
L50 🔴 global_write
Global write: tb_sender_icon
Impact: low
Show code
tb_sender_icon = "empty"
L51 🔴 global_write
Global write: tb_scan_time
Impact: low
Show code
tb_scan_time = 4000
L52 🔴 global_write
Global write: tb_tg_scan
Impact: low
Show code
tb_tg_scan = 0
L53 🔴 global_write
Global write: tb_device
Impact: low
Show code
tb_device = "detector_radio"
L54 🔴 global_write
Global write: tb_relation_diff
Impact: low
Show code
tb_relation_diff = 250
L56 🔴 global_write
Global write: tb_target_lvid
Impact: low
Show code
tb_target_lvid = 0
L57 🔴 global_write
Global write: tb_target_gvid
Impact: low
Show code
tb_target_gvid = 0
L58 🔴 global_write
Global write: tb_bonus_items
Impact: low
Show code
tb_bonus_items = 0
L59 🔴 global_write
Global write: tb_badguy_spawned
Impact: low
Show code
tb_badguy_spawned = false
L60 🔴 global_write
Global write: tb_tg_badguys
Impact: low
Show code
tb_tg_badguys = 0
L62 🔴 global_write
Global write: tb_previous_level
Impact: low
Show code
tb_previous_level = "empty"
L64 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
tb_making_package = false
L66 🔴 global_write
Global write: cb_note_given
Impact: low
Show code
cb_note_given = false
L74 🔴 global_write
Global write: cb_reminders
Impact: low
Show code
cb_reminders = "transitions"
L79 🔴 global_write
Global write: cb_upgrades
Impact: low
Show code
-- "never" stops all reminders except for when the package first spawns | "never" сообщение присылается 1 раз при появлении посылки
L83 🔴 global_write
Global write: cb_unpack
Impact: low
Show code
будут наборы улучшений из Anomaly
L93 🔴 global_write
Global write: cb_reminders
Impact: low
Show code
----------------------------------------------------------------------------------------------------------------------------------------------
L94 🔴 global_write
Global write: cb_upgrades
Impact: low
Show code
----------------------------------------------------------------------------------------------------------------------------------------------
L128 🔴 global_write
Global write: tb_package_active
Impact: low
Show code
end
L129 🔴 global_write
Global write: tb_badguy_spawned
Impact: low
L130 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
local function package_cancel(obj, actor_equ, inventory)
L131 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
item_radio.clear_target(tb_target_item)
L132 🔴 global_write
Global write: tb_reminder
Impact: low
Show code
RemoveTimeEvent(tb_target_item,"remind_about_radio_package")
L133 🔴 global_write
Global write: tb_package_in_level
Impact: low
Show code
tb_package_active = false
L134 🔴 global_write
Global write: tb_scan_time
Impact: low
Show code
tb_badguy_spawned = false
L143 🔴 global_write
Global write: tb_relations
Impact: low
Show code
db.actor:give_game_news(game.translate_string("tb_anon_sender"), game.translate_string("cb_cancel_package_success"), tb_sender_icon, 0, 20000, 0)
L159 🔴 global_write
Global write: tb_maybe_badguys
Impact: low
Show code
["renegade"] = {0,"ui_tb_package_icon_renegade"},
L175 🔴 global_write
Global write: tb_factions
Impact: low
Show code
["renegade"] = {"sim_default_renegade_0","sim_default_renegade_1","sim_default_renegade_2"},
L177 🔴 global_write
Global write: tb_cut_factions
Impact: low
Show code
}
L179 🔴 global_write
Global write: tb_homebases
Impact: low
Show code
--[TB] LIST OF FACTION NAMES
L182 🔴 global_write
Global write: tb_package_queue
Impact: low
Show code
tb_cut_factions = {"army", "bandit", "csky", "dolg", "ecolog", "freedom", "killer", "renegade", "stalker"}
L185 🔴 global_write
Global write: tb_allmaps
Impact: low
L225 🔴 global_write
Global write: tb_package_coords
Impact: low
L713 🔴 global_write
Global write: tb_extraloot
Impact: low
Show code
{-7.923800945282, 0.018068969249725, 0.52995783090591, 94, 5303, "tb_loc_w_r", "tb_loc_dbg"}
L730 🔴 global_write
Global write: tb_extraupgrades
Impact: low
Show code
{"batteries_dead","st_batteries"},
L820 🔴 global_write
Global write: CB_streamlined_extraupgrades
Impact: low
Show code
{"upgr_w_3_scope_mount","st_upgr_w_scope_mount"},
L841 🔴 global_write
Global write: tb_junks
Impact: low
Show code
{"upgr_w_3_internal", "st_upgr_w_internal"},
L873 🔴 global_write
Global write: tb_copy_of_itms_manager
Impact: low
Show code
{"af_tapeworm","st_af_tapeworm_name"},
L886 🔴 global_write
Global write: tb_bonus_items
Impact: low
Show code
return true
L899 🔴 global_write
Global write: cb_upgrades
Impact: low
Show code
local extrabonus = false
L976 🔴 global_write
Global write: tb_package_queue
Impact: low
Show code
if not tb_map_names[tb_package_queue[i][2]] then
L1001 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
end
L1005 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
function failsafepackagespawn()
L1009 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
if (surge_state) or (psi_storm_state) then
L1015 🔴 global_write
Global write: tb_package_active
Impact: low
Show code
return false
L1016 🔴 global_write
Global write: tb_badguy_spawned
Impact: low
Show code
end
L1017 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
if tb_making_package == true then
L1018 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
item_radio.clear_target(tb_target_item)
L1019 🔴 global_write
Global write: tb_reminder
Impact: low
Show code
RemoveTimeEvent(tb_target_item,"remind_about_radio_package")
L1020 🔴 global_write
Global write: tb_package_in_level
Impact: low
Show code
tb_package_active = false
L1021 🔴 global_write
Global write: tb_scan_time
Impact: low
Show code
tb_badguy_spawned = false
L1024 🔴 global_write
Global write: tb_package_in_level
Impact: low
Show code
tb_reminder = "empty"
L1032 🔴 global_write
Global write: tb_freq
Impact: low
Show code
local rpos = vector():set(packagespot[1],packagespot[2],packagespot[3])
L1038 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
local rlocat = packagespot[6]
L1039 🔴 global_write
Global write: tb_target_lvid
Impact: low
Show code
local rplace = packagespot[7]
L1040 🔴 global_write
Global write: tb_target_gvid
Impact: low
Show code
local se_obj
L1043 🔴 global_write
Global write: tb_package_active
Impact: low
Show code
tb_target_item = se_obj.id
L1045 🔴 global_write
Global write: tb_reminder
Impact: low
Show code
tb_target_gvid = rgvid
L1049 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
local anonpdamessage = game.translate_string("cb_package_lost") .. " " .. game.translate_string(rlocat) .. " " .. game.translate_string(rplace) .. game.translate_string("tb_use_rf_on_freq") .. " " .. tostring(rfreq) .. game.translate_string("tb_mhz_to_search")
L1053 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
CreateTimeEvent(tb_target_item, "remind_about_radio_package", math.random(900,1800), remindaboutpackage)
L1063 🔴 global_write
Global write: tb_tg_badguys
Impact: low
Show code
function actor_on_update()
L1068 🔴 global_write
Global write: tb_badguy_spawned
Impact: low
Show code
tb_tg_badguys = tg + 2000
L1090 🔴 global_write
Global write: tb_tg_scan
Impact: low
L1107 🔴 global_write
Global write: tb_sender_icon
Impact: low
Show code
if (not tb_making_package) then
L1112 🔴 global_write
Global write: tb_sufficient_passed
Impact: low
Show code
tb_sender_icon = tb_relations[tb_factions[i]][2]
L1130 🔴 global_write
Global write: tb_sender_icon
Impact: low
Show code
tb_radio_thing()
L1131 🔴 global_write
Global write: tb_reminder
Impact: low
Show code
end
L1134 🔴 global_write
Global write: tb_sufficient_passed
Impact: low
Show code
if newrelation >= oldrelation+50 then
L1148 🔴 global_write
Global write: cb_reminders
Impact: low
L1168 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
end
L1172 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
function tb_radio_thing()
L1176 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
if (surge_state) or (psi_storm_state) then
L1188 🔴 global_write
Global write: tb_sender_icon
Impact: low
Show code
sameaspreviousmap = false
L1237 🔴 global_write
Global write: tb_previous_level
Impact: low
Show code
end
L1238 🔴 global_write
Global write: tb_package_in_level
Impact: low
Show code
if not loop_success then
L1246 🔴 global_write
Global write: tb_freq
Impact: low
Show code
local rpos = vector():set(packagespot[1],packagespot[2],packagespot[3])
L1252 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
local rlocat = packagespot[6]
L1253 🔴 global_write
Global write: tb_target_lvid
Impact: low
Show code
local rplace = packagespot[7]
L1254 🔴 global_write
Global write: tb_target_gvid
Impact: low
Show code
local se_obj
L1257 🔴 global_write
Global write: tb_package_active
Impact: low
Show code
tb_target_item = se_obj.id
L1259 🔴 global_write
Global write: tb_reminder
Impact: low
Show code
tb_target_gvid = rgvid
L1263 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
local anonpdamessage = game.translate_string("tb_package_can_be_found") .. " " .. game.translate_string(rlocat) .. " " .. game.translate_string(rplace) .. game.translate_string("tb_use_rf_on_freq") .. " " .. tostring(rfreq) .. game.translate_string("tb_mhz_to_search")
L1266 🔴 global_write
Global write: tb_making_package
Impact: low
Show code
utils_obj.play_sound("device\\pda\\pda_sos")
L1323 🔴 global_write
Global write: tb_scan_time
Impact: low
Show code
if dist_pos < 10 then
L1334 🔴 global_write
Global write: tb_scan_time
Impact: low
Show code
if (dist_pos >= 10) and (dist_pos < 50) then
L1345 🔴 global_write
Global write: tb_scan_time
Impact: low
Show code
if (dist_pos >= 50) and (dist_pos < 75) then
L1355 🔴 global_write
Global write: tb_scan_time
Impact: low
Show code
end
L1371 🔴 global_write
Global write: cb_unpack
Impact: low
Show code
function actor_on_item_take(item)
L1376 🔴 global_write
Global write: tb_package_active
Impact: low
Show code
cb_unpack = ui_mcm.get ("RF_package_patch/unpacking")
L1377 🔴 global_write
Global write: tb_badguy_spawned
Impact: low
Show code
end
L1378 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
if (itemid == tb_target_item) and tb_package_active == true then
L1379 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
item_radio.clear_target(tb_target_item)
L1380 🔴 global_write
Global write: tb_reminder
Impact: low
Show code
RemoveTimeEvent(tb_target_item,"remind_about_radio_package")
L1381 🔴 global_write
Global write: tb_package_in_level
Impact: low
Show code
tb_package_active = false
L1382 🔴 global_write
Global write: tb_scan_time
Impact: low
Show code
tb_badguy_spawned = false
L1394 🔴 global_write
Global write: tb_bonus_items
Impact: low
Show code
for i=1, 8 do
L1396 🔴 global_write
Global write: tb_bonus_items
Impact: low
Show code
local givename = "quest_package_" .. tostring(i)
L1414 🔴 global_write
Global write: note_given
Impact: low
L1443 🔴 global_write
Global write: tb_target_item
Impact: low
Show code
--[TB] USING tb_radio_has_run_once FLAG FOR ADDING ADDON MID-GAME ELSE NIL DATA IS SET ON GAME LOAD
L1444 🔴 global_write
Global write: tb_sufficient_passed
Impact: low
Show code
--[TB] ADDED tb_radio_1_3_has_run_once FLAG
L1445 🔴 global_write
Global write: tb_package_active
Impact: low
Show code
function load_state(m_data)
L1446 🔴 global_write
Global write: tb_reminder
Impact: low
Show code
local m_data = alife_storage_manager.get_state()
L1447 🔴 global_write
Global write: tb_package_in_level
Impact: low
Show code
if m_data.tb_radio_has_run_once then
L1448 🔴 global_write
Global write: tb_freq
Impact: low
Show code
tb_target_item = m_data.tb_target_item
L1449 🔴 global_write
Global write: tb_sender_icon
Impact: low
Show code
tb_sufficient_passed = m_data.tb_sufficient_passed
L1450 🔴 global_write
Global write: tb_relations
Impact: low
Show code
tb_package_active = m_data.tb_package_active
L1451 🔴 global_write
Global write: tb_package_queue
Impact: low
Show code
tb_reminder = m_data.tb_reminder
L1454 🔴 global_write
Global write: tb_target_lvid
Impact: low
Show code
tb_sender_icon = m_data.tb_sender_icon
L1455 🔴 global_write
Global write: tb_target_gvid
Impact: low
Show code
tb_relations = m_data.tb_relations
L1456 🔴 global_write
Global write: tb_bonus_items
Impact: low
Show code
tb_package_queue = m_data.tb_package_queue
L1457 🔴 global_write
Global write: tb_badguy_spawned
Impact: low
Show code
end
L1460 🔴 global_write
Global write: tb_previous_level
Impact: low
Show code
tb_target_gvid = m_data.tb_target_gvid
L1463 🔴 global_write
Global write: cb_note_given
Impact: low
Show code
end
L1086 🟡 potential_nil_access
Potential nil access: 'obj_det' from :active_detector() used without nil check
Impact: low
Show code
else
L1086 🟡 potential_nil_access
Potential nil access: 'obj_det' from :active_detector() used without nil check
Impact: low
Show code
else
L1086 🟡 potential_nil_access
Potential nil access: 'obj_det' from :active_detector() used without nil check
Impact: low
Show code
else
L1302 🟡 unused_local_variable
Local variable 'tb_highbeep_flash_time' is assigned but never used
Impact: low
Show code
local midbeep = sound_object("detectors\\tb_midbeep")

death_manager.script

L42 🟢 uncached_globals_summary
Cache 3 globals in init_drop_settings
Impact: medium
Show code
L52: pairs L53: pairs L67: tonumber L83: tonumber L85: math.ceil L85: math.ceil
L510 🟢 uncached_globals_summary
Cache 1 globals in itr
Impact: medium
Show code
L516: math.random L520: math.random
L589 🟢 uncached_globals_summary
Cache 1 globals in try_spawn_powders
Impact: medium
Show code
L590: math.random L595: math.random
L610 🟢 uncached_globals_summary
Cache 1 globals in try_spawn_bullets
Impact: medium
Show code
L611: math.random L627: math.random
L634 🟢 uncached_globals_summary
Cache 1 globals in try_spawn_casings
Impact: medium
Show code
L635: math.random L647: math.random
L699 🟢 uncached_globals_summary
Cache 1 globals in set_weapon_drop_condition
Impact: medium
Show code
L704: math.random L706: math.random
L512 🟢 repeated_itm_section()
itm:section() called 3x in itr
Impact: low
Show code
Cache itm:section() result
L737 🟢 repeated_itm_section()
itm:section() called 3x in set_weapon_drop_condition
Impact: low
Show code
Cache itm:section() result
L1070 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str = str .. " , " .. info.sec .. " (" .. info.num .. ")" .. add
L348 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR [%s] is not spawned by ItemProcessor",section)
L1055 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("----------------------------------------------------------")
L1072 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(str)
L1074 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("----------------------------------------------------------")
L21 🔴 global_write
Global write: item_by_story_id
Impact: low
Show code
item_by_story_id = {}
L62 🔴 global_write
Global write: result
Impact: low
Show code
result, id, value = death_ini:r_line_ex(x,i,"","")
L103 🔴 global_write
Global write: item_by_story_id
Impact: low
Show code
item_by_story_id = {}
L153 🔴 global_write
Global write: items_by_npc
Impact: low
Show code
items_by_npc = {} -- table = trade, false = no trade, nil = not asked yet
L520 🔴 global_write
Global write: rng
Impact: low
Show code
rng = math.random(1,3)
L536 🔴 global_write
Global write: rng
Impact: low
Show code
rng = math.random(1,3)
L573 🔴 global_write
Global write: chance
Impact: low
Show code
chance = math.random(0,100)
L590 🔴 global_write
Global write: powder_chance
Impact: low
Show code
powder_chance = math.random(100)
L595 🔴 global_write
Global write: powder_type_chance
Impact: low
Show code
powder_type_chance = math.random(100)
L596 🔴 global_write
Global write: powder_type
Impact: low
Show code
powder_type = "powder_2"
L598 🔴 global_write
Global write: powder_type
Impact: low
Show code
powder_type = "powder_1"
L600 🔴 global_write
Global write: powder_type
Impact: low
Show code
powder_type = "powder_2"
L602 🔴 global_write
Global write: powder_type
Impact: low
Show code
powder_type = "powder_3"
L605 🔴 global_write
Global write: powder_qty
Impact: low
Show code
powder_qty = math.random(8,16)
L611 🔴 global_write
Global write: bullet_chance
Impact: low
Show code
bullet_chance = math.random(100)
L616 🔴 global_write
Global write: bullet_type_tbl
Impact: low
Show code
bullet_type_tbl = {
L627 🔴 global_write
Global write: bullet_type
Impact: low
Show code
bullet_type = bullet_type_tbl[math.random(#bullet_type_tbl)]
L629 🔴 global_write
Global write: bullet_qty
Impact: low
Show code
bullet_qty = math.random(8,16)
L635 🔴 global_write
Global write: casing_chance
Impact: low
Show code
casing_chance = math.random(100)
L640 🔴 global_write
Global write: casing_type_tbl
Impact: low
Show code
casing_type_tbl = {
L647 🔴 global_write
Global write: casing_type
Impact: low
Show code
casing_type = casing_type_tbl[math.random(#casing_type_tbl)]
L649 🔴 global_write
Global write: casing_qty
Impact: low
Show code
casing_qty = math.random(5,15)
L661 🔴 global_write
Global write: af_chance
Impact: low
Show code
af_chance = math.random(100)
L666 🔴 global_write
Global write: af_type_tbl
Impact: low
Show code
af_type_tbl = {
L693 🔴 global_write
Global write: af_type
Impact: low
Show code
af_type = af_type_tbl[math.random(#af_type_tbl)]
L762 🔴 global_write
Global write: chance
Impact: low
Show code
chance = math.random(0,100)
L925 🔴 global_write
Global write: items_by_npc
Impact: low
Show code
items_by_npc = m_data.items_by_npc or {}
L210 🟡 potential_nil_access
Potential nil access: 'ini' from :spawn_ini() used without nil check
Impact: low
Show code
if ini and ini:section_exist("dont_spawn_loot") then
L402 🟡 potential_nil_access
Potential nil access: 'ini' from :spawn_ini() used without nil check
Impact: low
Show code
if ini and ini:section_exist("dont_keep_items") then
L26 🟡 unused_local_variable
Local variable 'visuals' is assigned but never used
Impact: low
Show code
local visuals = {}
L161 🟡 unused_local_variable
Local variable 'sim' is assigned but never used
Impact: low
Show code
local sim = alife()

despawn_monolith_grenades.script

L16 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update

dialogs_yantar.script

L23 🟡 potential_nil_access
Potential nil access: 'o' from :object() used without nil check
Impact: low
Show code
alife_release_id(o:id())

game_statistics.script

L171 🟢 repeated_item_id()
item:id() called 4x in actor_on_item_take
Impact: low
Show code
Cache item:id() result
L250 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Player used debug mode!")
L19 🔴 global_write
Global write: actor_achievements
Impact: low
Show code
actor_achievements = {
L48 🔴 global_write
Global write: actor_artefacts
Impact: low
Show code
actor_artefacts = {
L52 🔴 global_write
Global write: actor_anomaly_maps
Impact: low
Show code
actor_anomaly_maps = {
L56 🔴 global_write
Global write: actor_miscellaneous
Impact: low
Show code
actor_miscellaneous = {
L62 🔴 global_write
Global write: actor_visited_levels
Impact: low
Show code
actor_visited_levels = {
L100 🔴 global_write
Global write: actor_visited_smarts
Impact: low
Show code
actor_visited_smarts = {
L104 🔴 global_write
Global write: actor_statistics
Impact: low
Show code
actor_statistics = {
L140 🔴 global_write
Global write: npc_statistics
Impact: low
Show code
npc_statistics = {
L536 🔴 global_write
Global write: actor_artefacts
Impact: low
Show code
actor_artefacts = data.game_statistics.actor_artefacts or actor_artefacts
L537 🔴 global_write
Global write: actor_anomaly_maps
Impact: low
Show code
actor_anomaly_maps = data.game_statistics.actor_anomaly_maps or actor_anomaly_maps
L538 🔴 global_write
Global write: actor_miscellaneous
Impact: low
Show code
actor_miscellaneous = data.game_statistics.actor_miscellaneous or actor_miscellaneous
L539 🔴 global_write
Global write: actor_visited_levels
Impact: low
Show code
actor_visited_levels = data.game_statistics.actor_visited_levels or actor_visited_levels
L540 🔴 global_write
Global write: actor_visited_smarts
Impact: low
Show code
actor_visited_smarts = data.game_statistics.actor_visited_smarts or actor_visited_smarts
L175 🟡 potential_nil_access
Potential nil access: 'artefact' from :get_artefact() used without nil check
Impact: low
Show code
artefact:FollowByPath("NULL", 0, vector():set(500,500,500))

grok_companions_no_ammo.script

L7 🔴 global_write
Global write: npc
Impact: low
Show code
npc = inventory:GetPartner()

item_recipe.script

L213 🟢 uncached_globals_summary
Cache 2 globals in LoadRecipes
Impact: medium
Show code
L224: tostring L225: tostring L236: tonumber L239: tonumber
L65 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!ERROR item_recipe | no section passed!")
L242 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! Workshop UI craft | componenet section [%s] not found for [%s] recipe!", tostring(t[3]), id)
L250 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! workshop_craft_ui:LoadRecipes() | componenet section [%s] not found for [%s] recipe!", tostring(t[5]), id)
L258 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! workshop_craft_ui:LoadRecipes() | componenet section [%s] not found for [%s] recipe!", tostring(t[7]), id)
L266 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! workshop_craft_ui:LoadRecipes() | componenet section [%s] not found for [%s] recipe!", tostring(t[9]), id)
L271 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! workshop_craft_ui:LoadRecipes() | section [%s] not found!",id)
L16 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L228 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_craft:r_line(ind_str , i , "", "")
L312 🟡 unused_local_variable
Local variable 'bind' is assigned but never used
Impact: low
Show code
local bind = dik_to_bind(dik)

target_prior.script

L233 🟢 uncached_globals_summary
Cache 1 globals in simulation_objects.evaluate_prior
Impact: medium
Show code
L312: pairs L317: pairs
L235 🟢 repeated_alife
alife called 4x in simulation_objects.evaluate_prior
Impact: low
Show code
local sim = alife()
L238 🟢 repeated_target_clsid()
target:clsid() called 4x in simulation_objects.evaluate_prior
Impact: low
Show code
Cache target:clsid() result
L207 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L253 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
if (not is_on_the_same_level(sim:actor(), squad)) then
L267 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local target_of_my_target = target.assigned_target_id and sim:object(target.assigned_target_id)
L336 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local target_level_name = sim:level_name(target_level_id)
L211 🟡 unused_local_variable
Local variable 'pos1' is assigned but never used
Impact: low
Show code
local pos1,lv1,gv1 = obj1:get_location()
L211 🟡 unused_local_variable
Local variable 'lv1' is assigned but never used
Impact: low
Show code
local pos1,lv1,gv1 = obj1:get_location()
L212 🟡 unused_local_variable
Local variable 'pos2' is assigned but never used
Impact: low
Show code
local pos2,lv2,gv2 = obj2:get_location()
L212 🟡 unused_local_variable
Local variable 'lv2' is assigned but never used
Impact: low
Show code
local pos2,lv2,gv2 = obj2:get_location()

ui_mutant_loot.script

L348 🟢 uncached_globals_summary
Cache 1 globals in SetMutantImage
Impact: medium
Show code
L360: tostring L361: tostring
L203 🟢 repeated_obj_id()
obj:id() called 5x in monster_on_actor_use_callback
Impact: low
Show code
Cache obj:id() result
L179 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!ERROR ui_mutant_loot | no game object passed!")
L519 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR ui_mutant_loot | can't retrieve online object of mutant [%s](%s)", self.section, self.id)
L387 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local backpack = actor:item_in_slot(13)
L391 🟡 potential_nil_access
Potential nil access: 'backpack' from :item_in_slot() used without nil check
Impact: low
Show code
if (needs_equipped_hk and (backpack and (backpack:section() == sec_kit_hunt))) or (not needs_equipped_hk and db.actor:object(sec_kit_hunt)) then
L385 🟡 unused_local_variable
Local variable 'sim' is assigned but never used
Impact: low
Show code
local sim = alife()
L115 🟡 unused_local_variable
Local variable 'npc_id' is assigned but never used
Impact: low
Show code
local npc_id = npc and npc:id()
L116 🟡 unused_local_variable
Local variable 'npc_pos' is assigned but never used
Impact: low
Show code
local npc_pos = npc and npc:position()
L117 🟡 unused_local_variable
Local variable 'npc_lvl_id' is assigned but never used
Impact: low
Show code
local npc_lvl_id = npc and npc:level_vertex_id()
L118 🟡 unused_local_variable
Local variable 'npc_game_id' is assigned but never used
Impact: low
Show code
local npc_game_id = npc and npc:game_vertex_id()
L143 🟡 unused_local_variable
Local variable 'uses' is assigned but never used
Impact: low
Show code
local sec_d, uses = utils_item.get_defined_uses(sec)

wpo_loot.script

L39 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("no partskit_tool")
L3 🔴 global_write
Global write: print_dbg
Impact: low
Show code
print_dbg = arti_jamming.print_dbg
L4 🔴 global_write
Global write: has_parts
Impact: low
Show code
has_parts = arti_jamming.has_parts
L6 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update
L18 🟡 unused_local_variable
Local variable 'se_itm' is assigned but never used
Impact: low
Show code
local se_itm = alife_object(item:id())
L49 🟡 unused_local_variable
Local variable 'part_section' is assigned but never used
Impact: low
Show code
local part_section = utils_data.collect_section(prices, "wpo_part_prices")
L53 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, sec, value = prices:r_line("wpo_part_prices" , i , "", "")
L53 🟡 unused_local_variable
Local variable 'value' is assigned but never used
Impact: low
Show code
local result, sec, value = prices:r_line("wpo_part_prices" , i , "", "")

xrs_rnd_npc_loadout.script

L106 🟢 uncached_globals_summary
Cache 1 globals in create_item_on_npc
Impact: medium
Show code
L129: math.random L137: math.random
L291 🟡 string_concat_in_loop
String concat in loop: loadout = loadout .. x
Impact: critical
Show code
loadout = loadout .. "_" .. tbl_rank[k2]
L76 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR: NPC Loadouts | something is wrong in [%s] - %s", section, tmp[1])
L184 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR: NPC Loadouts | wrong ammo_type set for [%s], missing value in ammo_class", section)
L233 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L254 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR: NPC Loadouts | section [%s] doesn't exist", slot)
L300 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR: NPC Loadouts | loadout [%s] doesn't exist", loadout)
L306 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(print_tbl[i])
L32 🟡 unused_local_variable
Local variable 'sfind' is assigned but never used
Impact: low
Show code
local sfind = string.find

G.A.M.M.A. Enhanced Recoil

1 file (🟢3 🟡0 🔴6 🔵0)

grok_bo_enhanced_recoil.script

L127 🟢 table_insert_append
table.insert(anims, v) -> anims[#anims+1] = v
Impact: high
Show code
table.insert(anims,{e = i,d = v[2] or math.random(0,1),c = cnt})
L4 🟢 uncached_globals_summary
Cache 1 globals in parse_anims
Impact: medium
Show code
L27: tonumber L46: tonumber
L83 🟢 uncached_globals_summary
Cache 1 globals in shoot_effect
Impact: medium
Show code
L97: math.random L102: math.random
L18 🔴 global_write
Global write: exo_reduction
Impact: low
Show code
exo_reduction = 0
L22 🔴 global_write
Global write: exo_reduction
Impact: low
Show code
exo_reduction = 1
L27 🔴 global_write
Global write: recoil_str
Impact: low
Show code
recoil_str = tonumber(_s[i]) - exo_reduction
L30 🔴 global_write
Global write: recoil_str
Impact: low
Show code
recoil_str = 1
L46 🔴 global_write
Global write: climb_str
Impact: low
Show code
climb_str = tonumber(__e[j]) - exo_reduction
L49 🔴 global_write
Global write: climb_str
Impact: low
Show code
climb_str = 0

G.A.M.M.A. FDDA Rework

2 files (🟢1 🟡0 🔴30 🔵4)

enhanced_animations.script

L165 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
if ea_debug then printf("update = "..failure_timer) end
L170 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("hide weapons for anim failed")
L171 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(used_item or (used_monster and used_monster:section()) or "anim find ERROR")
L172 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(anim_section or "NO ANIM SECTION FOUND")
L30 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = true
L31 🔴 global_write
Global write: mutant_loot_mod
Impact: low
Show code
mutant_loot_mod = true
L35 🔴 global_write
Global write: used_item
Impact: low
Show code
used_item,ea_flag,fake_monster,det_active,anim_section = nil
L35 🔴 global_write
Global write: ea_flag
Impact: low
Show code
used_item,ea_flag,fake_monster,det_active,anim_section = nil
L35 🔴 global_write
Global write: fake_monster
Impact: low
Show code
used_item,ea_flag,fake_monster,det_active,anim_section = nil
L35 🔴 global_write
Global write: det_active
Impact: low
Show code
used_item,ea_flag,fake_monster,det_active,anim_section = nil
L35 🔴 global_write
Global write: anim_section
Impact: low
Show code
used_item,ea_flag,fake_monster,det_active,anim_section = nil
L53 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = not enable_animations
L59 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = ui_mcm.get("EA_settings/enable_animations")
L60 🔴 global_write
Global write: mutant_loot_mod
Impact: low
Show code
mutant_loot_mod = ui_mcm.get("EA_settings/mutant_loot")
L63 🔴 global_write
Global write: mutant_loot_mod
Impact: low
Show code
mutant_loot_mod = false
L67 🔴 global_write
Global write: mutant_loot_mod
Impact: low
Show code
mutant_loot_mod = ini_eff:r_bool_ex("anim_settings", "mutant_loot_mod")
L68 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = ui_options.get("video/player/animations")
L93 🔴 global_write
Global write: used_item
Impact: low
Show code
used_item = item
L95 🔴 global_write
Global write: anim_section
Impact: low
Show code
anim_section = ini_eff:r_string_ex(item, "anm")
L133 🔴 global_write
Global write: tmr
Impact: low
Show code
tmr = ini_eff:r_float_ex(used_item, "tm")
L151 🔴 global_write
Global write: tmr
Impact: low
Show code
tmr = ini_eff:r_float_ex("item_ea_harv_wpn_knife", "anim_length")
L187 🔴 global_write
Global write: anim_section
Impact: low
Show code
anim_section = nil
L287 🔴 global_write
Global write: used_item
Impact: low
Show code
used_item = nil
L298 🔴 global_write
Global write: fake_monster
Impact: low
Show code
fake_monster = used_monster
L300 🔴 global_write
Global write: ea_flag
Impact: low
Show code
ea_flag = true
L302 🔴 global_write
Global write: ea_flag
Impact: low
Show code
ea_flag = nil
L304 🔴 global_write
Global write: fake_monster
Impact: low
Show code
fake_monster = nil
L331 🔴 global_write
Global write: det_active
Impact: low
Show code
det_active = db.actor:active_detector() or nil

take_item_anim.script

L37 🟢 repeated_item_section()
item:section() called 2x in actor_on_item_take
Impact: low
Show code
Cache item:section() result
L21 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = ui_mcm.get("EA_settings/enable_animations")
L22 🔴 global_write
Global write: default_dist
Impact: low
Show code
default_dist = ui_mcm.get("EA_settings/take_dist")
L25 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = ui_options.get("video/player/animations")
L26 🔴 global_write
Global write: default_dist
Impact: low
Show code
default_dist = 0.12
L40 🔴 global_write
Global write: anim_used
Impact: low
Show code
anim_used = true
L63 🔴 global_write
Global write: anim_used
Impact: low
Show code
anim_used = false

G.A.M.M.A. Fast Transfer fix

1 file (🟢0 🟡0 🔴10 🔵0)

ish_fast_transfer.script

L5 🔴 global_write
Global write: last_url
Impact: low
Show code
last_url = nil
L6 🔴 global_write
Global write: enabled
Impact: low
Show code
enabled = {actor_bag = true, npc_bag = true, actor_trade = true, actor_trade_bag = true, npc_trade = true, npc_trade_bag = true}
L13 🔴 global_write
Global write: new_url
Impact: low
Show code
new_url = move_info.bag .. "_" .. move_info.idx .. "_" .. move_info.ts
L18 🔴 global_write
Global write: last_url
Impact: low
Show code
last_url = new_url
L30 🔴 global_write
Global write: bag
Impact: low
Show code
bag = move_info.bag
L31 🔴 global_write
Global write: idx
Impact: low
Show code
idx = move_info.idx
L33 🔴 global_write
Global write: self
Impact: low
Show code
self = ui_inventory.GUI
L36 🔴 global_write
Global write: bag
Impact: low
Show code
bag, idx = self:Picker_Ownership(bag, idx, obj)
L36 🔴 global_write
Global write: idx
Impact: low
Show code
bag, idx = self:Picker_Ownership(bag, idx, obj)
L51 🔴 global_write
Global write: Base_On_Hover
Impact: low
Show code
Base_On_Hover = utils_ui.UICellContainer.On_Hover

G.A.M.M.A. Fast Travel Limiter Rebalance

1 file (🟢0 🟡0 🔴1 🔵0)

fast_travel_limiter_mcm.script

L1 🔴 global_write
Global write: op
Impact: low
Show code
op = {

G.A.M.M.A. Free Zoom v3

1 file (🟢2 🟡0 🔴33 🔵0)

Free_ZoomV2_mcm.script

L142 🟢 repeated_wpn_section()
wpn:section() called 6x in on_key_press
Impact: low
Show code
Cache wpn:section() result
L230 🟢 repeated_wpn_section()
wpn:section() called 7x in on_key_release
Impact: low
Show code
Cache wpn:section() result
L27 🔴 global_write
Global write: fov_before
Impact: low
Show code
fov_before = get_console_cmd(2, "fov")
L28 🔴 global_write
Global write: hud_fov_before
Impact: low
Show code
hud_fov_before = get_console_cmd(2, "hud_fov")
L29 🔴 global_write
Global write: mouse_sens_before
Impact: low
Show code
mouse_sens_before = get_console_cmd(2, "mouse_sens")
L31 🔴 global_write
Global write: fov_backup
Impact: low
Show code
fov_backup = get_console_cmd(2, "fov")
L32 🔴 global_write
Global write: hud_fov_backup
Impact: low
Show code
hud_fov_backup = get_console_cmd(2, "hud_fov")
L33 🔴 global_write
Global write: mouse_sens_backup
Impact: low
Show code
mouse_sens_backup = get_console_cmd(2, "mouse_sens")
L37 🔴 global_write
Global write: pistol_mult
Impact: low
Show code
pistol_mult = ui_mcm.get("free_zoom/pistol_mult") or 1.15
L38 🔴 global_write
Global write: ads_mult
Impact: low
Show code
ads_mult = ui_mcm.get("free_zoom/ads_mult") or 0.85
L39 🔴 global_write
Global write: free_zoom_mult
Impact: low
Show code
free_zoom_mult = ui_mcm.get("free_zoom/free_zoom_mult") or 0.61
L46 🔴 global_write
Global write: special_weapons
Impact: low
Show code
special_weapons={
L84 🔴 global_write
Global write: fov_before
Impact: low
Show code
fov_before = get_console_cmd(2, "fov")
L85 🔴 global_write
Global write: hud_fov_before
Impact: low
Show code
hud_fov_before = get_console_cmd(2, "hud_fov")
L86 🔴 global_write
Global write: mouse_sens_before
Impact: low
Show code
mouse_sens_before = get_console_cmd(2, "mouse_sens")
L94 🔴 global_write
Global write: wpn
Impact: low
Show code
wpn = db.actor:active_item()
L101 🔴 global_write
Global write: hud_fov_before
Impact: low
Show code
hud_fov_before = hud_fov_backup * pistol_mult
L103 🔴 global_write
Global write: hud_fov_before
Impact: low
Show code
hud_fov_before = hud_fov_backup
L108 🔴 global_write
Global write: special_gun
Impact: low
Show code
special_gun = true
L109 🔴 global_write
Global write: hud_fov_before
Impact: low
Show code
hud_fov_before = special_weapons[sec_p]
L111 🔴 global_write
Global write: special_gun
Impact: low
Show code
special_gun = false
L119 🔴 global_write
Global write: last_sec
Impact: low
Show code
last_sec = sec
L133 🔴 global_write
Global write: scoped
Impact: low
Show code
scoped = wpn:cast_Weapon():IsScopeAttached()
L134 🔴 global_write
Global write: zoomed
Impact: low
Show code
zoomed = wpn:cast_Weapon():IsZoomed()
L139 🔴 global_write
Global write: ads
Impact: low
Show code
ads = true
L149 🔴 global_write
Global write: ads
Impact: low
Show code
ads = true
L164 🔴 global_write
Global write: scoped
Impact: low
Show code
scoped = wpn:cast_Weapon():IsScopeAttached()
L165 🔴 global_write
Global write: zoomed
Impact: low
Show code
zoomed = wpn:cast_Weapon():IsZoomed()
L206 🔴 global_write
Global write: ads
Impact: low
Show code
ads = false
L261 🔴 global_write
Global write: scoped
Impact: low
Show code
scoped = wpn:cast_Weapon():IsScopeAttached()
L262 🔴 global_write
Global write: zoomed
Impact: low
Show code
zoomed = wpn:cast_Weapon():IsZoomed()
L316 🔴 global_write
Global write: saved_gls
Impact: low
Show code
saved_gls = mdata.snk_saved_gl_fov or {}
L330 🔴 global_write
Global write: fov_backup
Impact: low
Show code
fov_backup = get_console_cmd(2, "fov")
L331 🔴 global_write
Global write: hud_fov_backup
Impact: low
Show code
hud_fov_backup = get_console_cmd(2, "hud_fov")
L332 🔴 global_write
Global write: mouse_sens_backup
Impact: low
Show code
mouse_sens_backup = get_console_cmd(2, "mouse_sens")

G.A.M.M.A. Guns Have No Condition

6 files (🟢13 🟡17 🔴26 🔵5)

aaa_rax_icon_override_mcm.script

L728 🟢 uncached_globals_summary
Cache 1 globals in Refresh
Impact: medium
Show code
L757: math.ceil L758: math.ceil
L22 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( "RAX: | %s | "..text ,time_global(), ...)
L367 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR utils_xml.set_icon | XML_box or XML_temp doesn't exist")
L375 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR utils_xml.set_icon | section [%s] doesn't exist in system ini", sec)
L18 🔴 global_write
Global write: icon_override
Impact: low
Show code
icon_override = ini_file_ex("icon_override\\icon_override.ltx")
L540 🔴 global_write
Global write: axis
Impact: low
Show code
axis = utils_xml.get_item_axis(a_sec,1)
L555 🔴 global_write
Global write: axis
Impact: low
Show code
axis = utils_xml.get_item_axis(b_sec,1)
L21 🟢 dead_code_if_false
Dead code: if false (lines 21-23)
Impact: low
Show code
if false then
L358 🟡 unused_local_variable
Local variable 'rw' is assigned but never used
Impact: low
Show code
local ico_size, rw, rh, _le = 0.7,1,1,50
L358 🟡 unused_local_variable
Local variable 'rh' is assigned but never used
Impact: low
Show code
local ico_size, rw, rh, _le = 0.7,1,1,50
L54 🟡 unused_local_variable
Local variable 'clr_list_hl' is assigned but never used
Impact: low
Show code
local clr_list_hl = {
L525 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, kind, order = ini_sys:r_line_ex("item_kind_order",i,"","")

grok_gun_condition_fixed.script

L1 🔴 global_write
Global write: cond
Impact: low
Show code
cond = 0.83

grok_gun_no_condition_text.script

L2 🔴 global_write
Global write: z_item_icon_info_Add_Condition_Text
Impact: low
Show code
z_item_icon_info_Add_Condition_Text = z_item_icon_info.Add_Condition_Text

momopate_proper_jam_chance.script

L23 🟢 repeated_wpn_section()
wpn:section() called 4x in zzzz_arti_jamming_repairs.process_jam_chance
Impact: low
Show code
Cache wpn:section() result
L17 🔴 global_write
Global write: jam_prob
Impact: low
Show code
jam_prob = arti_jamming.get_jam_chance(wpn)
L19 🔴 global_write
Global write: silencer_jam_chance
Impact: low
Show code
silencer_jam_chance = arti_jamming.get_silencer_jam_chance and arti_jamming.get_silencer_jam_chance(wpn) * 0.1 or 0
L23 🔴 global_write
Global write: start_prob
Impact: low
Show code
start_prob = SYS_GetParam(2, wpn:section(), "misfire_start_prob") or 0
L24 🔴 global_write
Global write: start_cond
Impact: low
Show code
start_cond = SYS_GetParam(2, wpn:section(), "misfire_start_condition") or 0
L25 🔴 global_write
Global write: end_prob
Impact: low
Show code
end_prob = SYS_GetParam(2, wpn:section(), "misfire_end_prob") or 0
L26 🔴 global_write
Global write: end_cond
Impact: low
Show code
end_cond = SYS_GetParam(2, wpn:section(), "misfire_end_condition") or 0
L31 🔴 global_write
Global write: start_prob
Impact: low
Show code
start_prob = start_prob + SYS_GetParam(2, section, "misfire_start_prob", 0)
L32 🔴 global_write
Global write: start_cond
Impact: low
Show code
start_cond = start_cond + SYS_GetParam(2, section, "misfire_start_condition", 0)
L33 🔴 global_write
Global write: end_prob
Impact: low
Show code
end_prob = end_prob + SYS_GetParam(2, section, "misfire_end_prob", 0)
L34 🔴 global_write
Global write: end_cond
Impact: low
Show code
end_cond = end_cond + SYS_GetParam(2, section, "misfire_end_condition", 0)
L36 🔴 global_write
Global write: vanilla_jam_chance
Impact: low
Show code
vanilla_jam_chance = 0
L38 🔴 global_write
Global write: vanilla_jam_chance
Impact: low
Show code
vanilla_jam_chance = 0
L40 🔴 global_write
Global write: vanilla_jam_chance
Impact: low
Show code
vanilla_jam_chance = end_prob
L42 🔴 global_write
Global write: divisor
Impact: low
Show code
divisor = 1
L44 🔴 global_write
Global write: divisor
Impact: low
Show code
divisor = start_cond
L46 🔴 global_write
Global write: divisor
Impact: low
Show code
divisor = start_cond - end_cond
L49 🔴 global_write
Global write: vanilla_jam_chance
Impact: low
Show code
vanilla_jam_chance = clamp(start_prob + ((start_cond - wpn:condition()) * (end_prob - start_prob) / divisor), 0, 0.99)
L52 🔴 global_write
Global write: vanilla_jam_chance
Impact: low
Show code
vanilla_jam_chance = vanilla_jam_chance * 100
L53 🔴 global_write
Global write: total_jam_prob
Impact: low
Show code
total_jam_prob = jam_prob + vanilla_jam_chance + silencer_jam_chance
L65 🔴 global_write
Global write: total_jam_prob
Impact: low
Show code
total_jam_prob = tonumber(string.format("%.2f", total_jam_prob))
L3 🟡 unused_local_variable
Local variable 'pjc' is assigned but never used
Impact: low
Show code
local pjc = zzzz_arti_jamming_repairs.process_jam_chance
L10 🟡 unused_local_variable
Local variable 'clr_p' is assigned but never used
Impact: low
Show code
local clr_p = utils_xml.get_color("d_purple")

ui_item.script

L142 🟢 string_len
string.len(str) -> #str
Impact: low
Show code
local length = string.len(str)
L145 🟢 string_len
string.len(str) -> #str
Impact: low
Show code
length = string.len(str)
L168 🟢 string_len
string.len(str) -> #str
Impact: low
Show code
local length = string.len(str)
L171 🟢 string_len
string.len(str) -> #str
Impact: low
Show code
length = string.len(str)
L185 🟢 string_len
string.len(str) -> #str
Impact: low
Show code
local length = string.len(str)
L184 🟢 uncached_globals_summary
Cache 1 globals in remove_parentheses
Impact: medium
Show code
L188: string.sub L191: string.sub
L460 🟢 uncached_globals_summary
Cache 2 globals in build_desc_footer
Impact: medium
Show code
L527: math.abs L537: math.abs L575: tostring L582: tostring
L27 🟡 unused_local_variable
Local variable 'clr_b2' is assigned but never used
Impact: low
Show code
local clr_b2 = utils_xml.get_color("d_blue")
L30 🟡 unused_local_variable
Local variable 'clr_w' is assigned but never used
Impact: low
Show code
local clr_w = utils_xml.get_color("pda_white")
L38 🟡 unused_local_variable
Local variable 'last_sn_id' is assigned but never used
Impact: low
Show code
local last_sn_id = nil
L41 🟡 unused_local_variable
Local variable 'last_short_name_id' is assigned but never used
Impact: low
Show code
local last_short_name_id = nil
L434 🟡 unused_local_variable
Local variable 'break_con' is assigned but never used
Impact: low
Show code
local break_con = "af_aam"
L490 🟡 unused_local_variable
Local variable 'artefact_count' is assigned but never used
Impact: low
Show code
local artefact_count = ini_sys:r_float_ex(sec,"artefact_count") or 0
L492 🟡 unused_local_variable
Local variable 'additional_inventory_weight' is assigned but never used
Impact: low
Show code
local additional_inventory_weight = ini_sys:r_float_ex(sec,"additional_inventory_weight") or 0

utils_ui.script

L1236 🟢 table_insert_append
table.insert(self.childs, v) -> self.childs[#self.childs+1] = v
Impact: high
Show code
table.insert(self.childs, IsItem("ammo",sec) or 1)
L2352 🟢 uncached_globals_summary
Cache 1 globals in Reset
Impact: medium
Show code
L2356: pairs L2359: pairs
L2710 🟢 uncached_globals_summary
Cache 1 globals in Update
Impact: medium
Show code
L2849: math.ceil L2875: math.ceil
L1762 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR UICellContainer:RemoveItemManual | can't get game object for [%s]", sec)
L1919 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR UICellContainer:FindSimilar | no data recieved!")
L257 🔴 global_write
Global write: stats_table
Impact: low
Show code
stats_table = {}
L601 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
local condition = (obj and obj:condition()) or 0
L1282 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
self.section = obj and obj:section()
L122 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, kind, order = ini_sys:r_line_ex("item_kind_order",i,"","")
L2784 🟡 unused_local_variable
Local variable 'cls' is assigned but never used
Impact: low
Show code
local cls = obj:clsid()

G.A.M.M.A. Helmets need armor repair kits

1 file (🟢0 🟡1 🔴4 🔵1)

outfit_drop_mcm.script

L39 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( " %s | "..text ,time_global(), ...)
L16 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "outfitdrop",sh=true ,gr={
L93 🔴 global_write
Global write: ValidateDrop
Impact: low
Show code
ValidateDrop = death_manager.validate_drop
L114 🔴 global_write
Global write: ind
Impact: low
Show code
ind = 1
L125 🔴 global_write
Global write: ind
Impact: low
Show code
ind = ind + 1
L47 🟡 unused_local_variable
Local variable 'coef' is assigned but never used
Impact: low
Show code
local coef = get_comb_coeff(npc_rank,npc_comm)^0.44

G.A.M.M.A. Hip quest rewrite

1 file (🟢74 🟡30 🔴10 🔵134)

xr_effects.script

L849 🟢 table_insert_append
table.insert(honcho_start_list, v) -> honcho_start_list[#honcho_start_list+1] = v
Impact: high
Show code
table.insert( honcho_start_list, honcho_start_id )
L4829 🟢 table_insert_append
table.insert(reachable_theme, v) -> reachable_theme[#reachable_theme+1] = v
Impact: high
Show code
table.insert(reachable_theme,k)
L6001 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "redline_novice_outfit")
L6002 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "helm_ach7")
L6003 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "wpn_colt1911_duty")
L6004 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ammo_11.43x23_fmj")
L6007 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "redline_novice_outfit")
L6008 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "helm_ach7")
L6009 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "wpn_oc33")
L6010 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ammo_9x18_fmj")
L6011 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ammo_9x18_fmj")
L6014 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "redline_novice_outfit")
L6015 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "helm_ach7")
L6016 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "wpn_ks23_kaban")
L6017 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ammo_23x75_shrapnel")
L6020 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "stalker_outfit")
L6021 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "helm_ach7")
L6022 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "wpn_aek")
L6023 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ekp8_02")
L6024 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ammo_5.45x39_fmj")
L6025 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ammo_5.45x39_fmj")
L6026 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ammo_5.45x39_fmj")
L6028 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "bandage")
L6029 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "bandage")
L6031 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "wpn_sr2_veresk")
L6032 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "wpn_sil_veresk")
L6033 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ammo_9x21_sp10")
L6034 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ammo_9x21_sp10")
L6035 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ammo_9x21_sp10")
L6037 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "medkit")
L6038 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "svoboda_light_outfit")
L6039 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "helm_ach7")
L6041 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "wpn_vintorez_n1")
L6042 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "okp")
L6043 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ammo_9x39_pab9")
L6044 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ammo_9x39_pab9")
L6045 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ammo_9x39_pab9")
L6046 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ammo_9x39_pab9")
L6049 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "specops_outfit")
L6050 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "helm_ach7ex")
L6052 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "wpn_axe")
L6053 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "redline_novice_outfit")
L6054 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "helm_ach7")
L6055 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "bandage")
L6056 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "grenade_f1")
L6057 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "grenade_f1")
L6059 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "wpn_m4_ru556")
L6060 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "dolg_exolight_outfit")
L6061 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "helm_ach7ex")
L6062 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ammo_5.56x45_fmj")
L6063 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ammo_5.56x45_fmj")
L6064 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ammo_5.56x45_fmj")
L6065 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ammo_5.56x45_fmj")
L60 🟢 uncached_globals_summary
Cache 1 globals in prepare_reward_money
Impact: medium
Show code
L71: tonumber L73: tonumber
L81 🟢 uncached_globals_summary
Cache 1 globals in prepare_reward_item
Impact: medium
Show code
L94: tonumber L95: tonumber
L176 🟢 uncached_globals_summary
Cache 2 globals in reward_random_money_by_dist
Impact: medium
Show code
L183: tonumber L184: tonumber L185: math.ceil L185: math.ceil
L1373 🟢 uncached_globals_summary
Cache 1 globals in reward_stash
Impact: medium
Show code
L1374: math.random L1377: math.random
L1484 🟢 uncached_globals_summary
Cache 1 globals in setup_task_target_anomaly
Impact: medium
Show code
L1494: math.random L1512: math.random
L1855 🟢 uncached_globals_summary
Cache 1 globals in run_postprocess
Impact: medium
Show code
L1862: tostring L1862: tostring
L2061 🟢 uncached_globals_summary
Cache 1 globals in teleport_npc_pos
Impact: medium
Show code
L2065: tonumber L2065: tonumber
L2916 🟢 uncached_globals_summary
Cache 1 globals in spawn_object
Impact: medium
Show code
L2921: tostring L2926: tostring
L2974 🟢 uncached_globals_summary
Cache 1 globals in spawn_corpse
Impact: medium
Show code
L2979: tostring L2984: tostring
L3000 🟢 uncached_globals_summary
Cache 1 globals in spawn_object_in
Impact: medium
Show code
L3005: tostring L3008: tostring
L3028 🟢 uncached_globals_summary
Cache 1 globals in spawn_npc_in_zone
Impact: medium
Show code
L3033: tostring L3037: tostring
L3343 🟢 uncached_globals_summary
Cache 1 globals in create_squad
Impact: medium
Show code
L3357: tostring L3363: tostring
L4615 🟢 uncached_globals_summary
Cache 1 globals in pick_artefact_from_anomaly
Impact: medium
Show code
L4650: tonumber L4650: tonumber
L4787 🟢 uncached_globals_summary
Cache 1 globals in jup_b221_play_main
Impact: medium
Show code
L4799: tostring L4811: tostring
L5132 🟢 uncached_globals_summary
Cache 1 globals in create_cutscene_actor_with_weapon
Impact: medium
Show code
L5140: tostring L5145: tostring
L5228 🟢 uncached_globals_summary
Cache 1 globals in set_visual_memory_enabled
Impact: medium
Show code
L5229: tonumber L5229: tonumber
L5245 🟢 uncached_globals_summary
Cache 1 globals in zat_b202_spawn_b33_loot
Impact: medium
Show code
L5286: tostring L5289: tostring
L5608 🟢 uncached_globals_summary
Cache 1 globals in spawn_npc_at_position
Impact: medium
Show code
L5610: tonumber L5610: tonumber
L1566 🟢 repeated_npc_id()
npc:id() called 7x in update_npc_logic
Impact: low
Show code
Cache npc:id() result
L2745 🟢 repeated_npc_id()
npc:id() called 4x in disable_combat_handler
Impact: low
Show code
Cache npc:id() result
L5466 🟢 repeated_alife
alife called 3x in make_a_wish
Impact: low
Show code
local sim = alife()
L212 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: spawn_item_at_pos | unable to spawn [%s]", p[1])
L215 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: spawn_item_at_pos | no info found for item [%s]", p[1])
L266 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('set_task_stage: arguments incorrect: %s %s',p[1],p[2])
L268 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('set_task_stage: no arguments')
L295 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR clear_se_var | missing vars: [%s] [%s]", p[1], p[2])
L302 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~se_clear_all_match_var | found match %s = %s in (%s)", varname, val, id)
L383 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: unable to spawn strelok_notes" )
L405 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: unable to spawn wpn_gauss_quest" )
L437 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: unable to spawn x8_documents" )
L445 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: unable to spawn monolith_shard" )
L498 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: unable to spawn stitch_decoder" )
L533 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: unable to spawn contact_lost_pda" )
L576 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("There is no squad with id[%s]", tostring(story_id))
L634 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: unable to spawn jupiter_documents" )
L748 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL task count: " .. load_var( db.actor, "drx_sl_current_task_number", 1 )) )
L771 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL current storyline task: " .. honcho_task_id) )
L775 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL no meet honcho tasks available for " .. next_honcho .. " !!") )
L797 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL: Actor faction changed to " .. p[1]) )
L826 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR drx_sl_setup_questlines | no faction defined")
L838 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( "DRX SL no available game start honchos !!" )
L860 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL current storyline task: " .. honcho_start_id) )
L865 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( "DRX questlines are successfuly set for [%s] faction", faction )
L867 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL no start game tasks available for " .. start_game_honcho .. " !!") )
L926 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL current storyline task: " .. wish_granter_task) )
L1184 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL task ended: " .. p[1]) )
L1198 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL: drx_sl_task_giver_" .. giver_id .. " unregistered (" .. giver_task_count .. " outstanding)") )
L1223 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL: drx_sl_hostage_giver_" .. giver_id .. " unregistered") )
L1245 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( "DRX SL: player failed last storyline task, decrementing drx_sl_current_task_number" )
L1246 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL task count: " .. task_count) )
L1316 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR %s | no community could be gathered")
L1439 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR reward_item | section [%s] doesn't exist", section)
L1547 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ %s | failed to get smart (%s)", p[1], smart_id)
L1839 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("cam_eff:callback1!")
L1844 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("cam_eff:callback2!")
L1849 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("cam_eff:callback3!")
L1862 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("adding complex effector [%s], id [%s], from [%s]", p[1], tostring(p[2]), tostring(npc:name()))
L1865 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Complex effector section is no set! [%s]", tostring(p[1]))
L1872 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("removing complex effector id [%s] from [%s]", tostring(p[1]), tostring(npc:name()))
L1989 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("xr_effects.teleport_actor no patrol path %s exists!",p[1])
L2007 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("teleporting actor from [%s]", tostring(npc:name()))
L2111 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong parameters in 'teleport_npc_by_story_id' function!!!")
L2116 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("There is no story object with id [%s]", story_id)
L2134 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("There is no squad with story id [%s]", p[1])
L2139 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong parameters in 'teleport_squad' function!!!")
L2578 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("inc_counter '%s' to value [%s], by [%s]", p[1], tostring(new_value), tostring(npc:name()))
L2593 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( "dec_counter [%s] value [%s] by [%s]", p[1], load_var(actor, p[1], 0), tostring(npc:name()))
L2633 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("CLEAR_ABUSE")
L2668 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("function 'turn_off_underpass_lamps' lamp [%s] does not exist", tostring(k))
L2680 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("TURN_OFF. Target object with story_id [%s] does not exist", v)
L2698 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("TURN_ON [%s]. Target object does not exist", npc:name())
L2709 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("TURN_ON_AND_FORCE. Target object does not exist")
L2723 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("TURN_OFF [%s]. Target object does not exist", npc:name())
L2866 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("main_menu on console command is executed")
L2879 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("main_menu on console command is executed")
L2921 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong spawn section for 'spawn_object' function %s. For object %s", tostring(spawn_sect), obj:name())
L2926 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong path_name for 'spawn_object' function %s. For object %s", tostring(path_name), obj:name())
L2930 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Path %s doesnt exist. Function 'spawn_object' for object %s ", tostring(path_name), obj:name())
L2979 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong spawn section for 'spawn_corpse' function %s. For object %s", tostring(spawn_sect), obj:name())
L2984 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong path_name for 'spawn_corpse' function %s. For object %s", tostring(path_name), obj:name())
L2988 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Path %s doesnt exist. Function 'spawn_corpse' for object %s ", tostring(path_name), obj:name())
L3005 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong spawn section for 'spawn_object' function %s. For object %s", tostring(spawn_sect), obj:name())
L3008 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong target_name for 'spawn_object_in' function %s. For object %s", tostring(target_name), obj:name())
L3013 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("xr_effects.spawn_object_in trying to find object %s", tostring(p[2]))
L3019 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("xr_effects.spawn_object_in There is no such object %s", p[2])
L3023 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("xr_effects.spawn_object_in object is nil %s", tostring(p[2]))
L3033 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong spawn section for 'spawn_object' function %s. For object %s", tostring(spawn_sect), obj:name())
L3037 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong zone_name for 'spawn_object' function %s. For object %s", tostring(zone_name), obj:name())
L3040 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Zone %s doesnt exist. Function 'spawn_object' for object %s ", tostring(zone_name), obj:name())
L3060 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("destroy_object %s story id doesn't exist!",p[2])
L3148 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Stalker [%s][%s] is dead, but you wants to say something for you: [%s]!", tostring(obj:id()), tostring(obj:name()), p[1])
L3347 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong squad identificator [NIL] in create_squad function")
L3352 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong smart name [NIL] in create_squad function")
L3357 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong squad identificator [%s]. Squad descr doesnt exist.", tostring(squad_id))
L3363 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong smart_name [%s] for [%s] faction in create_squad function", tostring(smart_name), tostring(player_name))
L3393 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong squad identificator [NIL] in 'create_squad_member' function")
L3444 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong squad identificator [NIL] in remove_squad function")
L3457 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong squad identificator [NIL] in kill_squad function")
L3485 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong squad identificator [NIL] in heal_squad function")
L3519 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong squad identificator [NIL] in clear_smart_terrain function")
L3543 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong squad identificator [NIL] in clear_smart_terrain function")
L3598 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("No parameter in give_task function.")
L3627 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("_bp: xr_effects: actor_friend(): npc='%s': time=%d", npc:name(), time_global())
L3647 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("There is no squad with id[%s]", tostring(story_id))
L3657 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("There is no squad with id[%s]", tostring(story_id))
L3668 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("There is no squad with id[%s]", tostring(story_id))
L3749 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!Wrong parameters in function 'inc_faction_goodwill_to_actor'")
L3790 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong parameters in function 'dec_faction_goodwill_to_actor'")
L3938 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
if squad == nil then printf("There is no squad with id[%s]", story_id) end
L4035 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Story id for add map spot function is not set")
L4056 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong story id or name [%s] for map spot function", tostring(story_id))
L4066 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Story id for add map spot function is not set")
L4084 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong story id or name [%s] for map spot function", tostring(story_id))
L4114 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Story id for enable_anomaly function is not set")
L4119 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("There is no object with story_id %s for enable_anomaly function", tostring(p[1]))
L4126 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Story id for disable_anomaly function is not set")
L4131 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("There is no object with story_id %s for disable_anomaly function", tostring(p[1]))
L4138 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Signal rocket name is not set!")
L4143 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("No such signal rocket: [%s] on level", tostring(p[1]))
L4226 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Couldn't relocate item to NULL")
L4233 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong parameters in function set_squad_enemies")
L4257 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("set_squads_enemies: %d:set_enemy(%d)", npc_obj_1:id(), npc_obj_2:id())
L4282 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
if (p and p[1]) == nil then printf("Wrong parameters in function 'set_bloodsucker_state'!!!") end
L4308 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong parameters in function 'remove_item'!!!")
L4334 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("You are trying to use scenario_autosave without save name")
L4351 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Not enough parameters for zat_b29_create_random_infop!")
L4433 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Couldn't relocate item to NULL")
L4459 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
if (p and p[1]) == nil then printf("Wrong parameters in function 'clear_box'!!!") end
L4464 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("There is no object with story_id [%s]", tostring(p[1]))
L4513 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("set_game_time: time changed to [%d][%d]", hours_to_change, minutes_to_change)
L4518 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Insufficient or invalid parameters in function 'forward_game_time'!")
L4530 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("forward_game_time: time forwarded on [%d][%d]", hours, minutes)
L4592 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("There is no such object %s", p[1])
L4598 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("object is nil %s", tostring(p[1]))
L4632 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Couldn't relocate item to NULL in function 'pick_artefact_from_anomaly!'")
L4636 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Couldn't relocate item to NULL (dead or not stalker) in function 'pick_artefact_from_anomaly!'")
L4641 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("No such anomal zone in function 'pick_artefact_from_anomaly!'")
L4645 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("No artefacts in anomal zone [%s]", az_name)
L4664 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("No such artefact [%s] found in anomal zone [%s]", tostring(af_name), az_name)
L4682 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("No such anomal zone in function 'anomaly_turn_off!'")
L4690 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("No such anomal zone in function 'anomaly_turn_on!'")
L4796 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("No such parameters in function 'jup_b221_play_main'")
L4824 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong parameters in function 'jup_b221_play_main'")
L4843 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("No such theme_to_play in function 'jup_b221_play_main'")
L4851 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("No such theme_to_play in function 'jup_b221_play_main'")
L5065 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Not enough parameters in 'set_torch_state' function!")
L5140 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong spawn section for 'spawn_object' function %s. For object %s", tostring(spawn_sect), obj:name())
L5145 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong path_name for 'spawn_object' function %s. For object %s", tostring(path_name), obj:name())
L5149 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Path %s doesnt exist. Function 'spawn_object' for object %s ", tostring(path_name), obj:name())
L5297 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong parameters in function 'set_monster_animation'!!!")
L5328 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("'force_obj' Target object does not exist")
L5375 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Found no distance or zones in func 'pri_a28_check_zones'")
L5473 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("DEBUG: removing squad %s from the game",squad:name())
L5589 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: set_new_scheme_and_logic: can't find ini %s",ini_filename)
L5804 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("can't find object with story id %s", tostring(p[1]))
L2 🔴 global_write
Global write: blacklisted_maps
Impact: low
Show code
blacklisted_maps = { -- List of maps to skip in scans
L751 🔴 global_write
Global write: task_ltx_file
Impact: low
Show code
task_ltx_file = task_manager.task_ini
L842 🔴 global_write
Global write: honcho_start_ltx_file
Impact: low
Show code
honcho_start_ltx_file = task_manager.task_ini
L2210 🔴 global_write
Global write: npc_id
Impact: low
Show code
npc_id = get_story_object_id(p[2])
L2212 🔴 global_write
Global write: npc_id
Impact: low
Show code
npc_id = npc:id()
L2561 🔴 global_write
Global write: npc_id
Impact: low
Show code
npc_id = get_story_object_id(p[1])
L3017 🔴 global_write
Global write: box
Impact: low
Show code
box = alife_object(target_obj_id)
L4177 🔴 global_write
Global write: cs_text
Impact: low
Show code
cs_text = hud:GetCustomStatic("text_on_screen_center")
L4590 🔴 global_write
Global write: box
Impact: low
Show code
box = alife_object(target_obj_id)
L4731 🔴 global_write
Global write: weight_table
Impact: low
Show code
weight_table = {}
L1405 🟡 potential_nil_access
Potential nil access: 'item' from :object() used without nil check
Impact: low
Show code
if (item:condition()) then
L1406 🟡 potential_nil_access
Potential nil access: 'item' from :object() used without nil check
Impact: low
Show code
cond = item:condition()
L1409 🟡 potential_nil_access
Potential nil access: 'item' from :object() used without nil check
Impact: low
Show code
dialogs.relocate_money(db.actor, math.floor((tonumber(p[2]) or 1)*item:cost()*cond*cond*cond*multi) ,"in")
L1560 🟡 potential_nil_access
Potential nil access: 'planner' from :motivation_action_manager() used without nil check
Impact: low
Show code
if planner and planner:initialized() then
L2626 🟡 potential_nil_access
Potential nil access: 'active_item' from :active_item() used without nil check
Impact: low
Show code
if active_item and string.find(active_item:section(),'wpn_') then
L3377 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = k.object or k.id and sim:object(k.id)
L5092 🟡 potential_nil_access
Potential nil access: 'nightvision' from :object() used without nil check
Impact: low
Show code
if nightvision:night_vision_enabled() then
L5093 🟡 potential_nil_access
Potential nil access: 'nightvision' from :object() used without nil check
Impact: low
Show code
nightvision:enable_night_vision(false)
L5103 🟡 potential_nil_access
Potential nil access: 'nightvision' from :object() used without nil check
Impact: low
Show code
if not nightvision:night_vision_enabled() and actor_nightvision then
L5104 🟡 potential_nil_access
Potential nil access: 'nightvision' from :object() used without nil check
Impact: low
Show code
nightvision:enable_night_vision(true)
L5114 🟡 potential_nil_access
Potential nil access: 'torch' from :object() used without nil check
Impact: low
Show code
if torch:torch_enabled() then
L5115 🟡 potential_nil_access
Potential nil access: 'torch' from :object() used without nil check
Impact: low
Show code
torch:enable_torch(false)
L5125 🟡 potential_nil_access
Potential nil access: 'torch' from :object() used without nil check
Impact: low
Show code
if not torch:torch_enabled() and actor_torch then
L5126 🟡 potential_nil_access
Potential nil access: 'torch' from :object() used without nil check
Impact: low
Show code
torch:enable_torch(true)
L5187 🟡 potential_nil_access
Potential nil access: 'active_item' from :item_in_slot() used without nil check
Impact: low
Show code
local actor_weapon = alife_object(active_item:id())
L5468 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local squad = id and sim:object(id)
L5480 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
squad = sim:object(i)
L5481 🟡 potential_nil_access
Potential nil access: 'squad' from :object() used without nil check
Impact: low
Show code
if (squad and squad:clsid() == clsid.online_offline_group_s) then
L5511 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
sim:create(section, pos, lid, gid, AC_ID)
L5850 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(i)
L5851 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if (se_obj and remove_sections[se_obj:section_name()]) then
L5866 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(i)
L5867 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if (se_obj and remove_sections[se_obj:section_name()]) then
L793 🟡 unused_local_variable
Local variable 'communities' is assigned but never used
Impact: low
Show code
local communities = utils_obj.get_communities_list()
L880 🟡 unused_local_variable
Local variable 'task_cfg' is assigned but never used
Impact: low
Show code
local task_cfg = axr_task_manager.CFG_CACHE
L1257 🟡 unused_local_variable
Local variable 'DIALOG_LAST_ID' is assigned but never used
Impact: low
Show code
local DIALOG_LAST_ID = nil
L2201 🟡 unused_local_variable
Local variable 'lv_id' is assigned but never used
Impact: low
Show code
local pos, lv_id, gv_id, npc_id = npc:position(), npc:level_vertex_id(), npc:game_vertex_id(), npc:id()
L2201 🟡 unused_local_variable
Local variable 'gv_id' is assigned but never used
Impact: low
Show code
local pos, lv_id, gv_id, npc_id = npc:position(), npc:level_vertex_id(), npc:game_vertex_id(), npc:id()
L2851 🟡 unused_local_variable
Local variable 'c' is assigned but never used
Impact: low
Show code
local c = get_console()
L5307 🟡 unused_local_variable
Local variable 'actor_direction_for_restore' is assigned but never used
Impact: low
Show code
local actor_direction_for_restore

G.A.M.M.A. Icons replacer and fixes

2 files (🟢3 🟡4 🔴3 🔵3)

aaa_rax_icon_override_mcm.script

L728 🟢 uncached_globals_summary
Cache 1 globals in Refresh
Impact: medium
Show code
L757: math.ceil L758: math.ceil
L22 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( "RAX: | %s | "..text ,time_global(), ...)
L367 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR utils_xml.set_icon | XML_box or XML_temp doesn't exist")
L375 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR utils_xml.set_icon | section [%s] doesn't exist in system ini", sec)
L18 🔴 global_write
Global write: icon_override
Impact: low
Show code
icon_override = ini_file_ex("icon_override\\icon_override.ltx")
L540 🔴 global_write
Global write: axis
Impact: low
Show code
axis = utils_xml.get_item_axis(a_sec,1)
L555 🔴 global_write
Global write: axis
Impact: low
Show code
axis = utils_xml.get_item_axis(b_sec,1)
L21 🟢 dead_code_if_false
Dead code: if false (lines 21-23)
Impact: low
Show code
if false then
L358 🟡 unused_local_variable
Local variable 'rw' is assigned but never used
Impact: low
Show code
local ico_size, rw, rh, _le = 0.7,1,1,50
L358 🟡 unused_local_variable
Local variable 'rh' is assigned but never used
Impact: low
Show code
local ico_size, rw, rh, _le = 0.7,1,1,50
L54 🟡 unused_local_variable
Local variable 'clr_list_hl' is assigned but never used
Impact: low
Show code
local clr_list_hl = {
L525 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, kind, order = ini_sys:r_line_ex("item_kind_order",i,"","")

utils_ui_icon_rotation_fix_mcm.script

L214 🟢 repeated_device
device called 4x in Add_Upgrade
Impact: low
Show code
local dev = device()

G.A.M.M.A. January PDA crash fix

1 file (🟢5 🟡7 🔴1 🔵0)

ui_pda_npc_tab.script

L650 🟢 string_len
string.len(name) -> #name
Impact: low
Show code
name = string.len(name) <= 22 and name or string.sub(name, 0, 19) .. "..."
L113 🟢 uncached_globals_summary
Cache 1 globals in register_pda
Impact: medium
Show code
L125: math.random L127: math.random
L195 🟢 uncached_globals_summary
Cache 3 globals in generate_msg
Impact: medium
Show code
L223: math.random L238: math.random L230: tostring L240: tostring L287: math.ceil L288: math.ceil
L393 🟢 uncached_globals_summary
Cache 2 globals in generate_date
Impact: medium
Show code
L399: tonumber L400: tonumber L426: tostring L426: tostring
L598 🟢 uncached_globals_summary
Cache 1 globals in Reset
Impact: medium
Show code
L643: string.gsub L644: string.gsub
L702 🟡 string_concat_in_loop
String concat in loop: content = content .. x
Impact: critical
Show code
content = content .. " \\n" .. game.translate_string(topic[i])
L665 🔴 global_write
Global write: item
Impact: low
Show code
item = pda_message_entry(game.translate_string(title), sender, msg_date, i)
L75 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L82 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then
L231 🟡 unused_local_variable
Local variable 'stash_hint' is assigned but never used
Impact: low
Show code
local stash_id, stash_name, stash_desc, stash_hint = treasure_manager.get_random_stash(nil , game.translate_string("st_stash_of") .. " " .. contact.name , true)
L267 🟡 unused_local_variable
Local variable 'sim' is assigned but never used
Impact: low
Show code
local sim = alife()
L761 🟡 unused_local_variable
Local variable 'x_coefficient' is assigned but never used
Impact: low
Show code
local x_coefficient = (device().height / device().width) / (768 / 1024)
L796 🟡 unused_local_variable
Local variable 'bind' is assigned but never used
Impact: low
Show code
local bind = dik_to_bind(dik)

G.A.M.M.A. Keybinds fixes

5 files (🟢8 🟡18 🔴16 🔵5)

Free_ZoomV2.script

L12 🟢 repeated_get_console
get_console called 3x in on_key_press
Impact: low
Show code
local console = get_console()
L21 🟢 repeated_get_console
get_console called 3x in on_key_release
Impact: low
Show code
local console = get_console()

bas_nvg_scopes.script

L10 🟢 uncached_globals_summary
Cache 1 globals in zoom_in
Impact: medium
Show code
L12: string.find L15: string.find
L12 🟢 repeated_weapon_section()
weapon:section() called 4x in zoom_in
Impact: low
Show code
Cache weapon:section() result
L101 🔴 global_write
Global write: scoped
Impact: low
Show code
scoped = wpn:cast_Weapon():IsScopeAttached()
L12 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
if weapon and SYS_GetParam(0, weapon:section(), "nv_scope_status") == "1" or string.find(weapon:section(),"wpn_binoc") or upg == true then
L12 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
if weapon and SYS_GetParam(0, weapon:section(), "nv_scope_status") == "1" or string.find(weapon:section(),"wpn_binoc") or upg == true then
L34 🟡 potential_nil_access
Potential nil access: 'weapon' from :active_item() used without nil check
Impact: low
Show code
local wpn_sec = weapon:section()
L101 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
scoped = wpn:cast_Weapon():IsScopeAttached()

bas_nvg_scopes_mcm.script

L13 🔵 debug_statement
Debug call: print()
Impact: medium
Show code
if (op["gr"][k]["id"] == key ) then print(op["gr"][k]["def"]) end

ui_addon_companion_quick_menu.script

L6 🟢 uncached_globals_summary
Cache 1 globals in on_key_press
Impact: medium
Show code
L19: math.random L22: math.random

zz_ui_inventory_better_stats_bars.script

L315 🟢 table_insert_append
table.insert(damages[k], v) -> damages[k][#damages[k]+1] = v
Impact: high
Show code
table.insert(damages[k], dmg)
L615 🟢 uncached_globals_summary
Cache 1 globals in UpdateStats
Impact: medium
Show code
L623: pairs L670: pairs
L1415 🟢 uncached_globals_summary
Cache 1 globals in UpdateStats
Impact: medium
Show code
L1496: math.ceil L1516: math.ceil
L8 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(error_or_result)
L633 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("UIInventory | can't get cast_CustomOutfit of [%s]", outfit:name())
L678 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("UIInventory | can't get cast_Helmet of [%s]", outfit:name())
L1617 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("hit, sec %s, power %s, type %s, protection %s", s_hit.draftsman and s_hit.draftsman:section(), s_hit.power, s_hit.type, ui_inventory.GUI:GetProtection(stat_to_dmg[s_hit.type]))
L15 🔴 global_write
Global write: alife_time_factor
Impact: low
Show code
alife_time_factor = 6
L16 🔴 global_write
Global write: boosters_table
Impact: low
Show code
boosters_table = {}
L21 🔴 global_write
Global write: food_table
Impact: low
Show code
food_table = {}
L61 🔴 global_write
Global write: ignore_sections
Impact: low
Show code
ignore_sections = { -- Sections to ignore
L263 🔴 global_write
Global write: stat_to_dmg
Impact: low
Show code
stat_to_dmg = {
L289 🔴 global_write
Global write: damage_threshold
Impact: low
Show code
damage_threshold = {
L302 🔴 global_write
Global write: damages
Impact: low
Show code
damages = {}
L303 🔴 global_write
Global write: max_damage
Impact: low
Show code
max_damage = {}
L435 🔴 global_write
Global write: max_damage
Impact: low
Show code
max_damage = t
L508 🔴 global_write
Global write: ui_inventory_init
Impact: low
Show code
ui_inventory_init = ui_inventory.UIInventory.__init
L1341 🔴 global_write
Global write: full_stats_keys
Impact: low
Show code
full_stats_keys = {
L1345 🔴 global_write
Global write: show_full_stats
Impact: low
Show code
show_full_stats = false
L1348 🔴 global_write
Global write: clr_list
Impact: low
Show code
clr_list = {
L1580 🔴 global_write
Global write: show_full_stats
Impact: low
Show code
show_full_stats = true
L1589 🔴 global_write
Global write: show_full_stats
Impact: low
Show code
show_full_stats = false
L629 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local outfit = actor:item_in_slot(7)
L674 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local helm = actor:item_in_slot(12)
L715 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:iterate_belt( function(owner, obj)
L740 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:cast_Actor():conditions():BoosterForEach( function(booster_type, booster_time, booster_value)
L789 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local power = actor:cast_Actor():conditions():V_SatietyPower() --db.actor.satiety
L806 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local satiety = actor:cast_Actor():conditions():GetSatiety()
L814 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local satiety = actor:cast_Actor():conditions():GetSatiety()
L949 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local outfit = actor:item_in_slot(7)
L950 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local helm = actor:item_in_slot(12)
L951 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local power = actor:cast_Actor():conditions():V_SatietyPower() --db.actor.satiety
L965 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local power_loss = (outfit and outfit:cast_CustomOutfit().m_fPowerLoss or 0)
L1165 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local satiety = actor:cast_Actor():conditions():GetSatiety()
L1200 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local satiety = actor:cast_Actor():conditions():GetSatiety()
L1430 🟡 unused_local_variable
Local variable 'cls' is assigned but never used
Impact: low
Show code
local cls = obj:clsid()

G.A.M.M.A. Killing Friends Reduces Goodwill

1 file (🟢2 🟡2 🔴6 🔵0)

grok_killing_friends_reduces_goodwill.script

L13 🟢 uncached_globals_summary
Cache 1 globals in relation_kill_check
Impact: medium
Show code
L32: tonumber L35: tonumber
L18 🟢 repeated_db_actor_id()
db.actor:id() called 4x in relation_kill_check
Impact: low
Show code
Cache db.actor:id() result
L1 🔴 global_write
Global write: aggressive_npcs
Impact: low
Show code
aggressive_npcs = {}
L58 🔴 global_write
Global write: neutral_npcs
Impact: low
Show code
neutral_npcs = m_data.neutral_npcs
L60 🔴 global_write
Global write: neutral_npcs
Impact: low
Show code
neutral_npcs = {}
L62 🔴 global_write
Global write: nrows
Impact: low
Show code
nrows = 0
L64 🔴 global_write
Global write: nrows
Impact: low
Show code
nrows = nrows + 1
L67 🔴 global_write
Global write: neutral_npcs
Impact: low
Show code
neutral_npcs = {}
L19 🟡 unused_local_variable
Local variable 'v_id' is assigned but never used
Impact: low
Show code
local v_id = victim and victim:id()
L20 🟡 unused_local_variable
Local variable 'k_id' is assigned but never used
Impact: low
Show code
local k_id = killer and killer:id()

G.A.M.M.A. Large Files

4 files (🟢3 🟡3 🔴6 🔵2)

animation_common.script

L31 🟢 table_insert_append
table.insert(anim_mutators, v) -> anim_mutators[#anim_mutators+1] = v
Impact: high
Show code
table.insert(anim_mutators, {functor=functor, priority=priority})

aol_anim_transitions.script

L6 🟢 table_insert_append
table.insert(valid_anims, v) -> valid_anims[#valid_anims+1] = v
Impact: high
Show code
table.insert(valid_anims, anm_suffix)
L37 🟢 table_insert_append
table.insert(pattern_transitions[hud_section], v) -> pattern_transitions[hud_section][#pattern_transitions[hud_section]+1] = v
Impact: high
Show code
table.insert(pattern_transitions[hud_section], {
L99 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L128 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L15 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L32 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L3 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L10 🔴 global_write
Global write: transitions
Impact: low
Show code
transitions = {
L26 🔴 global_write
Global write: pattern_transitions
Impact: low
Show code
pattern_transitions = {
L162 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L51 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_items:r_line_ex(section,i,"","")

aol_sprint_cancel.script

L16 🔴 global_write
Global write: aol_anim_transitions_anm_transitions
Impact: low
Show code
aol_anim_transitions_anm_transitions = aol_anim_transitions.anm_transitions

weapon_cover_tilt_gun_trigger_radii.script

L6 🔴 global_write
Global write: weapon_trigger_radii
Impact: low
Show code
weapon_trigger_radii = {

G.A.M.M.A. Light Sources Spawner

1 file (🟢2 🟡0 🔴1 🔵0)

bind_light_furniture.script

L95 🟢 uncached_globals_summary
Cache 1 globals in update
Impact: medium
Show code
L126: math.random L162: math.random
L62 🟢 repeated_obj_id()
obj:id() called 4x in __init
Impact: low
Show code
Cache obj:id() result
L19 🔴 global_write
Global write: gc
Impact: low
Show code
gc = game.translate_string

G.A.M.M.A. Lottery Rebalance

1 file (🟢1 🟡3 🔴0 🔵0)

dialogs_mlr.script

L1550 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "wpn_binoc")
L1582 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(i)
L1583 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if se_obj and (se_obj:name() == "secret_fanat") then
L1434 🟡 unused_local_variable
Local variable 'community' is assigned but never used
Impact: low
Show code
local community = {

G.A.M.M.A. MP7 Replacer EFT position

1 file (🟢2 🟡4 🔴3 🔵3)

aaa_rax_icon_override.script

L728 🟢 uncached_globals_summary
Cache 1 globals in Refresh
Impact: medium
Show code
L757: math.ceil L758: math.ceil
L22 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( "RAX: | %s | "..text ,time_global(), ...)
L367 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR utils_xml.set_icon | XML_box or XML_temp doesn't exist")
L375 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR utils_xml.set_icon | section [%s] doesn't exist in system ini", sec)
L18 🔴 global_write
Global write: icon_override
Impact: low
Show code
icon_override = ini_file_ex("icon_override\\icon_override.ltx")
L540 🔴 global_write
Global write: axis
Impact: low
Show code
axis = utils_xml.get_item_axis(a_sec,1)
L555 🔴 global_write
Global write: axis
Impact: low
Show code
axis = utils_xml.get_item_axis(b_sec,1)
L21 🟢 dead_code_if_false
Dead code: if false (lines 21-23)
Impact: low
Show code
if false then
L358 🟡 unused_local_variable
Local variable 'rw' is assigned but never used
Impact: low
Show code
local ico_size, rw, rh, _le = 0.7,1,1,50
L358 🟡 unused_local_variable
Local variable 'rh' is assigned but never used
Impact: low
Show code
local ico_size, rw, rh, _le = 0.7,1,1,50
L54 🟡 unused_local_variable
Local variable 'clr_list_hl' is assigned but never used
Impact: low
Show code
local clr_list_hl = {
L525 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, kind, order = ini_sys:r_line_ex("item_kind_order",i,"","")

G.A.M.M.A. Medications Balance

2 files (🟢7 🟡26 🔴29 🔵1)

zzz_player_injuries.script

L624 🟢 uncached_globals_summary
Cache 1 globals in actor_on_hit_callback
Impact: medium
Show code
L628: math.random L639: math.random
L808 🟢 uncached_globals_summary
Cache 1 globals in HUDUpdate
Impact: medium
Show code
L849: pairs L981: pairs
L1058 🟢 uncached_globals_summary
Cache 1 globals in ParamBar
Impact: medium
Show code
L1069: tostring L1106: tostring
L1228 🟢 uncached_globals_summary
Cache 1 globals in actor_on_footstep
Impact: medium
Show code
L1246: math.random L1251: math.random
L1488 🟢 uncached_globals_summary
Cache 1 globals in actor_on_update
Impact: medium
Show code
L1500: pairs L1505: pairs
L816 🟢 repeated_get_hud
get_hud called 4x in HUDUpdate
Impact: low
Show code
local hud = get_hud()
L1538 🟢 repeated_device
device called 2x in actor_on_update
Impact: low
Show code
local dev = device()
L336 🟡 string_concat_in_loop
String concat in loop: msg = msg .. x
Impact: critical
Show code
msg=msg.." "
L842 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str=str.." \\n"
L869 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str=str.."•"
L873 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str=str.."•"
L877 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str=str.."•"
L899 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str=str.."•"
L903 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str=str.."•"
L916 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str=str.."•"
L920 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str=str.."•"
L931 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str=str.."•"
L935 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str=str.."•"
L939 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str=str.."•"
L945 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str=str.."•"
L949 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str=str.."•"
L953 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str=str.."•"
L958 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str=str.."•"
L961 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str = str..colors[GetConditionFromFloat(health[array2]/maxhp[array2],array2)]
L681 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! actor got hit in %s, id %s",text, bone_id)
L50 🔴 global_write
Global write: options_vol
Impact: low
Show code
options_vol = ui_options.get("sound/general/master_volume")
L53 🔴 global_write
Global write: volume_sound_x
Impact: low
Show code
volume_sound_x = get_console_cmd(2,"snd_volume_eff")
L79 🔴 global_write
Global write: maxhp
Impact: low
Show code
maxhp={}
L87 🔴 global_write
Global write: health
Impact: low
Show code
health={}
L95 🔴 global_write
Global write: preview
Impact: low
Show code
preview={}
L114 🔴 global_write
Global write: timedhp
Impact: low
Show code
timedhp ={}
L122 🔴 global_write
Global write: hud_blink_timer
Impact: low
Show code
hud_blink_timer={}
L131 🔴 global_write
Global write: medkits
Impact: low
Show code
medkits={}
L151 🔴 global_write
Global write: healhelp
Impact: low
Show code
healhelp={}
L628 🔴 global_write
Global write: rand
Impact: low
Show code
rand = math.random(1,5)
L639 🔴 global_write
Global write: rand
Impact: low
Show code
rand = math.random(1,2)
L648 🔴 global_write
Global write: rand
Impact: low
Show code
rand = math.random(1,100)
L655 🔴 global_write
Global write: rand
Impact: low
Show code
rand = math.random(1,3)
L667 🔴 global_write
Global write: text
Impact: low
Show code
text=hitboxes[bone_id]
L678 🔴 global_write
Global write: text
Impact: low
Show code
text=hitboxes[bone_id]
L1226 🔴 global_write
Global write: cooldown
Impact: low
Show code
cooldown = 2500
L1227 🔴 global_write
Global write: state_cooldown
Impact: low
Show code
state_cooldown = 0
L1287 🔴 global_write
Global write: muffle
Impact: low
Show code
muffle = ""
L1289 🔴 global_write
Global write: muffle
Impact: low
Show code
muffle = ""
L1296 🔴 global_write
Global write: file_to_say
Impact: low
Show code
file_to_say = sound_object( file )
L1301 🔴 global_write
Global write: state_cooldown
Impact: low
Show code
state_cooldown = time_global() + cooldown
L1303 🔴 global_write
Global write: actor_health
Impact: low
Show code
actor_health = db.actor.health
L1304 🔴 global_write
Global write: actor_health_reduced
Impact: low
Show code
actor_health_reduced = actor_health - hit_power
L1411 🔴 global_write
Global write: old_is_actor_not_healthy
Impact: low
Show code
old_is_actor_not_healthy = dialogs.is_actor_not_healthy
L1422 🔴 global_write
Global write: old_is_actor_injured
Impact: low
Show code
old_is_actor_injured = dialogs.is_actor_injured
L1433 🔴 global_write
Global write: old_is_actor_injured_irradiated
Impact: low
Show code
old_is_actor_injured_irradiated = dialogs.is_actor_injured_irradiated
L1466 🔴 global_write
Global write: old_heal_actor_injury_radiation
Impact: low
Show code
old_heal_actor_injury_radiation = dialogs.heal_actor_injury_radiation
L1477 🔴 global_write
Global write: old_heal_actor_injury
Impact: low
Show code
old_heal_actor_injury = dialogs.heal_actor_injury
L380 🟡 potential_nil_access
Potential nil access: 'item_in_slot' from :item_in_slot() used without nil check
Impact: low
Show code
local section_name = item_in_slot:section()
L402 🟡 potential_nil_access
Potential nil access: 'item_in_slot' from :item_in_slot() used without nil check
Impact: low
Show code
if item_in_slot:weapon_is_scope() then
L414 🟡 potential_nil_access
Potential nil access: 'item_in_slot' from :item_in_slot() used without nil check
Impact: low
Show code
if item_in_slot:weapon_is_scope() then
L184 🟡 unused_local_variable
Local variable 'playername' is assigned but never used
Impact: low
Show code
local playername
L329 🟡 unused_local_variable
Local variable 'stamina' is assigned but never used
Impact: low
Show code
local stamina=db.actor.power
L435 🟡 unused_local_variable
Local variable 'sprint_coef' is assigned but never used
Impact: low
Show code
local sprint_coef = 0.0625 * legs_summ + 0.375
L1003 🟡 unused_local_variable
Local variable 'green' is assigned but never used
Impact: low
Show code
local green = math.floor(255 * ((100 - 100)/100))
L1004 🟡 unused_local_variable
Local variable 'red' is assigned but never used
Impact: low
Show code
local red = math.floor(255 * (100/100))
L1266 🟡 unused_local_variable
Local variable 'low_cr' is assigned but never used
Impact: low
Show code
local low_cr = cr and IsMoveState('mcAccel')

zzz_player_injuries_mcm.script

L21 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "body_health_system",sh=true ,gr={

G.A.M.M.A. Minimalist HUD

2 files (🟢2 🟡0 🔴21 🔵1)

alticons.script

L10 🔴 global_write
Global write: size_adjust
Impact: low
Show code
size_adjust = 0.75
L12 🔴 global_write
Global write: basethrst
Impact: low
Show code
basethrst = actor_status_thirst.create
L19 🔴 global_write
Global write: basesleep
Impact: low
Show code
basesleep = actor_status_sleep.create
L47 🔴 global_write
Global write: ratio
Impact: low
Show code
ratio = (device().height / device().width) / (768 / 1024)
L57 🔴 global_write
Global write: pos
Impact: low
Show code
pos = self.dialog:GetWndPos()

ui_sidhud_mcm.script

L302 🟢 table_insert_append
table.insert(t, v) -> t[#t+1] = v
Impact: high
Show code
table.insert(t, {id = "sidslide", type = "slide", link = "ui\\sidhud\\Banner.dds",size = {512,50}, text= "ui_mm_video_hud_sidslide"})
L303 🟢 table_insert_append
table.insert(t, v) -> t[#t+1] = v
Impact: high
Show code
table.insert(t, {id = "radhealthshow", type = "check", val = 1, def = options.radhealthshow,})
L254 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("SidHUD "..name..tostring(val))
L11 🔴 global_write
Global write: clr_list
Impact: low
Show code
clr_list ={}
L13 🔴 global_write
Global write: clr_list
Impact: low
Show code
clr_list = {
L37 🔴 global_write
Global write: status_hud_x
Impact: low
Show code
status_hud_x = 0
L38 🔴 global_write
Global write: status_hud_y
Impact: low
Show code
status_hud_y = 0
L39 🔴 global_write
Global write: notify_icon_x
Impact: low
Show code
notify_icon_x = 128
L40 🔴 global_write
Global write: notify_icon_y
Impact: low
Show code
notify_icon_y = 700
L44 🔴 global_write
Global write: options
Impact: low
Show code
options = {
L51 🔴 global_write
Global write: path
Impact: low
Show code
path = ui_mcm and "sidhud/" or "video/hud/"
L217 🔴 global_write
Global write: pos
Impact: low
Show code
pos = actor_status.HUD and actor_status.HUD:GetWndPos()
L253 🔴 global_write
Global write: val
Impact: low
Show code
val = axr_main.config:r_value("options", "video/hud/"..name,1)
L278 🔴 global_write
Global write: id_1
Impact: low
Show code
id_1 = 0
L279 🔴 global_write
Global write: id_2
Impact: low
Show code
id_2 = 0
L281 🔴 global_write
Global write: id_1
Impact: low
Show code
if ui_options.options[i].id == "video" then id_1 = i end
L285 🔴 global_write
Global write: id_2
Impact: low
Show code
if (ui_options.options[id_1].gr[i].id == "hud") then id_2 = i end
L293 🔴 global_write
Global write: t
Impact: low
Show code
t = {}
L295 🔴 global_write
Global write: sh_options
Impact: low
Show code
sh_options = { id= "sidhud" ,sh=true ,gr=t}

G.A.M.M.A. Mutant Unstucker Remade

1 file (🟢0 🟡0 🔴15 🔵1)

grok_mutant_unstucker.script

L21 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[Fuji] Teleport: Move Stuck Monster")
L6 🔴 global_write
Global write: unsupported_mutants
Impact: low
Show code
unsupported_mutants={
L69 🔴 global_write
Global write: online_npcs_pos_x
Impact: low
Show code
online_npcs_pos_x = {}
L70 🔴 global_write
Global write: online_npcs_pos_y
Impact: low
Show code
online_npcs_pos_y = {}
L71 🔴 global_write
Global write: online_npcs_pos_z
Impact: low
Show code
online_npcs_pos_z = {}
L72 🔴 global_write
Global write: trigger3
Impact: low
Show code
trigger3 = 0
L73 🔴 global_write
Global write: delay3
Impact: low
Show code
delay3 = 72500
L76 🔴 global_write
Global write: tg
Impact: low
Show code
tg = time_global()
L79 🔴 global_write
Global write: grok_delay3
Impact: low
Show code
grok_delay3 = tg + delay3
L80 🔴 global_write
Global write: trigger3
Impact: low
Show code
trigger3 = 1
L84 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 0
L99 🔴 global_write
Global write: nrows
Impact: low
Show code
nrows = 0
L101 🔴 global_write
Global write: nrows
Impact: low
Show code
nrows = nrows + 1
L104 🔴 global_write
Global write: online_npcs_pos_x
Impact: low
Show code
online_npcs_pos_x = {}
L105 🔴 global_write
Global write: online_npcs_pos_y
Impact: low
Show code
online_npcs_pos_y = {}
L106 🔴 global_write
Global write: online_npcs_pos_z
Impact: low
Show code
online_npcs_pos_z = {}

G.A.M.M.A. NPC Loot Claim Remade

3 files (🟢0 🟡1 🔴18 🔵6)

grok_loot_claim.script

L26 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("story npc can be looted")
L28 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("npc suicided can be looted")
L30 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("body can be looted")
L32 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("body can be looted")
L2 🔴 global_write
Global write: claimed
Impact: low
Show code
claimed = {}
L6 🔴 global_write
Global write: looted
Impact: low
Show code
looted = {}
L50 🔴 global_write
Global write: result
Impact: low
Show code
result = ray:get_result()
L53 🔴 global_write
Global write: obj
Impact: low
Show code
obj = result.object
L56 🔴 global_write
Global write: id
Impact: low
Show code
id = obj:id()
L64 🔴 global_write
Global write: sender
Impact: low
Show code
sender = level.object_by_id(claimed[obj:id()])
L69 🔴 global_write
Global write: dist
Impact: low
Show code
dist = sender:position():distance_to(db.actor:position())
L74 🔴 global_write
Global write: sender_com
Impact: low
Show code
sender_com = character_community(sender)
L98 🔴 global_write
Global write: claimed
Impact: low
Show code
claimed = m_data.claimed
L100 🔴 global_write
Global write: claimed
Impact: low
Show code
claimed = {}
L102 🔴 global_write
Global write: nrows
Impact: low
Show code
nrows = 0
L104 🔴 global_write
Global write: nrows
Impact: low
Show code
nrows = nrows + 1
L107 🔴 global_write
Global write: claimed
Impact: low
Show code
claimed = {}
L111 🔴 global_write
Global write: looted
Impact: low
Show code
looted = m_data.looted
L113 🔴 global_write
Global write: looted
Impact: low
Show code
looted = {}
L115 🔴 global_write
Global write: nrows
Impact: low
Show code
nrows = 0
L117 🔴 global_write
Global write: nrows
Impact: low
Show code
nrows = nrows + 1
L120 🔴 global_write
Global write: looted
Impact: low
Show code
looted = {}
L12 🟡 unused_local_variable
Local variable 'k_faction' is assigned but never used
Impact: low
Show code
local k_faction = killer and character_community(killer)

npc_loot_claim.script

L1 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("no loot claim")

zz_npc_loot_claim_softcore.script

L1 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("no demonized loot claim")

G.A.M.M.A. No NPC Friendly Fire

1 file (🟢0 🟡0 🔴2 🔵0)

grok_no_npc_friendly_fire.script

L5 🔴 global_write
Global write: victim_comm
Impact: low
Show code
victim_comm = character_community(npc)
L10 🔴 global_write
Global write: shooter_comm
Impact: low
Show code
shooter_comm = character_community(shit.draftsman)

G.A.M.M.A. No harmonica

2 files (🟢2 🟡1 🔴2 🔵2)

sr_camp.script

L221 🟢 table_insert_append
table.insert(directors, v) -> directors[#directors+1] = v
Impact: high
Show code
table.insert(directors, k)
L247 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Trying to use destroyed object!")
L267 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong role for npc[%s] with id[%d] in camp [%s]!!!", se_obj and se_obj:name(), npc_id, self.object:name())

xr_campfire_point.script

L150 🟢 repeated_npc_id()
npc:id() called 5x in execute
Impact: low
Show code
Cache npc:id() result
L12 🔴 global_write
Global write: evaid
Impact: low
Show code
evaid = 17000
L13 🔴 global_write
Global write: actid
Impact: low
Show code
actid = 17000
L63 🟡 unused_local_variable
Local variable 'campfire' is assigned but never used
Impact: low
Show code
local campfire

G.A.M.M.A. Not so instant tooltip

1 file (🟢0 🟡0 🔴1 🔵0)

instant_tooltip.script

L8 🔴 global_write
Global write: delay
Impact: low
Show code
delay = 350 -- change this to adjust delay to all tool tips at once. Make idividual changes below.

G.A.M.M.A. Part Type Fixer

1 file (🟢0 🟡1 🔴0 🔵2)

parts_match_item.script

L54 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("Destroy triggered")
L65 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("Parts Destroyed")
L1 🟡 unused_local_variable
Local variable 'parts_list' is assigned but never used
Impact: low
Show code
local parts_list = {}

G.A.M.M.A. Press Key to Drop Item

1 file (🟢0 🟡0 🔴13 🔵0)

grok_drop_item_press_key_mcm.script

L35 🔴 global_write
Global write: obj_to_drop
Impact: low
Show code
obj_to_drop = obj
L38 🔴 global_write
Global write: obj_to_drop
Impact: low
Show code
obj_to_drop = nil
L43 🔴 global_write
Global write: obj_to_drop
Impact: low
Show code
obj_to_drop = nil
L53 🔴 global_write
Global write: obj_to_drop
Impact: low
Show code
obj_to_drop = nil
L62 🔴 global_write
Global write: obj_to_drop
Impact: low
Show code
obj_to_drop = nil
L78 🔴 global_write
Global write: obj_to_drop
Impact: low
Show code
obj_to_drop = obj
L81 🔴 global_write
Global write: obj_to_drop
Impact: low
Show code
obj_to_drop = nil
L87 🔴 global_write
Global write: obj_to_drop
Impact: low
Show code
obj_to_drop = nil
L88 🔴 global_write
Global write: register
Impact: low
Show code
register = false
L93 🔴 global_write
Global write: obj_to_drop
Impact: low
Show code
obj_to_drop = nil
L94 🔴 global_write
Global write: register
Impact: low
Show code
register = true
L96 🔴 global_write
Global write: obj_to_drop
Impact: low
Show code
obj_to_drop = nil
L97 🔴 global_write
Global write: register
Impact: low
Show code
register = false

G.A.M.M.A. Psy Fields in the North

1 file (🟢0 🟡0 🔴14 🔵0)

grok_psy_fields_in_the_north.script

L2 🔴 global_write
Global write: psy_extra_levels
Impact: low
Show code
psy_extra_levels = {
L20 🔴 global_write
Global write: psy_immune_factions
Impact: low
Show code
psy_immune_factions = {
L32 🔴 global_write
Global write: psy_damage
Impact: low
Show code
psy_damage = 0
L42 🔴 global_write
Global write: psy_damage
Impact: low
Show code
psy_damage = 1
L48 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 0
L49 🔴 global_write
Global write: delay
Impact: low
Show code
delay = 2000
L50 🔴 global_write
Global write: one_shot
Impact: low
Show code
one_shot = 0
L52 🔴 global_write
Global write: tg
Impact: low
Show code
tg = time_global()
L55 🔴 global_write
Global write: grok_delay
Impact: low
Show code
grok_delay = tg + delay
L56 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 1
L60 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 0
L67 🔴 global_write
Global write: one_shot
Impact: low
Show code
one_shot = 2
L70 🔴 global_write
Global write: psi_fx_death
Impact: low
Show code
psi_fx_death = sound_object("grok\\psisfx")
L79 🔴 global_write
Global write: damage
Impact: low
Show code
damage = 999

G.A.M.M.A. Psy rework

1 file (🟢0 🟡3 🔴1 🔵0)

arszi_psy.script

L64 🔴 global_write
Global write: lock_psy_health
Impact: low
Show code
lock_psy_health = false
L290 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local c_outfit = outfit:cast_CustomOutfit()
L304 🟡 potential_nil_access
Potential nil access: 'helm' from :item_in_slot() used without nil check
Impact: low
Show code
local c_helm = helm:cast_Helmet()
L29 🟡 unused_local_variable
Local variable 'c_in_game_seconds_multiplier' is assigned but never used
Impact: low
Show code
local c_in_game_seconds_multiplier = 6 --6 in game seconds are one real life second

G.A.M.M.A. Quests Rebalance

6 files (🟢82 🟡59 🔴13 🔵161)

dialogs_lostzone.script

L756 🟢 uncached_globals_summary
Cache 1 globals in isg_emergency_stash_timer
Impact: medium
Show code
L762: math.random L773: math.random
L510 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("There is no squad with id[%s]", story_id)
L516 🟡 potential_nil_access
Potential nil access: 'npc' from level.object_by_id() used without nil check
Impact: low
Show code
if npc then npc:force_set_goodwill(-5000, db.actor) end
L777 🟡 unused_local_variable
Local variable 'stash_name' is assigned but never used
Impact: low
Show code
local stash_id, stash_name, stash_desc, stash_hint = treasure_manager.get_random_stash("treasure_unique")
L777 🟡 unused_local_variable
Local variable 'stash_desc' is assigned but never used
Impact: low
Show code
local stash_id, stash_name, stash_desc, stash_hint = treasure_manager.get_random_stash("treasure_unique")
L777 🟡 unused_local_variable
Local variable 'stash_hint' is assigned but never used
Impact: low
Show code
local stash_id, stash_name, stash_desc, stash_hint = treasure_manager.get_random_stash("treasure_unique")
L815 🟡 unused_local_variable
Local variable 'junk' is assigned but never used
Impact: low
Show code
local junk, kind, value = treasure_manager.ini_treasure:r_line("isg_stash_bonus" , i , "", "")
L815 🟡 unused_local_variable
Local variable 'kind' is assigned but never used
Impact: low
Show code
local junk, kind, value = treasure_manager.ini_treasure:r_line("isg_stash_bonus" , i , "", "")

grok_get_companions.script

L5 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local actor_rank = actor:character_rank() or 0

tasks_defense.script

L177 🟢 table_insert_append
table.insert(RAND_S, v) -> RAND_S[#RAND_S+1] = v
Impact: high
Show code
table.insert(RAND_S,{game.translate_string(se_obj:character_name()),se_obj:character_icon()})
L92 🟢 uncached_globals_summary
Cache 1 globals in actor_on_first_update
Impact: medium
Show code
L103: math.random L112: math.random
L18 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
if DEBUG then printf(strformat('!tasks_defense: ' .. frmt, ...)) end
L60 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('loading mdata')
L64 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('new mdata')
L78 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('error: get_random_stalker_chatter returned nil')
L222 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('get_closest_freedom returned nil')
L276 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('not enough time since last check')
L418 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('all_attackers_dead: called without arguments')
L440 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('distance_to_barrier: missing or malformed arguments, must be ("le" or "ge":number)')
L449 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('distance_to_barrier: unknown comparison requested, got %s expected "ge" or "le"', c[1])
L460 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('barrier_defense_first_spawn: missing or unexpected arguments, must be "zombie" or "monolith"')
L485 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('squad commander still doesnt exist?')
L494 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
if DEBUG then printf('left %s', count) end
L537 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('barrier_defense_news: first argument must be "start", "end" or "escape"')
L539 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('barrier_defense_news: missing or wrong arguments, must be ([start,end,escape]:[zombie,monolith])')
L479 🔴 global_write
Global write: sq
Impact: low
Show code
sq = SIMBOARD:create_squad(SIMBOARD.smarts_by_names['mil_smart_terrain_4_7'],"barrier_defense_squad")
L35 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local ao = sim:object(a)
L36 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local bo = sim:object(b)
L156 🟡 potential_nil_access
Potential nil access: 'be' from :best_enemy() used without nil check
Impact: low
Show code
if be and be:id() == 0 then

tasks_dominance.script

L181 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/ %s | Faction [%s] is re-added to cache_func table", task_id, params[i])
L186 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | no enemy factions found",task_id)
L212 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | no smarts found for level",task_id, cache_level[task_id])
L257 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | not enough parameters", task_id)
L268 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! %s | reused cache", task_id)
L279 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | status functor parameters are mising!", task_id)
L290 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | status_functor_level is mising!", task_id)
L306 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! %s | no enemy factions found", task_id)
L329 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("- %s | %s squads has been found in level (%s)", task_id, size_table(targets), def.level)
L343 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | missing info in setup_dominance_task", task_id)
L350 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | missing cache in setup_dominance_task", task_id)
L203 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local lvl = sim:level_name(gg:vertex(v.m_game_vertex_id):level_id())
L318 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local lvl = sim:level_name(gg:vertex(v.m_game_vertex_id):level_id())
L64 🟡 unused_local_variable
Local variable 'smrt_name' is assigned but never used
Impact: low
Show code
local smrt_name = smart:name()

tasks_pump_station_defense.script

L318 🟢 table_insert_append
table.insert(M.reward, v) -> M.reward[#M.reward+1] = v
Impact: high
Show code
table.insert(M.reward,pool[math.random(#pool)])
L265 🟢 repeated_alife
alife called 4x in <global>
Impact: low
Show code
local sim = alife()
L275 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
if _DEBUG then printf('attackers: %s', M.attackers_to_spawn) end
L303 🔴 global_write
Global write: p
Impact: low
Show code
p = sm.position
L409 🔴 global_write
Global write: pos
Impact: low
Show code
pos = vector():set(sp[1], sp[2], sp[3])
L55 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check (auto-fixable)
Impact: low
Show code
return db.actor:position():distance_to_sqr(obj:position())
L60 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if se_obj and se_obj:alive() then return game.translate_string(se_obj:character_name()), se_obj:character_icon() end
L60 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if se_obj and se_obj:alive() then return game.translate_string(se_obj:character_name()), se_obj:character_icon() end
L60 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if se_obj and se_obj:alive() then return game.translate_string(se_obj:character_name()), se_obj:character_icon() end
L63 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(M.commander_id)
L64 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if se_obj and se_obj:alive() then
L68 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
se_obj = sim:object(id)
L69 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if se_obj and se_obj:alive() then
L167 🟡 potential_nil_access
Potential nil access: 's' from alife() used without nil check
Impact: low
Show code
if M.commander_id and s:object(M.commander_id) then
L175 🟡 potential_nil_access
Potential nil access: 's' from alife() used without nil check
Impact: low
Show code
if s:object(id) then
L180 🟡 potential_nil_access
Potential nil access: 's' from alife() used without nil check
Impact: low
Show code
if s:object(id) then
L196 🟡 potential_nil_access
Potential nil access: 'comm' from level.object_by_id() used without nil check
Impact: low
Show code
local be = comm and comm:best_enemy()
L205 🟡 potential_nil_access
Potential nil access: 'grd' from level.object_by_id() used without nil check
Impact: low
Show code
local be = grd and grd:best_enemy()
L246 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
if obj and not obj:alive() then
L426 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local sea = sim:object(id)
L427 🟡 potential_nil_access
Potential nil access: 'sea' from :object() used without nil check
Impact: low
Show code
if not (sea and sea:alive()) then

xr_effects.script

L849 🟢 table_insert_append
table.insert(honcho_start_list, v) -> honcho_start_list[#honcho_start_list+1] = v
Impact: high
Show code
table.insert( honcho_start_list, honcho_start_id )
L4829 🟢 table_insert_append
table.insert(reachable_theme, v) -> reachable_theme[#reachable_theme+1] = v
Impact: high
Show code
table.insert(reachable_theme,k)
L6001 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "redline_novice_outfit")
L6002 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "helm_ach7")
L6003 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "wpn_colt1911_duty")
L6004 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ammo_11.43x23_fmj")
L6007 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "redline_novice_outfit")
L6008 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "helm_ach7")
L6009 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "wpn_oc33")
L6010 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ammo_9x18_fmj")
L6011 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ammo_9x18_fmj")
L6014 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "redline_novice_outfit")
L6015 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "helm_ach7")
L6016 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "wpn_ks23_kaban")
L6017 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ammo_23x75_shrapnel")
L6020 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "stalker_outfit")
L6021 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "helm_ach7")
L6022 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "wpn_aek")
L6023 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ekp8_02")
L6024 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ammo_5.45x39_fmj")
L6025 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ammo_5.45x39_fmj")
L6026 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ammo_5.45x39_fmj")
L6028 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "bandage")
L6029 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "bandage")
L6031 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "wpn_sr2_veresk")
L6032 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "wpn_sil_veresk")
L6033 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ammo_9x21_sp10")
L6034 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ammo_9x21_sp10")
L6035 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ammo_9x21_sp10")
L6037 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "medkit")
L6038 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "svoboda_light_outfit")
L6039 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "helm_ach7")
L6041 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "wpn_vintorez_n1")
L6042 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "okp")
L6043 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ammo_9x39_pab9")
L6044 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ammo_9x39_pab9")
L6045 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ammo_9x39_pab9")
L6046 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ammo_9x39_pab9")
L6047 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ammo_9x39_pab9")
L6048 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "stimpack")
L6051 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "specops_outfit")
L6052 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "helm_ach7ex")
L6054 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "wpn_axe3")
L6055 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "redline_novice_outfit")
L6056 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "helm_ach7")
L6057 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "bandage")
L6058 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "grenade_f1")
L6059 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "grenade_f1")
L6061 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "wpn_m4_ru556")
L6062 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "dolg_exolight_outfit")
L6063 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "helm_ach7ex")
L6064 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ammo_5.56x45_fmj")
L6065 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ammo_5.56x45_fmj")
L6066 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ammo_5.56x45_fmj")
L6067 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ammo_5.56x45_fmj")
L6068 🟢 table_insert_append
table.insert(spawn_items, v) -> spawn_items[#spawn_items+1] = v
Impact: high
Show code
table.insert(spawn_items, "ammo_5.56x45_fmj")
L60 🟢 uncached_globals_summary
Cache 1 globals in prepare_reward_money
Impact: medium
Show code
L71: tonumber L73: tonumber
L81 🟢 uncached_globals_summary
Cache 1 globals in prepare_reward_item
Impact: medium
Show code
L94: tonumber L95: tonumber
L176 🟢 uncached_globals_summary
Cache 2 globals in reward_random_money_by_dist
Impact: medium
Show code
L183: tonumber L184: tonumber L185: math.ceil L185: math.ceil
L1373 🟢 uncached_globals_summary
Cache 1 globals in reward_stash
Impact: medium
Show code
L1374: math.random L1377: math.random
L1484 🟢 uncached_globals_summary
Cache 1 globals in setup_task_target_anomaly
Impact: medium
Show code
L1494: math.random L1512: math.random
L1855 🟢 uncached_globals_summary
Cache 1 globals in run_postprocess
Impact: medium
Show code
L1862: tostring L1862: tostring
L2061 🟢 uncached_globals_summary
Cache 1 globals in teleport_npc_pos
Impact: medium
Show code
L2065: tonumber L2065: tonumber
L2916 🟢 uncached_globals_summary
Cache 1 globals in spawn_object
Impact: medium
Show code
L2921: tostring L2926: tostring
L2974 🟢 uncached_globals_summary
Cache 1 globals in spawn_corpse
Impact: medium
Show code
L2979: tostring L2984: tostring
L3000 🟢 uncached_globals_summary
Cache 1 globals in spawn_object_in
Impact: medium
Show code
L3005: tostring L3008: tostring
L3028 🟢 uncached_globals_summary
Cache 1 globals in spawn_npc_in_zone
Impact: medium
Show code
L3033: tostring L3037: tostring
L3343 🟢 uncached_globals_summary
Cache 1 globals in create_squad
Impact: medium
Show code
L3357: tostring L3363: tostring
L4615 🟢 uncached_globals_summary
Cache 1 globals in pick_artefact_from_anomaly
Impact: medium
Show code
L4650: tonumber L4650: tonumber
L4787 🟢 uncached_globals_summary
Cache 1 globals in jup_b221_play_main
Impact: medium
Show code
L4799: tostring L4811: tostring
L5132 🟢 uncached_globals_summary
Cache 1 globals in create_cutscene_actor_with_weapon
Impact: medium
Show code
L5140: tostring L5145: tostring
L5228 🟢 uncached_globals_summary
Cache 1 globals in set_visual_memory_enabled
Impact: medium
Show code
L5229: tonumber L5229: tonumber
L5245 🟢 uncached_globals_summary
Cache 1 globals in zat_b202_spawn_b33_loot
Impact: medium
Show code
L5286: tostring L5289: tostring
L5608 🟢 uncached_globals_summary
Cache 1 globals in spawn_npc_at_position
Impact: medium
Show code
L5610: tonumber L5610: tonumber
L1566 🟢 repeated_npc_id()
npc:id() called 7x in update_npc_logic
Impact: low
Show code
Cache npc:id() result
L2745 🟢 repeated_npc_id()
npc:id() called 4x in disable_combat_handler
Impact: low
Show code
Cache npc:id() result
L5466 🟢 repeated_alife
alife called 3x in make_a_wish
Impact: low
Show code
local sim = alife()
L212 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: spawn_item_at_pos | unable to spawn [%s]", p[1])
L215 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: spawn_item_at_pos | no info found for item [%s]", p[1])
L266 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('set_task_stage: arguments incorrect: %s %s',p[1],p[2])
L268 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('set_task_stage: no arguments')
L295 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR clear_se_var | missing vars: [%s] [%s]", p[1], p[2])
L302 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~se_clear_all_match_var | found match %s = %s in (%s)", varname, val, id)
L383 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: unable to spawn strelok_notes" )
L405 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: unable to spawn wpn_gauss_quest" )
L437 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: unable to spawn x8_documents" )
L445 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: unable to spawn monolith_shard" )
L498 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: unable to spawn stitch_decoder" )
L533 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: unable to spawn contact_lost_pda" )
L576 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("There is no squad with id[%s]", tostring(story_id))
L634 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: unable to spawn jupiter_documents" )
L748 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL task count: " .. load_var( db.actor, "drx_sl_current_task_number", 1 )) )
L771 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL current storyline task: " .. honcho_task_id) )
L775 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL no meet honcho tasks available for " .. next_honcho .. " !!") )
L797 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL: Actor faction changed to " .. p[1]) )
L826 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR drx_sl_setup_questlines | no faction defined")
L838 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( "DRX SL no available game start honchos !!" )
L860 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL current storyline task: " .. honcho_start_id) )
L865 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( "DRX questlines are successfuly set for [%s] faction", faction )
L867 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL no start game tasks available for " .. start_game_honcho .. " !!") )
L926 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL current storyline task: " .. wish_granter_task) )
L1184 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL task ended: " .. p[1]) )
L1198 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL: drx_sl_task_giver_" .. giver_id .. " unregistered (" .. giver_task_count .. " outstanding)") )
L1223 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL: drx_sl_hostage_giver_" .. giver_id .. " unregistered") )
L1245 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( "DRX SL: player failed last storyline task, decrementing drx_sl_current_task_number" )
L1246 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( ("DRX SL task count: " .. task_count) )
L1316 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR %s | no community could be gathered")
L1439 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR reward_item | section [%s] doesn't exist", section)
L1547 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ %s | failed to get smart (%s)", p[1], smart_id)
L1839 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("cam_eff:callback1!")
L1844 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("cam_eff:callback2!")
L1849 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("cam_eff:callback3!")
L1862 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("adding complex effector [%s], id [%s], from [%s]", p[1], tostring(p[2]), tostring(npc:name()))
L1865 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Complex effector section is no set! [%s]", tostring(p[1]))
L1872 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("removing complex effector id [%s] from [%s]", tostring(p[1]), tostring(npc:name()))
L1989 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("xr_effects.teleport_actor no patrol path %s exists!",p[1])
L2007 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("teleporting actor from [%s]", tostring(npc:name()))
L2111 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong parameters in 'teleport_npc_by_story_id' function!!!")
L2116 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("There is no story object with id [%s]", story_id)
L2134 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("There is no squad with story id [%s]", p[1])
L2139 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong parameters in 'teleport_squad' function!!!")
L2578 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("inc_counter '%s' to value [%s], by [%s]", p[1], tostring(new_value), tostring(npc:name()))
L2593 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( "dec_counter [%s] value [%s] by [%s]", p[1], load_var(actor, p[1], 0), tostring(npc:name()))
L2633 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("CLEAR_ABUSE")
L2668 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("function 'turn_off_underpass_lamps' lamp [%s] does not exist", tostring(k))
L2680 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("TURN_OFF. Target object with story_id [%s] does not exist", v)
L2698 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("TURN_ON [%s]. Target object does not exist", npc:name())
L2709 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("TURN_ON_AND_FORCE. Target object does not exist")
L2723 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("TURN_OFF [%s]. Target object does not exist", npc:name())
L2866 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("main_menu on console command is executed")
L2879 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("main_menu on console command is executed")
L2921 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong spawn section for 'spawn_object' function %s. For object %s", tostring(spawn_sect), obj:name())
L2926 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong path_name for 'spawn_object' function %s. For object %s", tostring(path_name), obj:name())
L2930 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Path %s doesnt exist. Function 'spawn_object' for object %s ", tostring(path_name), obj:name())
L2979 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong spawn section for 'spawn_corpse' function %s. For object %s", tostring(spawn_sect), obj:name())
L2984 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong path_name for 'spawn_corpse' function %s. For object %s", tostring(path_name), obj:name())
L2988 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Path %s doesnt exist. Function 'spawn_corpse' for object %s ", tostring(path_name), obj:name())
L3005 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong spawn section for 'spawn_object' function %s. For object %s", tostring(spawn_sect), obj:name())
L3008 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong target_name for 'spawn_object_in' function %s. For object %s", tostring(target_name), obj:name())
L3013 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("xr_effects.spawn_object_in trying to find object %s", tostring(p[2]))
L3019 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("xr_effects.spawn_object_in There is no such object %s", p[2])
L3023 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("xr_effects.spawn_object_in object is nil %s", tostring(p[2]))
L3033 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong spawn section for 'spawn_object' function %s. For object %s", tostring(spawn_sect), obj:name())
L3037 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong zone_name for 'spawn_object' function %s. For object %s", tostring(zone_name), obj:name())
L3040 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Zone %s doesnt exist. Function 'spawn_object' for object %s ", tostring(zone_name), obj:name())
L3060 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("destroy_object %s story id doesn't exist!",p[2])
L3148 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Stalker [%s][%s] is dead, but you wants to say something for you: [%s]!", tostring(obj:id()), tostring(obj:name()), p[1])
L3347 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong squad identificator [NIL] in create_squad function")
L3352 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong smart name [NIL] in create_squad function")
L3357 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong squad identificator [%s]. Squad descr doesnt exist.", tostring(squad_id))
L3363 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong smart_name [%s] for [%s] faction in create_squad function", tostring(smart_name), tostring(player_name))
L3393 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong squad identificator [NIL] in 'create_squad_member' function")
L3444 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong squad identificator [NIL] in remove_squad function")
L3457 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong squad identificator [NIL] in kill_squad function")
L3485 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong squad identificator [NIL] in heal_squad function")
L3519 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong squad identificator [NIL] in clear_smart_terrain function")
L3543 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong squad identificator [NIL] in clear_smart_terrain function")
L3598 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("No parameter in give_task function.")
L3627 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("_bp: xr_effects: actor_friend(): npc='%s': time=%d", npc:name(), time_global())
L3647 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("There is no squad with id[%s]", tostring(story_id))
L3657 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("There is no squad with id[%s]", tostring(story_id))
L3668 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("There is no squad with id[%s]", tostring(story_id))
L3749 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!Wrong parameters in function 'inc_faction_goodwill_to_actor'")
L3790 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong parameters in function 'dec_faction_goodwill_to_actor'")
L3938 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
if squad == nil then printf("There is no squad with id[%s]", story_id) end
L4035 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Story id for add map spot function is not set")
L4056 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong story id or name [%s] for map spot function", tostring(story_id))
L4066 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Story id for add map spot function is not set")
L4084 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong story id or name [%s] for map spot function", tostring(story_id))
L4114 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Story id for enable_anomaly function is not set")
L4119 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("There is no object with story_id %s for enable_anomaly function", tostring(p[1]))
L4126 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Story id for disable_anomaly function is not set")
L4131 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("There is no object with story_id %s for disable_anomaly function", tostring(p[1]))
L4138 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Signal rocket name is not set!")
L4143 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("No such signal rocket: [%s] on level", tostring(p[1]))
L4226 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Couldn't relocate item to NULL")
L4233 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong parameters in function set_squad_enemies")
L4257 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("set_squads_enemies: %d:set_enemy(%d)", npc_obj_1:id(), npc_obj_2:id())
L4282 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
if (p and p[1]) == nil then printf("Wrong parameters in function 'set_bloodsucker_state'!!!") end
L4308 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong parameters in function 'remove_item'!!!")
L4334 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("You are trying to use scenario_autosave without save name")
L4351 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Not enough parameters for zat_b29_create_random_infop!")
L4433 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Couldn't relocate item to NULL")
L4459 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
if (p and p[1]) == nil then printf("Wrong parameters in function 'clear_box'!!!") end
L4464 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("There is no object with story_id [%s]", tostring(p[1]))
L4513 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("set_game_time: time changed to [%d][%d]", hours_to_change, minutes_to_change)
L4518 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Insufficient or invalid parameters in function 'forward_game_time'!")
L4530 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("forward_game_time: time forwarded on [%d][%d]", hours, minutes)
L4592 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("There is no such object %s", p[1])
L4598 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("object is nil %s", tostring(p[1]))
L4632 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Couldn't relocate item to NULL in function 'pick_artefact_from_anomaly!'")
L4636 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Couldn't relocate item to NULL (dead or not stalker) in function 'pick_artefact_from_anomaly!'")
L4641 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("No such anomal zone in function 'pick_artefact_from_anomaly!'")
L4645 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("No artefacts in anomal zone [%s]", az_name)
L4664 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("No such artefact [%s] found in anomal zone [%s]", tostring(af_name), az_name)
L4682 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("No such anomal zone in function 'anomaly_turn_off!'")
L4690 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("No such anomal zone in function 'anomaly_turn_on!'")
L4796 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("No such parameters in function 'jup_b221_play_main'")
L4824 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong parameters in function 'jup_b221_play_main'")
L4843 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("No such theme_to_play in function 'jup_b221_play_main'")
L4851 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("No such theme_to_play in function 'jup_b221_play_main'")
L5065 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Not enough parameters in 'set_torch_state' function!")
L5140 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong spawn section for 'spawn_object' function %s. For object %s", tostring(spawn_sect), obj:name())
L5145 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong path_name for 'spawn_object' function %s. For object %s", tostring(path_name), obj:name())
L5149 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Path %s doesnt exist. Function 'spawn_object' for object %s ", tostring(path_name), obj:name())
L5297 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong parameters in function 'set_monster_animation'!!!")
L5328 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("'force_obj' Target object does not exist")
L5375 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Found no distance or zones in func 'pri_a28_check_zones'")
L5473 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("DEBUG: removing squad %s from the game",squad:name())
L5589 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: set_new_scheme_and_logic: can't find ini %s",ini_filename)
L5804 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("can't find object with story id %s", tostring(p[1]))
L2 🔴 global_write
Global write: blacklisted_maps
Impact: low
Show code
blacklisted_maps = { -- List of maps to skip in scans
L751 🔴 global_write
Global write: task_ltx_file
Impact: low
Show code
task_ltx_file = task_manager.task_ini
L842 🔴 global_write
Global write: honcho_start_ltx_file
Impact: low
Show code
honcho_start_ltx_file = task_manager.task_ini
L2210 🔴 global_write
Global write: npc_id
Impact: low
Show code
npc_id = get_story_object_id(p[2])
L2212 🔴 global_write
Global write: npc_id
Impact: low
Show code
npc_id = npc:id()
L2561 🔴 global_write
Global write: npc_id
Impact: low
Show code
npc_id = get_story_object_id(p[1])
L3017 🔴 global_write
Global write: box
Impact: low
Show code
box = alife_object(target_obj_id)
L4177 🔴 global_write
Global write: cs_text
Impact: low
Show code
cs_text = hud:GetCustomStatic("text_on_screen_center")
L4590 🔴 global_write
Global write: box
Impact: low
Show code
box = alife_object(target_obj_id)
L4731 🔴 global_write
Global write: weight_table
Impact: low
Show code
weight_table = {}
L1405 🟡 potential_nil_access
Potential nil access: 'item' from :object() used without nil check
Impact: low
Show code
if (item:condition()) then
L1406 🟡 potential_nil_access
Potential nil access: 'item' from :object() used without nil check
Impact: low
Show code
cond = item:condition()
L1409 🟡 potential_nil_access
Potential nil access: 'item' from :object() used without nil check
Impact: low
Show code
dialogs.relocate_money(db.actor, math.floor((tonumber(p[2]) or 1)*item:cost()*cond*multi) ,"in")
L1560 🟡 potential_nil_access
Potential nil access: 'planner' from :motivation_action_manager() used without nil check
Impact: low
Show code
if planner and planner:initialized() then
L2626 🟡 potential_nil_access
Potential nil access: 'active_item' from :active_item() used without nil check
Impact: low
Show code
if active_item and string.find(active_item:section(),'wpn_') then
L3377 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = k.object or k.id and sim:object(k.id)
L5092 🟡 potential_nil_access
Potential nil access: 'nightvision' from :object() used without nil check
Impact: low
Show code
if nightvision:night_vision_enabled() then
L5093 🟡 potential_nil_access
Potential nil access: 'nightvision' from :object() used without nil check
Impact: low
Show code
nightvision:enable_night_vision(false)
L5103 🟡 potential_nil_access
Potential nil access: 'nightvision' from :object() used without nil check
Impact: low
Show code
if not nightvision:night_vision_enabled() and actor_nightvision then
L5104 🟡 potential_nil_access
Potential nil access: 'nightvision' from :object() used without nil check
Impact: low
Show code
nightvision:enable_night_vision(true)
L5114 🟡 potential_nil_access
Potential nil access: 'torch' from :object() used without nil check
Impact: low
Show code
if torch:torch_enabled() then
L5115 🟡 potential_nil_access
Potential nil access: 'torch' from :object() used without nil check
Impact: low
Show code
torch:enable_torch(false)
L5125 🟡 potential_nil_access
Potential nil access: 'torch' from :object() used without nil check
Impact: low
Show code
if not torch:torch_enabled() and actor_torch then
L5126 🟡 potential_nil_access
Potential nil access: 'torch' from :object() used without nil check
Impact: low
Show code
torch:enable_torch(true)
L5187 🟡 potential_nil_access
Potential nil access: 'active_item' from :item_in_slot() used without nil check
Impact: low
Show code
local actor_weapon = alife_object(active_item:id())
L5468 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local squad = id and sim:object(id)
L5480 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
squad = sim:object(i)
L5481 🟡 potential_nil_access
Potential nil access: 'squad' from :object() used without nil check
Impact: low
Show code
if (squad and squad:clsid() == clsid.online_offline_group_s) then
L5511 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
sim:create(section, pos, lid, gid, AC_ID)
L5850 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(i)
L5851 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if (se_obj and remove_sections[se_obj:section_name()]) then
L5866 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(i)
L5867 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if (se_obj and remove_sections[se_obj:section_name()]) then
L793 🟡 unused_local_variable
Local variable 'communities' is assigned but never used
Impact: low
Show code
local communities = utils_obj.get_communities_list()
L880 🟡 unused_local_variable
Local variable 'task_cfg' is assigned but never used
Impact: low
Show code
local task_cfg = axr_task_manager.CFG_CACHE
L1257 🟡 unused_local_variable
Local variable 'DIALOG_LAST_ID' is assigned but never used
Impact: low
Show code
local DIALOG_LAST_ID = nil
L2201 🟡 unused_local_variable
Local variable 'lv_id' is assigned but never used
Impact: low
Show code
local pos, lv_id, gv_id, npc_id = npc:position(), npc:level_vertex_id(), npc:game_vertex_id(), npc:id()
L2201 🟡 unused_local_variable
Local variable 'gv_id' is assigned but never used
Impact: low
Show code
local pos, lv_id, gv_id, npc_id = npc:position(), npc:level_vertex_id(), npc:game_vertex_id(), npc:id()
L2851 🟡 unused_local_variable
Local variable 'c' is assigned but never used
Impact: low
Show code
local c = get_console()
L5307 🟡 unused_local_variable
Local variable 'actor_direction_for_restore' is assigned but never used
Impact: low
Show code
local actor_direction_for_restore

G.A.M.M.A. Quick Action Wheel Balance

1 file (🟢8 🟡25 🔴6 🔵0)

haru_quick_action_wheel_mcm.script

L419 🟢 table_insert_append
table.insert(self.tabs[tab], v) -> self.tabs[tab][#self.tabs[tab]+1] = v
Impact: high
Show code
table.insert(self.tabs[tab], {
L1409 🟢 table_insert_append
table.insert(t, v) -> t[#t+1] = v
Impact: high
Show code
table.insert(t, get_obj_inv_slot(obj))
L1631 🟢 table_insert_append
table.insert(options.gr[2].gr, v) -> options.gr[2].gr[#options.gr[2].gr+1] = v
Impact: high
Show code
table.insert(options.gr[2].gr, category_options[i])
L1637 🟢 table_insert_append
table.insert(options.gr[1].gr, v) -> options.gr[1].gr[#options.gr[1].gr+1] = v
Impact: high
Show code
table.insert(options.gr[1].gr, quick_keys[i])
L120 🟢 uncached_globals_summary
Cache 1 globals in __init
Impact: medium
Show code
L125: ipairs L127: ipairs
L182 🟢 uncached_globals_summary
Cache 1 globals in GetItemTable
Impact: medium
Show code
L198: pairs L208: pairs
L1742 🟢 uncached_globals_summary
Cache 1 globals in on_option_change
Impact: medium
Show code
L1745: pairs L1746: pairs
L409 🟢 repeated_obj_id()
obj:id() called 3x in AddItem
Impact: low
Show code
Cache obj:id() result
L9 🔴 global_write
Global write: wheel_states
Impact: low
Show code
wheel_states = haru_arm.States
L14 🔴 global_write
Global write: override_quick_keys
Impact: low
Show code
override_quick_keys = {
L27 🔴 global_write
Global write: add_to_qaw_functor
Impact: low
Show code
add_to_qaw_functor = {
L42 🔴 global_write
Global write: tab_categories
Impact: low
Show code
tab_categories = {[2] = "devices", [3] = "attachments", [4] = "food", [5] = "meds", [6] = "grenades", [7] = "ammo", [8] = "slots"}
L93 🔴 global_write
Global write: is_magazine
Impact: low
Show code
is_magazine = magazine_binder and magazine_binder.is_magazine and function(obj)
L97 🔴 global_write
Global write: supports_magazines
Impact: low
Show code
supports_magazines = magazine_binder and magazine_binder.is_supported_weapon and function(obj)
L185 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if (not wpn) or (not IsWeapon(wpn)) or IsItem("fake_ammo_wpn",wpn:section()) then
L190 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
local sec = wpn:section()
L239 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if (not wpn) or (not IsWeapon(wpn)) or IsItem("fake_ammo_wpn",wpn:section()) then
L245 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if (supports_magazines(wpn)) and (not wpn:weapon_in_grenade_mode()) then
L253 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
local p = obj and obj:parent()
L261 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
local cwpn = wpn:cast_Weapon()
L724 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
local p = obj:parent()
L726 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if p and p:id() == AC_ID then
L784 🟡 potential_nil_access
Potential nil access: 'item_in_slot' from :item_in_slot() used without nil check
Impact: low
Show code
if item_in_slot and item_in_slot:id() == id then
L805 🟡 potential_nil_access
Potential nil access: 'item_in_slot' from :item_in_slot() used without nil check (auto-fixable)
Impact: low
Show code
self.selected_bg:Show(item_in_slot and item_in_slot:section() == self.section)
L819 🟡 potential_nil_access
Potential nil access: 'item_in_slot' from :item_in_slot() used without nil check
Impact: low
Show code
if item_in_slot and item_in_slot:section() == self.section then
L887 🟡 potential_nil_access
Potential nil access: 'device_in_slot' from :item_in_slot() used without nil check
Impact: low
Show code
if device_in_slot and device_in_slot:section() == self.section then
L1234 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
wpn:switch_state(7)
L1238 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if magazines_mcm.get_config("retain_round") and wpn:get_ammo_in_magazine() > 0 then
L1246 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
"delay_weapon"..wpn:id(),
L1249 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
MCM_SETTINGS.old_mags_compat and wpn or wpn:id(),
L1308 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if (not wpn) or (not IsWeapon(wpn)) or IsItem("fake_ammo_wpn",wpn:section()) then
L1313 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
local cwpn = wpn:cast_Weapon()
L1315 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if supports_magazines(wpn) and (not wpn:weapon_in_grenade_mode()) then
L1343 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check (auto-fixable)
Impact: low
Show code
wpn:unload_magazine(true)
L1344 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
wpn:set_ammo_type(self.ammo_type)
L1373 🟡 potential_nil_access
Potential nil access: 'item_in_slot' from :item_in_slot() used without nil check
Impact: low
Show code
if (not item_in_slot) or item_in_slot:id() ~= self.item_id then
L1404 🟡 potential_nil_access
Potential nil access: 'item_in_slot' from :item_in_slot() used without nil check (auto-fixable)
Impact: low
Show code
return item_in_slot and item_in_slot:id() == self.item_id
L1725 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if IsWeapon(wpn) and (not IsItem("fake_ammo_wpn",wpn:section())) then
L1737 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
elseif ((IsWeapon(wpn) and IsItem("fake_ammo_wpn",wpn:section())) or (IsItem("device", nil, wpn))) and tbh.slots then

G.A.M.M.A. Radiation Dynamic Areas

1 file (🟢1 🟡3 🔴5 🔵13)

gamma_dynamic_radiation_areas_from_arzsi.script

L403 🟢 table_insert_append
table.insert(smarts_of_level, v) -> smarts_of_level[#smarts_of_level+1] = v
Impact: high
Show code
table.insert(smarts_of_level, smart)
L318 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("spawn_radiation_fields_at_new_game()")
L338 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("get blacklisted smarts")
L341 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Iterate through smarts")
L348 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Spawn default radiation zone for smart: "..name_of_smart)
L359 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Smart: "..name_of_smart.." is black listed, skip")
L367 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("create_radiation_field: "..anomaly_type.." Radius: "..radius.. " *****************")
L369 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("spawn anomaly")
L373 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("NO ANOMALY WERE SPAWNED")
L379 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( "Error: Unable to set dynamic anomaly properties" )
L390 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(se_obj.id)
L391 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Radiation field was spawned succesfully")
L396 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("get_smart_terrains_of_level("..level_name..")")
L414 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("INITIALIZE - dosimeter_volume")
L311 🔴 global_write
Global write: environmental_radiation
Impact: low
Show code
environmental_radiation = 0
L321 🔴 global_write
Global write: run_script
Impact: low
Show code
run_script = 1
L325 🔴 global_write
Global write: run_script
Impact: low
Show code
run_script = 0
L397 🔴 global_write
Global write: smarts_of_level
Impact: low
Show code
smarts_of_level = {}
L400 🔴 global_write
Global write: cvertex
Impact: low
Show code
cvertex = smart and game_graph():vertex(smart.m_game_vertex_id)
L255 🟡 unused_local_variable
Local variable 'blacklisted_static_radiation_anomalies' is assigned but never used
Impact: low
Show code
local blacklisted_static_radiation_anomalies = {
L291 🟡 unused_local_variable
Local variable 'underground_maps' is assigned but never used
Impact: low
Show code
local underground_maps = {
L305 🟡 unused_local_variable
Local variable 'radiation_zones' is assigned but never used
Impact: low
Show code
local radiation_zones = {}

G.A.M.M.A. Radiation Effects Overhaul

2 files (🟢6 🟡1 🔴31 🔵0)

AGDD_voiced_actor.script

L177 🟢 uncached_globals_summary
Cache 1 globals in monster_on_death_callback
Impact: medium
Show code
L189: math.random L191: math.random
L200 🟢 uncached_globals_summary
Cache 1 globals in npc_on_death_callback
Impact: medium
Show code
L212: math.random L214: math.random
L248 🟢 uncached_globals_summary
Cache 1 globals in actor_on_update
Impact: medium
Show code
L295: math.random L298: math.random
L325 🟢 uncached_globals_summary
Cache 1 globals in actor_on_before_hit
Impact: medium
Show code
L339: math.random L341: math.random
L405 🟢 uncached_globals_summary
Cache 1 globals in on_key_release
Impact: medium
Show code
L417: string.find L417: string.find
L61 🔴 global_write
Global write: muffle
Impact: low
Show code
muffle = "" -- initiates muffling condition
L66 🔴 global_write
Global write: muffle
Impact: low
Show code
muffle = ""
L68 🔴 global_write
Global write: muffle
Impact: low
Show code
muffle = ""
L89 🔴 global_write
Global write: combat_inertia
Impact: low
Show code
combat_inertia = 1
L95 🔴 global_write
Global write: combat_inertia
Impact: low
Show code
combat_inertia = time_global() + 10000 --sets the delay of ten seconds to ensure that combat status doesn't drop in case enemies stop targeting the actor for a short time
L157 🔴 global_write
Global write: combat_intensity
Impact: low
Show code
combat_intensity = 0 --main value that drives the combat status system
L158 🔴 global_write
Global write: combat_intensity_drain_cooldown
Impact: low
Show code
combat_intensity_drain_cooldown = 0 --auxilary value, prevents combat progression from draining constantly, instead it only drains after nothing combat-related happens for some time
L159 🔴 global_write
Global write: combat_medium_threshold
Impact: low
Show code
combat_medium_threshold = 500 --the threshold at which combat status switches to it's second phase
L160 🔴 global_write
Global write: combat_high_threshold
Impact: low
Show code
combat_high_threshold = 1500 --the threshold at which combat status switches to it's final third phase (combat_intensity value doesn't stop there and can progress even further, but that won't have any changes)
L171 🔴 global_write
Global write: combat_intensity
Impact: low
Show code
combat_intensity = combat_intensity + intensity --adds it
L173 🔴 global_write
Global write: combat_intensity_drain_cooldown
Impact: low
Show code
combat_intensity_drain_cooldown = combat_intensity_drain_cooldown + cooldown --adds the cooldown even if we didn't add intensity
L179 🔴 global_write
Global write: combat_intensity
Impact: low
Show code
combat_intensity = 1
L202 🔴 global_write
Global write: combat_intensity
Impact: low
Show code
combat_intensity = 1
L260 🔴 global_write
Global write: combat_intensity
Impact: low
Show code
combat_intensity = combat_intensity - 1
L263 🔴 global_write
Global write: combat_intensity_drain_cooldown
Impact: low
Show code
combat_intensity_drain_cooldown = combat_intensity_drain_cooldown - 2
L266 🔴 global_write
Global write: combat_intensity
Impact: low
Show code
combat_intensity = clamp(combat_intensity,0,combat_high_threshold * 2) --keeps combat intensity value in bounds, it shouldn't go into negatives nor overshoot the max cap
L267 🔴 global_write
Global write: combat_intensity_drain_cooldown
Impact: low
Show code
combat_intensity_drain_cooldown = clamp(combat_intensity_drain_cooldown,0,1000) --same thing but for the cooldown
L111 🟡 unused_local_variable
Local variable 'i' is assigned but never used
Impact: low
Show code
local i,v = next(axr_companions.companion_squads,nil) --gets squad info

grok_progressive_rad_damages.script

L15 🟢 uncached_globals_summary
Cache 2 globals in actor_on_update
Impact: medium
Show code
L17: math.floor L37: math.floor L48: math.random L51: math.random
L1 🔴 global_write
Global write: grok_rads
Impact: low
Show code
grok_rads = 0
L11 🔴 global_write
Global write: step
Impact: low
Show code
step = 925
L12 🔴 global_write
Global write: coughing_time
Impact: low
Show code
coughing_time = 0
L13 🔴 global_write
Global write: coughing
Impact: low
Show code
coughing = false
L32 🔴 global_write
Global write: tg
Impact: low
Show code
tg = time_global()
L38 🔴 global_write
Global write: tg
Impact: low
Show code
tg = nil
L47 🔴 global_write
Global write: probability
Impact: low
Show code
probability = math.ceil(22 / actor_rad)
L48 🔴 global_write
Global write: chance
Impact: low
Show code
chance = math.random(1,probability)
L52 🔴 global_write
Global write: grok_rads
Impact: low
Show code
grok_rads = 1
L53 🔴 global_write
Global write: sound
Impact: low
Show code
sound = sound_object("grok\\cough" .. math.random(1,7))
L57 🔴 global_write
Global write: coughing
Impact: low
Show code
coughing = true
L58 🔴 global_write
Global write: coughing_time
Impact: low
Show code
coughing_time = time_global() + 9000
L60 🔴 global_write
Global write: grok_rads
Impact: low
Show code
grok_rads = 0
L63 🔴 global_write
Global write: coughing
Impact: low
Show code
coughing = false

G.A.M.M.A. Rare Stashes Balance

2 files (🟢5 🟡21 🔴47 🔵10)

simulation_objects.script

L257 🟢 repeated_target_clsid()
target:clsid() called 3x in evaluate_prior
Impact: low
Show code
Cache target:clsid() result
L93 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("# Loading ini: misc\\smart_profiles.ltx")
L143 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("invalid section for props_ini %s",props_section)
L3 🔴 global_write
Global write: config
Impact: low
Show code
config = ini_file_ex("ai_tweaks\\simulation_objects.ltx")
L31 🔴 global_write
Global write: available_by_id
Impact: low
Show code
available_by_id = {}
L32 🔴 global_write
Global write: object_registry
Impact: low
Show code
object_registry = {}
L33 🔴 global_write
Global write: object_registry_size
Impact: low
Show code
object_registry_size = 0
L34 🔴 global_write
Global write: base_smarts
Impact: low
Show code
base_smarts = {}
L97 🔴 global_write
Global write: object_registry_size
Impact: low
Show code
object_registry_size = object_registry_size + 1
L111 🔴 global_write
Global write: object_registry_size
Impact: low
Show code
object_registry_size = object_registry_size - 1
L213 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local obj1_level = sim:level_name(gg:vertex(se_obj_1.m_game_vertex_id):level_id())
L214 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local obj2_level = sim:level_name(gg:vertex(se_obj_2.m_game_vertex_id):level_id())
L227 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local obj1_level = sim:level_name(gg:vertex(se_obj_1.m_game_vertex_id):level_id())
L228 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local obj2_level = sim:level_name(gg:vertex(se_obj_2.m_game_vertex_id):level_id())
L272 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
if (not is_on_the_same_level(sim:actor(), squad)) then
L286 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local target_of_my_target = target.assigned_target_id and sim:object(target.assigned_target_id)
L1 🟡 unused_local_variable
Local variable 'sim_objects_registry' is assigned but never used
Impact: low
Show code
local sim_objects_registry = nil
L149 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, prop_name, prop_condlist = props_ini:r_line_ex(props_section,j,"","")
L172 🟡 unused_local_variable
Local variable 'pos1' is assigned but never used
Impact: low
Show code
local pos1,lv1,gv1 = obj1:get_location()
L172 🟡 unused_local_variable
Local variable 'lv1' is assigned but never used
Impact: low
Show code
local pos1,lv1,gv1 = obj1:get_location()
L173 🟡 unused_local_variable
Local variable 'pos2' is assigned but never used
Impact: low
Show code
local pos2,lv2,gv2 = obj2:get_location()
L173 🟡 unused_local_variable
Local variable 'lv2' is assigned but never used
Impact: low
Show code
local pos2,lv2,gv2 = obj2:get_location()

treasure_manager.script

L194 🟢 uncached_globals_summary
Cache 1 globals in init_settings
Impact: medium
Show code
L226: tonumber L226: tonumber
L477 🟢 uncached_globals_summary
Cache 1 globals in set_random_stash
Impact: medium
Show code
L499: math.random L535: math.random
L787 🟢 uncached_globals_summary
Cache 1 globals in try_spawn_treasure
Impact: medium
Show code
L832: math.random L837: math.random
L489 🟢 repeated_alife
alife called 3x in set_random_stash
Impact: low
Show code
local sim = alife()
L757 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str = str .. " - " .. itm
L336 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!WARNING treasure_manager.init_settings | item [%s] is missing info | kind: %s - tier: %s", section, kind, tier)
L379 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR create_random_stash | no server object for id (%s)", id)
L760 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(str)
L901 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("--------- Create Stash: ")
L903 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("----------------------------------------------------------")
L907 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("--------- Items count: ")
L909 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(k .. " := " .. v)
L1029 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("- Treasure manager | name (%s) saved for rare stash", (str .. name))
L132 🔴 global_write
Global write: ini_treasure
Impact: low
Show code
ini_treasure = ini_file("items\\settings\\grok_treasure_manager.ltx")
L133 🔴 global_write
Global write: ini_treasure_vanilla
Impact: low
Show code
ini_treasure_vanilla = ini_file_ex("items\\settings\\treasure_manager.ltx",true)
L134 🔴 global_write
Global write: ini_tiers
Impact: low
Show code
ini_tiers = ini_file("items\\settings\\grok_items_tier.ltx")
L138 🔴 global_write
Global write: caches
Impact: low
Show code
caches = {}
L167 🔴 global_write
Global write: stash_bonus
Impact: low
Show code
stash_bonus = {}
L275 🔴 global_write
Global write: section
Impact: low
Show code
junk, section, value = "", "", ""
L277 🔴 global_write
Global write: section
Impact: low
Show code
junk, section, value = ini_treasure:r_line("possible_items" , i , "", "")
L344 🔴 global_write
Global write: section
Impact: low
Show code
junk, section, value = "", "", ""
L346 🔴 global_write
Global write: section
Impact: low
Show code
junk, section, value = ini_treasure:r_line("stash_bonus" , i , "", "")
L363 🔴 global_write
Global write: last_secret
Impact: low
Show code
last_secret = nil
L385 🔴 global_write
Global write: last_secret
Impact: low
Show code
last_secret = nil
L392 🔴 global_write
Global write: last_secret
Impact: low
Show code
last_secret = true
L563 🔴 global_write
Global write: random_tier_from_vector
Impact: low
Show code
random_tier_from_vector = random_key_table(map_tier_vector) -- Grok's Stash Overhaul
L564 🔴 global_write
Global write: lvl_tier
Impact: low
Show code
lvl_tier = map_tier_vector[random_tier_from_vector] -- Grok's Stash Overhaul
L600 🔴 global_write
Global write: powder_type_chance
Impact: low
Show code
powder_type_chance = math.random(100)
L601 🔴 global_write
Global write: powder_type
Impact: low
Show code
powder_type = "powder_1"
L603 🔴 global_write
Global write: powder_type
Impact: low
Show code
powder_type = "powder_1"
L605 🔴 global_write
Global write: powder_type
Impact: low
Show code
powder_type = "powder_2"
L607 🔴 global_write
Global write: powder_type
Impact: low
Show code
powder_type = "powder_3"
L614 🔴 global_write
Global write: bullet_type_tbl
Impact: low
Show code
bullet_type_tbl = {
L633 🔴 global_write
Global write: bullet_type
Impact: low
Show code
bullet_type = bullet_type_tbl[math.random(#bullet_type_tbl)]
L638 🔴 global_write
Global write: casing_type_tbl
Impact: low
Show code
casing_type_tbl = {
L645 🔴 global_write
Global write: casing_type
Impact: low
Show code
casing_type = casing_type_tbl[math.random(#casing_type_tbl)]
L659 🔴 global_write
Global write: tools_random_tier_from_vector
Impact: low
Show code
tools_random_tier_from_vector = random_key_table(tools_map_tier_vector)
L660 🔴 global_write
Global write: tools_lvl_tier
Impact: low
Show code
tools_lvl_tier = tools_map_tier_vector[tools_random_tier_from_vector]
L663 🔴 global_write
Global write: tool_table
Impact: low
Show code
tool_table = {
L667 🔴 global_write
Global write: tool_type
Impact: low
Show code
tool_type = tool_table[math.random(#tool_table)]
L672 🔴 global_write
Global write: tool_table
Impact: low
Show code
tool_table = {
L678 🔴 global_write
Global write: tool_type
Impact: low
Show code
tool_type = tool_table[math.random(#tool_table)]
L686 🔴 global_write
Global write: tool_table
Impact: low
Show code
tool_table = {
L699 🔴 global_write
Global write: tool_type
Impact: low
Show code
tool_type = tool_table[math.random(#tool_table)]
L708 🔴 global_write
Global write: tool_type
Impact: low
Show code
tool_type = "itm_basickit"
L718 🔴 global_write
Global write: tool_type
Impact: low
Show code
tool_type = "itm_advancedkit"
L725 🔴 global_write
Global write: tool_type
Impact: low
Show code
tool_type = "itm_basickit"
L731 🔴 global_write
Global write: tool_type
Impact: low
Show code
tool_type = "itm_expertkit"
L735 🔴 global_write
Global write: tool_type
Impact: low
Show code
tool_type = "itm_basickit"
L739 🔴 global_write
Global write: tool_type
Impact: low
Show code
tool_type = "itm_advancedkit"
L743 🔴 global_write
Global write: tool_type
Impact: low
Show code
tool_type = "itm_expertkit"
L746 🔴 global_write
Global write: tool_type
Impact: low
Show code
tool_type = "itm_expertkit"
L993 🔴 global_write
Global write: caches
Impact: low
Show code
caches = data.treasure_manager.caches or caches
L929 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(i)
L931 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if (IsInvbox(nil,se_obj:clsid())) then
L932 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
local name = se_obj:name()
L938 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local lvl = sim:level_name(gg:vertex(se_obj.m_game_vertex_id):level_id())
L967 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_stash = sim:object(id)
L968 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local lvl = sim:level_name(game_graph():vertex(se_stash.m_game_vertex_id):level_id())
L273 🟡 unused_local_variable
Local variable 'sfind' is assigned but never used
Impact: low
Show code
local sfind = string.find
L364 🟡 unused_local_variable
Local variable 'last_type' is assigned but never used
Impact: low
Show code
local last_type

G.A.M.M.A. Reliable Animation Settings

4 files (🟢1 🟡1 🔴41 🔵16)

enhanced_animations.script

L132 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
if ea_debug then printf("speed is = "..speed) end
L177 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
if ea_debug then printf("update = "..failure_timer) end
L182 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("hide weapons for anim failed")
L183 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(used_item or (used_monster and used_monster:section()) or "anim find ERROR")
L184 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(anim_section or "NO ANIM SECTION FOUND")
L234 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("hud section is %s", hud)
L239 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("hud section %s is exo but no animation %s, revert back", hud, item)
L242 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("hud section %s is exo and found animation %s", hud, item)
L245 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("hud section %s is not exo", hud)
L30 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = true
L31 🔴 global_write
Global write: mutant_loot_mod
Impact: low
Show code
mutant_loot_mod = false
L35 🔴 global_write
Global write: used_item
Impact: low
Show code
used_item,ea_flag,fake_monster,det_active,anim_section = nil
L35 🔴 global_write
Global write: ea_flag
Impact: low
Show code
used_item,ea_flag,fake_monster,det_active,anim_section = nil
L35 🔴 global_write
Global write: fake_monster
Impact: low
Show code
used_item,ea_flag,fake_monster,det_active,anim_section = nil
L35 🔴 global_write
Global write: det_active
Impact: low
Show code
used_item,ea_flag,fake_monster,det_active,anim_section = nil
L35 🔴 global_write
Global write: anim_section
Impact: low
Show code
used_item,ea_flag,fake_monster,det_active,anim_section = nil
L53 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = not enable_animations
L59 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = ui_mcm.get("EA_settings/enable_animations")
L60 🔴 global_write
Global write: mutant_loot_mod
Impact: low
Show code
mutant_loot_mod = false --ui_mcm.get("EA_settings/mutant_loot")
L63 🔴 global_write
Global write: mutant_loot_mod
Impact: low
Show code
mutant_loot_mod = false
L67 🔴 global_write
Global write: mutant_loot_mod
Impact: low
Show code
mutant_loot_mod = false --ini_eff:r_bool_ex("anim_settings", "mutant_loot_mod")
L68 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = ui_options.get("video/player/animations")
L103 🔴 global_write
Global write: used_item
Impact: low
Show code
used_item = item
L105 🔴 global_write
Global write: anim_section
Impact: low
Show code
anim_section = ini_eff:r_string_ex(item, "anm")
L145 🔴 global_write
Global write: tmr
Impact: low
Show code
tmr = ini_eff:r_float_ex(used_item, "tm")
L163 🔴 global_write
Global write: tmr
Impact: low
Show code
tmr = ini_eff:r_float_ex("item_ea_harv_wpn_knife", "anim_length")
L199 🔴 global_write
Global write: anim_section
Impact: low
Show code
anim_section = nil
L315 🔴 global_write
Global write: used_item
Impact: low
Show code
used_item = nil
L326 🔴 global_write
Global write: fake_monster
Impact: low
Show code
fake_monster = used_monster
L328 🔴 global_write
Global write: ea_flag
Impact: low
Show code
ea_flag = true
L330 🔴 global_write
Global write: ea_flag
Impact: low
Show code
ea_flag = nil
L332 🔴 global_write
Global write: fake_monster
Impact: low
Show code
fake_monster = nil
L359 🔴 global_write
Global write: det_active
Impact: low
Show code
det_active = db.actor:active_detector() or nil

enhanced_animations_mcm.script

L3 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "EA_settings" ,sh=true ,gr={

take_item_anim.script

L38 🟢 repeated_item_section()
item:section() called 2x in actor_on_item_take
Impact: low
Show code
Cache item:section() result
L25 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = ui_options.get("video/player/animations")
L26 🔴 global_write
Global write: default_dist
Impact: low
Show code
default_dist = 0.12
L32 🔴 global_write
Global write: active_slot
Impact: low
Show code
active_slot = db.actor:active_slot()
L42 🔴 global_write
Global write: anim_used
Impact: low
Show code
anim_used = true
L66 🔴 global_write
Global write: anim_used
Impact: low
Show code
anim_used = false

zzz_ea_addon_backpack.script

L57 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("force found")
L87 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("inventory close")
L92 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("item was used before closing backpack")
L100 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("called backpack close anim")
L111 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("item_skiped")
L115 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(item)
L157 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("crouching = "..bool_to_int[crouching])
L40 🔴 global_write
Global write: item_use_flag
Impact: low
Show code
item_use_flag = nil
L96 🔴 global_write
Global write: item_use_flag
Impact: low
Show code
item_use_flag = nil
L109 🔴 global_write
Global write: item_use_flag
Impact: low
Show code
item_use_flag = true
L130 🔴 global_write
Global write: item_use_flag
Impact: low
Show code
item_use_flag = nil
L163 🔴 global_write
Global write: det_active
Impact: low
Show code
det_active = db.actor:active_detector() or nil
L165 🔴 global_write
Global write: backpack_faction
Impact: low
Show code
backpack_faction = character_community(db.actor):sub(7)
L182 🔴 global_write
Global write: idle
Impact: low
Show code
idle = "item_ea_backpack_open_" .. backpack_faction .. "_" .. "hud"
L185 🔴 global_write
Global write: ea_invent_flag
Impact: low
Show code
ea_invent_flag = true
L207 🔴 global_write
Global write: det_active
Impact: low
Show code
det_active = nil
L224 🔴 global_write
Global write: ea_invent_flag
Impact: low
Show code
ea_invent_flag = nil
L230 🔴 global_write
Global write: item_use_flag
Impact: low
Show code
if item:section() ~= "items_anm_dummy" then item_use_flag = true end
L126 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then

G.A.M.M.A. Rostok Mutant Arena Remover

1 file (🟢0 🟡0 🔴2 🔵2)

z_ph_door_bar_arena_remover.script

L52 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[z_ph_door_bar_arena_remover] Initialization...")
L55 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[z_ph_door_bar_arena_remover] Object released: %s %s", id, alife_object(id):name())
L8 🔴 global_write
Global write: try_to_open_door
Impact: low
Show code
try_to_open_door = ph_door.try_to_open_door
L24 🔴 global_write
Global write: try_to_close_door
Impact: low
Show code
try_to_close_door = ph_door.try_to_close_door

G.A.M.M.A. Scopes radius fixes

1 file (🟢0 🟡0 🔴1 🔵0)

scopeRadii.script

L4 🔴 global_write
Global write: scopeRadii
Impact: low
Show code
scopeRadii = {

G.A.M.M.A. Short Psi Storms

1 file (🟢2 🟡7 🔴2 🔵0)

psi_storm_manager.script

L123 🟢 uncached_globals_summary
Cache 1 globals in new_psi_storm_time
Impact: medium
Show code
L127: math.floor L132: math.floor
L193 🟢 uncached_globals_summary
Cache 1 globals in finish
Impact: medium
Show code
L206: pairs L216: pairs
L19 🔴 global_write
Global write: PsiStormManager
Impact: low
Show code
PsiStormManager = nil
L21 🔴 global_write
Global write: PsiStormManager
Impact: low
Show code
PsiStormManager = PsiStormManager or CPsiStormManager()
L507 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
se_npc = sim:object(id)
L509 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
squad = squad_id and sim:object(squad_id)
L545 🟡 potential_nil_access
Potential nil access: 'crow' from level.object_by_id() used without nil check
Impact: low
Show code
if(crow and crow:alive() and distance_2d(pos, crow:position())<25) then
L545 🟡 potential_nil_access
Potential nil access: 'crow' from level.object_by_id() used without nil check
Impact: low
Show code
if(crow and crow:alive() and distance_2d(pos, crow:position())<25) then
L29 🟡 unused_local_variable
Local variable 'prev_game_sec' is assigned but never used
Impact: low
Show code
local prev_game_sec = -1
L31 🟡 unused_local_variable
Local variable 'diff_game_sec' is assigned but never used
Impact: low
Show code
local diff_game_sec = -1
L563 🟡 unused_local_variable
Local variable 'time' is assigned but never used
Impact: low
Show code
local time = 0

G.A.M.M.A. Sin and Mutants are Allies

1 file (🟢0 🟡0 🔴5 🔵0)

grok_sin_allied_to_mutants.script

L44 🔴 global_write
Global write: void_pact
Impact: low
Show code
void_pact = mdata.grok_sin_allied_to_mutants
L46 🔴 global_write
Global write: void_pact
Impact: low
Show code
void_pact = {}
L49 🔴 global_write
Global write: nrows
Impact: low
Show code
nrows = 0
L51 🔴 global_write
Global write: nrows
Impact: low
Show code
nrows = nrows + 1
L54 🔴 global_write
Global write: void_pact
Impact: low
Show code
void_pact = {}

G.A.M.M.A. Skill System Balance

1 file (🟢2 🟡10 🔴10 🔵2)

haru_skills.script

L469 🟢 uncached_globals_summary
Cache 1 globals in on_game_load
Impact: medium
Show code
L480: pairs L486: pairs
L345 🟢 repeated_item_section()
item:section() called 8x in scavanger_effect
Impact: low
Show code
Cache item:section() result
L205 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("<HARU> | %s | " .. msg, time_global(), ...)
L446 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Could not exec function %s", str)
L1 🔴 global_write
Global write: skills_ini
Impact: low
Show code
skills_ini = ini_file_ex("plugins\\skills\\skills_base.ltx")
L2 🔴 global_write
Global write: skills_levels
Impact: low
Show code
skills_levels = {}
L3 🔴 global_write
Global write: skills_stats
Impact: low
Show code
skills_stats = {}
L4 🔴 global_write
Global write: skills_increments
Impact: low
Show code
skills_increments = {}
L5 🔴 global_write
Global write: options
Impact: low
Show code
options = {}
L194 🔴 global_write
Global write: rare_armors
Impact: low
Show code
rare_armors = {
L327 🔴 global_write
Global write: CreateReleaseItem
Impact: low
Show code
CreateReleaseItem = death_manager.create_release_item
L367 🔴 global_write
Global write: armor_spawn_chance
Impact: low
Show code
armor_spawn_chance = math.random(1,100)
L374 🔴 global_write
Global write: helm_spawn_chance
Impact: low
Show code
helm_spawn_chance = math.random(1,100)
L456 🔴 global_write
Global write: skills_levels
Impact: low
Show code
skills_levels = m_data.skills_levels or {}
L211 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local tot_weight = actor:get_total_weight()
L212 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local max_weight = actor:get_actor_max_weight()
L213 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local outfit = actor:item_in_slot(7)
L214 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local backpack = actor:item_in_slot(13)
L215 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
max_weight = max_weight + (outfit and outfit:get_additional_max_weight() or 0)
L216 🟡 potential_nil_access
Potential nil access: 'backpack' from :item_in_slot() used without nil check
Impact: low
Show code
max_weight = max_weight + (backpack and backpack:get_additional_max_weight() or 0)
L218 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:iterate_belt(function(owner, obj)
L223 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:cast_Actor():conditions():BoosterForEach(function(booster_type, booster_time, booster_value)
L16 🟡 unused_local_variable
Local variable 'inv_active' is assigned but never used
Impact: low
Show code
local inv_active = false
L473 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = death_ini:r_line_ex("keep_items",i,"","")

G.A.M.M.A. Sleep Balance

3 files (🟢1 🟡8 🔴0 🔵2)

actor_status_sleep.script

L97 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("You are really tired")
L34 🟡 unused_local_variable
Local variable 'comfy' is assigned but never used
Impact: low
Show code
local comfy = 0

actor_status_thirst.script

L86 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("You are really thirsty")
L23 🟡 unused_local_variable
Local variable 'caff_max' is assigned but never used
Impact: low
Show code
local caff_max = 3
L24 🟡 unused_local_variable
Local variable 'die_chance' is assigned but never used
Impact: low
Show code
local die_chance = 5

ui_sleep_dialog.script

L249 🟢 uncached_globals_summary
Cache 3 globals in get_immersive_sleep_hours
Impact: medium
Show code
L273: tostring L305: tostring L288: math.floor L292: math.floor L319: string.format L322: string.format
L9 🟡 unused_local_variable
Local variable 'last_sleep_chk' is assigned but never used
Impact: low
Show code
local last_sleep, last_sleep_chk, pwr_chk
L9 🟡 unused_local_variable
Local variable 'pwr_chk' is assigned but never used
Impact: low
Show code
local last_sleep, last_sleep_chk, pwr_chk
L219 🟡 unused_local_variable
Local variable 'bind' is assigned but never used
Impact: low
Show code
local bind = dik_to_bind(dik)
L251 🟡 unused_local_variable
Local variable 'sleepiness' is assigned but never used
Impact: low
Show code
local sleepiness = actor_status_sleep.get_last_sleep() or 0
L253 🟡 unused_local_variable
Local variable 'hours_fully_rested' is assigned but never used
Impact: low
Show code
local hours_fully_rested = 0

G.A.M.M.A. Snipers Remover

1 file (🟢3 🟡2 🔴6 🔵2)

grok_sniper_remover.script

L42 🟢 uncached_globals_summary
Cache 1 globals in actor_on_update
Impact: medium
Show code
L69: string.find L70: string.find
L52 🟢 repeated_alife
alife called 2x in actor_on_update
Impact: low
Show code
local sim = alife()
L65 🟢 repeated_npc_id()
npc:id() called 2x in actor_on_update
Impact: low
Show code
Cache npc:id() result
L58 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("// Looking for snipers to delete...")
L76 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("// Deleted a problematic sniper NPC")
L40 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 0
L41 🔴 global_write
Global write: delay
Impact: low
Show code
delay = 80000
L43 🔴 global_write
Global write: tg
Impact: low
Show code
tg = time_global()
L46 🔴 global_write
Global write: grok_delay
Impact: low
Show code
grok_delay = tg + delay
L47 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 1
L51 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 0
L54 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local actor_level = sim:level_name(gg:vertex(sim:actor().m_game_vertex_id):level_id())
L54 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local actor_level = sim:level_name(gg:vertex(sim:actor().m_game_vertex_id):level_id())

G.A.M.M.A. Starter items are not broken

1 file (🟢7 🟡14 🔴9 🔵20)

itms_manager.script

L197 🟢 uncached_globals_summary
Cache 1 globals in actor_on_first_update
Impact: medium
Show code
L212: pairs L234: pairs
L262 🟢 uncached_globals_summary
Cache 1 globals in actor_on_item_use
Impact: medium
Show code
L293: math.random L296: math.random
L636 🟢 uncached_globals_summary
Cache 1 globals in use_watch
Impact: medium
Show code
L639: tostring L649: tostring
L1161 🟢 uncached_globals_summary
Cache 1 globals in update
Impact: medium
Show code
L1163: pairs L1192: pairs
L333 🟢 repeated_obj_id()
obj:id() called 2x in actor_on_item_take
Impact: low
Show code
Cache obj:id() result
L713 🟢 repeated_wpn_section()
wpn:section() called 3x in new_game_equippment
Impact: low
Show code
Cache wpn:section() result
L1306 🟢 repeated_alife
alife called 3x in Create_Item
Impact: low
Show code
local sim = alife()
L78 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR item_combination | wrong section names")
L705 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("- Autosaved new game")
L1008 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: relocate_item_to_actor | object for section [%s] is bugged!", section)
L1063 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR: Couldn't relocate_item_from_actor | not enough item [%s] recolated! need %s more", section, cnt)
L1095 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR itms_manager | play_item_sound | no object recieved!")
L1167 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("* ItemProcessor | processing condition | id: %s - con: %s", id, con)
L1177 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("# ItemProcessor | processing condition done | id: %s - con: %s", id, new_con)
L1196 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("* ItemProcessor | processing uses | id: %s - uses: %s", id, uses)
L1205 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("# ItemProcessor | processing uses done | id: %s - con: %s", id, uses)
L1224 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("* ItemProcessor | processing ammo | id: %s - ammo: %s", id, ammo)
L1233 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("# ItemProcessor | processing ammo done | id: %s - con: %s", id, new_con)
L1282 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ItemProcessor | Missing spawn properties for [%s] | Spawn type: %s | pos: %s, lvi: %s, gvi: %s", section, spawn_typ, pos , lvi , gvi)
L1316 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/ alife_create [%s] (%s) x%s ammo %s", section, se_ammo and se_ammo.id, num_in_box, spawn_typ)
L1325 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/ alife_create [%s] (%s) x%s ammo %s", section, se_ammo and se_ammo.id, num, spawn_typ)
L1340 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/ alife_create [%s] (%s) on %s", section, se_itm and se_itm.id, spawn_typ)
L1344 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ItemProcessor | Missing spawn owner for [%s]!", section)
L1383 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR [%s] is not spawned by ItemProcessor",section)
L1387 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ItemProcessor | section [%s] doesn't exist!", section)
L1391 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ ItemProcessor | nothing is passed to process!")
L1426 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s ItemProcessor | %s: (%s) [%s] - owner: (%s) [%s]", mark, str, id, obj and obj:section(), p and p:id() or "-", p and p:section())
L27 🔴 global_write
Global write: ini_manager
Impact: low
Show code
ini_manager = ini_file("items\\settings\\itms_manager.ltx")
L28 🔴 global_write
Global write: ini_container
Impact: low
Show code
ini_container = ini_file("items\\settings\\arty_container.ltx")
L29 🔴 global_write
Global write: ini_parts
Impact: low
Show code
ini_parts = ini_file("items\\settings\\parts.ltx")
L30 🔴 global_write
Global write: ini_craft
Impact: low
Show code
ini_craft = ini_file("items\\settings\\craft.ltx")
L31 🔴 global_write
Global write: ini_death
Impact: low
Show code
ini_death = ini_file("items\\settings\\death_generic.ltx")
L32 🔴 global_write
Global write: ini_reward
Impact: low
Show code
ini_reward = ini_file("items\\settings\\item_rewards.ltx")
L40 🔴 global_write
Global write: itms_arty_container
Impact: low
Show code
itms_arty_container = utils_data.collect_section(ini_container,"containers",true) or {}
L51 🔴 global_write
Global write: item_rewards
Impact: low
Show code
item_rewards = {}
L66 🔴 global_write
Global write: item_combine
Impact: low
Show code
item_combine = {}
L529 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L537 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L544 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L657 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then
L1310 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
se_tbl[#se_tbl+1] = sim:create_ammo(section, pos, lvi, gvi, p_id, num_in_box)
L1320 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
se_tbl[#se_tbl+1] = sim:create_ammo(section, pos, lvi, gvi, p_id, num)
L1425 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
local p = obj and obj:parent()
L100 🟡 unused_local_variable
Local variable 'booster_string' is assigned but never used
Impact: low
Show code
local booster_string = {
L325 🟡 unused_local_variable
Local variable 'str_itm_taken' is assigned but never used
Impact: low
Show code
local str_itm_taken = game.translate_string("st_item_taken")
L338 🟡 unused_local_variable
Local variable 'fuel' is assigned but never used
Impact: low
Show code
local fuel = tostring(math.random(6,8))
L637 🟡 unused_local_variable
Local variable 'Y' is assigned but never used
Impact: low
Show code
local Y, M, D, h, mint, sec, ms = game.get_game_time():get()
L637 🟡 unused_local_variable
Local variable 'M' is assigned but never used
Impact: low
Show code
local Y, M, D, h, mint, sec, ms = game.get_game_time():get()
L637 🟡 unused_local_variable
Local variable 'D' is assigned but never used
Impact: low
Show code
local Y, M, D, h, mint, sec, ms = game.get_game_time():get()
L637 🟡 unused_local_variable
Local variable 'ms' is assigned but never used
Impact: low
Show code
local Y, M, D, h, mint, sec, ms = game.get_game_time():get()

G.A.M.M.A. Starting Loadouts

2 files (🟢8 🟡42 🔴6 🔵2)

grok_remove_knife_ammo_on_start.script

L17 🔴 global_write
Global write: obj
Impact: low
Show code
obj = db.actor:object(k)
L34 🔴 global_write
Global write: obj
Impact: low
Show code
obj = db.actor:object(k)
L16 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
if actor:object(k) then
L33 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
if actor:object(k) then

zz_glowstick_mcm.script

L54 🟢 uncached_globals_summary
Cache 1 globals in actor_on_update
Impact: medium
Show code
L61: string.find L86: string.find
L131 🟢 uncached_globals_summary
Cache 1 globals in spawn_glowstick
Impact: medium
Show code
L156: math.random L157: math.random
L936 🟢 uncached_globals_summary
Cache 1 globals in spawn_glowostick
Impact: medium
Show code
L938: math.random L945: math.random
L61 🟢 repeated_det_section()
det:section() called 4x in actor_on_update
Impact: low
Show code
Cache det:section() result
L99 🟢 repeated_det_id()
det:id() called 2x in actor_on_update
Impact: low
Show code
Cache det:id() result
L221 🟢 repeated_itm_id()
itm:id() called 2x in actor_on_item_drop
Impact: low
Show code
Cache itm:id() result
L409 🟢 repeated_obj_id()
obj:id() called 9x in iter
Impact: low
Show code
Cache obj:id() result
L517 🟢 repeated_self_object_id()
self.object:id() called 9x in update
Impact: low
Show code
Cache self.object:id() result
L144 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!Couldn't spawn Glowstick!")
L151 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!Couldn't get Glowstick data!")
L586 🔴 global_write
Global write: options
Impact: low
Show code
options =
L669 🔴 global_write
Global write: base_get_light_flicker
Impact: low
Show code
base_get_light_flicker = level_environment.get_light_flicker()
L951 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update
L958 🔴 global_write
Global write: SpawnCosmetics
Impact: low
Show code
SpawnCosmetics = death_manager.spawn_cosmetics
L56 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local det = actor:active_detector()
L61 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
if (string.find(det:section(), "glowstick")) then
L62 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
if (det:condition() > 0.01) then
L63 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
local new_c = clamp(det:condition() - active_gs_drain, 0.01, 0.9999)
L64 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
det:set_condition(new_c)
L71 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
if (det:get_state() ~= last_det_state) then
L72 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
last_det_state = det:get_state()
L73 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
active_gs_drain = ini_sys:r_float_ex(det:section(), "power_drain", 0.001)
L86 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
if (string.find(det:section(), "flashlight")) then
L87 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
if (det:get_state() == 1 and not axr_main.weapon_is_zoomed) then
L88 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
local prev_con = det:condition()
L89 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
det:set_condition(0.001)
L90 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
det:switch_state(0)
L91 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
local tm = det:play_hud_motion("anm_show", false, 1, 1, 0) / 1000
L95 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
obj:set_condition(con_d)
L99 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
CreateTimeEvent("glowstick","flashlight_fix",clamp(tm-0.5,0.1,999),flashlight_fix,det:id(),prev_con)
L108 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
if (det:get_state() ~= 0 or shift_pressed or not is_empty(_GUIs) or not game.hud_motion_allowed() or game.only_movekeys_allowed() or not string.find(det:section(), "glowstick")) then
L108 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
if (det:get_state() ~= 0 or shift_pressed or not is_empty(_GUIs) or not game.hud_motion_allowed() or game.only_movekeys_allowed() or not string.find(det:section(), "glowstick")) then
L117 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
local tm = det:play_hud_motion("anm_throw_stick", true, 0, 1, 0) / 1000
L123 🟡 potential_nil_access
Potential nil access: 'det' from :active_detector() used without nil check
Impact: low
Show code
CreateTimeEvent("glowstick","drop",tm-0.2,spawn_glowstick,det:id(),true)
L135 🟡 potential_nil_access
Potential nil access: 'itm' from level.object_by_id() used without nil check
Impact: low
Show code
if (not itm or (not throw and itm:parent())) then return true end
L138 🟡 potential_nil_access
Potential nil access: 'itm' from level.object_by_id() used without nil check
Impact: low
Show code
local section = itm:section()
L139 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local pos = actor:bone_position(throw and "eye_left" or "bip01_l_hand")
L141 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local obj = alife_create("lights_glowstick", pos, actor:level_vertex_id(), actor:game_vertex_id())
L141 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local obj = alife_create("lights_glowstick", pos, actor:level_vertex_id(), actor:game_vertex_id())
L161 🟡 potential_nil_access
Potential nil access: 'itm' from level.object_by_id() used without nil check
Impact: low
Show code
local con_d = itm:condition()
L164 🟡 potential_nil_access
Potential nil access: 'itm' from level.object_by_id() used without nil check
Impact: low
Show code
alife_release_id(itm:id())
L211 🟡 potential_nil_access
Potential nil access: 'gl' from level.object_by_id() used without nil check
Impact: low
Show code
gl:get_physics_shell():apply_force(dir.x, dir.y, dir.z)
L262 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local next = actor:object(section)
L271 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:move_to_slot(next,9)
L285 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:iterate_ruck(function (temp, obj)
L302 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:move_to_slot(glowsticks_in_ruck[1].object, 9)
L322 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
if (actor:item_in_slot(9)) then return true end
L323 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
if (not actor:object_id(id)) then return true end
L324 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:move_to_slot(actor:object_id(id),9)
L324 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:move_to_slot(actor:object_id(id),9)
L326 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local itm = actor:active_item()
L328 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
local slot = ini_sys:r_s32(itm:section(), "slot")
L346 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local det = actor:active_detector()
L928 🟡 unused_local_variable
Local variable 'sections_table' is assigned but never used
Impact: low
Show code
local sections_table = {

G.A.M.M.A. Stealth Crash Fix

1 file (🟢7 🟡12 🔴0 🔵18)

visual_memory_manager.script

L69 🟢 repeated_who_id()
who:id() called 7x in get_visible_value
Impact: low
Show code
Cache who:id() result
L69 🟢 repeated_db_actor_id()
db.actor:id() called 5x in get_visible_value
Impact: low
Show code
Cache db.actor:id() result
L106 🟢 repeated_npc_id()
npc:id() called 10x in get_visible_value
Impact: low
Show code
Cache npc:id() result
L159 🟢 repeated_obj_id()
obj:id() called 4x in get_visible_value
Impact: low
Show code
Cache obj:id() result
L240 🟢 repeated_outfit_section()
outfit:section() called 3x in slot_in_out
Impact: low
Show code
Cache outfit:section() result
L257 🟢 repeated_npc_id()
npc:id() called 2x in npc_on_before_hit
Impact: low
Show code
Cache npc:id() result
L263 🟢 repeated_member_id()
member:id() called 2x in npc_on_before_hit
Impact: low
Show code
Cache member:id() result
L167 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('---------------------------------------------------------------')
L168 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Weather is: " .. (wthrs))
L169 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("1. Luminocity ---------- %s", Luminocity)
L170 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("1.a) luminocity --------- %s", luminocity)
L171 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("1.b) lights_lum() ------- %s", lights_lum())
L172 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("1.c) who:get_lum() ---- %s", who:get_luminocity())
L173 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("2. Velocity ------------- %s", Velocity)
L174 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("3. dist_original --------- %s", distance)
L175 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("4. weight&outfit ------- %s", weight)
L176 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("5. crouch ------------- %s", crouch)
L177 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("6.a) shot_mult --------- %s", shot_mult)
L178 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("6.b) danger ------------ %s", danger_mult)
L179 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("6.c) camo ------------- %s", camo_x)
L180 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("6.d) ai scheme --------- %s", scheme_mult)
L181 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("6.e) get_camo_k ------ %s", get_camo_k)
L182 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("6.f) jacketmult --------- %s", jacketmult)
L183 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("7. memory ------------- %s", memory_factor)
L184 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("8. Step incr --- %s", step_incr)
L69 🟡 potential_nil_access
Potential nil access: 'torch' from :item_in_slot() used without nil check
Impact: low
Show code
local actor_torch_active = (who and (who:id() == db.actor:id()) and ( (torch and torch:torch_enabled()) or (flash and (flash:section() == "device_flashlight") and db.actor:active_detector()) ))
L69 🟡 potential_nil_access
Potential nil access: 'flash' from :item_in_slot() used without nil check
Impact: low
Show code
local actor_torch_active = (who and (who:id() == db.actor:id()) and ( (torch and torch:torch_enabled()) or (flash and (flash:section() == "device_flashlight") and db.actor:active_detector()) ))
L159 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
if (obj and (obj:alive()) and (who and (who:id() == db.actor:id() or who:id() == obj:id() ) and npc and (npc:id() == db.actor:id() or npc:id() == obj:id() ))) and (not obj:see(db.actor)) then
L159 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
if (obj and (obj:alive()) and (who and (who:id() == db.actor:id() or who:id() == obj:id() ) and npc and (npc:id() == db.actor:id() or npc:id() == obj:id() ))) and (not obj:see(db.actor)) then
L159 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
if (obj and (obj:alive()) and (who and (who:id() == db.actor:id() or who:id() == obj:id() ) and npc and (npc:id() == db.actor:id() or npc:id() == obj:id() ))) and (not obj:see(db.actor)) then
L159 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
if (obj and (obj:alive()) and (who and (who:id() == db.actor:id() or who:id() == obj:id() ) and npc and (npc:id() == db.actor:id() or npc:id() == obj:id() ))) and (not obj:see(db.actor)) then
L161 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
elseif obj and obj:see(db.actor) then
L216 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if not (IsWeapon(wpn)) or IsMelee(wpn) or wpn:weapon_is_silencer() then return end
L240 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local kind = outfit and ini_sys:r_string_ex(outfit:section(),"kind")
L241 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local get_camo_get_line = outfit and ini_sys:line_exist(outfit:section(), "npc_blindness_koeff")
L242 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
get_camo_k = get_camo_get_line and ini_sys:r_float(outfit:section(), "npc_blindness_koeff") or 0
L262 🟡 potential_nil_access
Potential nil access: 'member' from level.object_by_id() used without nil check
Impact: low
Show code
if member and member.alive and member:alive() then

G.A.M.M.A. Tutorials

6 files (🟢0 🟡3 🔴7 🔵1)

npe_gamma_tutorial_ammo_mcm.script

L59 🔴 global_write
Global write: wpn
Impact: low
Show code
wpn = level.object_by_id(shit.weapon_id)
L128 🔴 global_write
Global write: op
Impact: low
Show code
op = { id = deck.id, sh = true, text = deck.mcm_menu_name, gr = npe_mcm.get_module_menu(deck) }
L15 🟡 unused_local_variable
Local variable 'ammo_items' is assigned but never used
Impact: low
Show code
local ammo_items = {
L61 🟡 unused_local_variable
Local variable 'wpn_id' is assigned but never used
Impact: low
Show code
local wpn_id = wpn:id()

npe_gamma_tutorial_artefact_mcm.script

L120 🔴 global_write
Global write: op
Impact: low
Show code
op = { id = deck.id, sh = true, text = deck.mcm_menu_name, gr = npe_mcm.get_module_menu(deck) }

npe_gamma_tutorial_heal_mcm.script

L128 🔴 global_write
Global write: op
Impact: low
Show code
op = { id = deck.id, sh = true, text = deck.mcm_menu_name, gr = npe_mcm.get_module_menu(deck) }

npe_gamma_tutorial_repair_mcm.script

L90 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("BROKEN_ARMOR_FOUND")
L198 🔴 global_write
Global write: op
Impact: low
Show code
op = { id = deck.id, sh = true, text = deck.mcm_menu_name, gr = npe_mcm.get_module_menu(deck) }

npe_gamma_tutorial_task_mcm.script

L89 🔴 global_write
Global write: op
Impact: low
Show code
op = { id = deck.id, sh = true, text = deck.mcm_menu_name, gr = npe_mcm.get_module_menu(deck) }

npe_gamma_tutorial_vehicle_mcm.script

L100 🔴 global_write
Global write: op
Impact: low
Show code
op = { id = deck.id, sh = true, text = deck.mcm_menu_name, gr = npe_mcm.get_module_menu(deck) }
L51 🟡 unused_local_variable
Local variable 'faction' is assigned but never used
Impact: low
Show code
local faction = get_actor_true_community()

G.A.M.M.A. UI

10 files (🟢26 🟡85 🔴38 🔵40)

a_faction_prices.script

L15 🔴 global_write
Global write: GetCost
Impact: low
Show code
GetCost = utils_item.get_item_cost
L16 🔴 global_write
Global write: get_trader_community
Impact: low
Show code
get_trader_community = faction_stocks.get_trader_community
L18 🔴 global_write
Global write: multiplier
Impact: low
Show code
multiplier = 1
L19 🔴 global_write
Global write: supply_level
Impact: low
Show code
supply_level = nil
L47 🔴 global_write
Global write: multiplier
Impact: low
Show code
multiplier = 1 -- reset the multiplier
L46 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local reputation = actor:character_reputation()
L1 🟡 unused_local_variable
Local variable 'level_multipliers' is assigned but never used
Impact: low
Show code
local level_multipliers = {
L20 🟡 unused_local_variable
Local variable 'use_north_level_mul' is assigned but never used
Impact: low
Show code
local use_north_level_mul = true
L21 🟡 unused_local_variable
Local variable 'use_goodwill_mul' is assigned but never used
Impact: low
Show code
local use_goodwill_mul = true
L22 🟡 unused_local_variable
Local variable 'use_ignore_faction_goodwill' is assigned but never used
Impact: low
Show code
local use_ignore_faction_goodwill = false
L23 🟡 unused_local_variable
Local variable 'use_reputation_mul' is assigned but never used
Impact: low
Show code
local use_reputation_mul = true
L24 🟡 unused_local_variable
Local variable 'goodwill_mul' is assigned but never used
Impact: low
Show code
local goodwill_mul = 2
L25 🟡 unused_local_variable
Local variable 'rep_mul' is assigned but never used
Impact: low
Show code
local rep_mul = 2
L26 🟡 unused_local_variable
Local variable 'gt' is assigned but never used
Impact: low
Show code
local gt = game.translate_string
L43 🟡 unused_local_variable
Local variable 'goodwill' is assigned but never used
Impact: low
Show code
local goodwill = relation_registry.community_goodwill(trader_faction, 0)
L44 🟡 unused_local_variable
Local variable 'current_level' is assigned but never used
Impact: low
Show code
local current_level = level.name()
L46 🟡 unused_local_variable
Local variable 'reputation' is assigned but never used
Impact: low
Show code
local reputation = actor:character_reputation()

actor_status_sleep.script

L34 🟡 unused_local_variable
Local variable 'comfy' is assigned but never used
Impact: low
Show code
local comfy = 0

actor_status_thirst.script

L23 🟡 unused_local_variable
Local variable 'caff_max' is assigned but never used
Impact: low
Show code
local caff_max = 3

alticons.script

L10 🔴 global_write
Global write: size_adjust
Impact: low
Show code
size_adjust = 0.75
L12 🔴 global_write
Global write: basethrst
Impact: low
Show code
basethrst = actor_status_thirst.create
L19 🔴 global_write
Global write: basesleep
Impact: low
Show code
basesleep = actor_status_sleep.create
L47 🔴 global_write
Global write: ratio
Impact: low
Show code
ratio = (device().height / device().width) / (768 / 1024)
L54 🔴 global_write
Global write: pos
Impact: low
Show code
pos = self.dialog:GetWndPos()

axr_companions.script

L416 🟢 repeated_npc_id()
npc:id() called 3x in remove_from_actor_squad
Impact: low
Show code
Cache npc:id() result
L975 🟢 repeated_npc_id()
npc:id() called 3x in companion_remove_waypoints
Impact: low
Show code
Cache npc:id() result
L985 🟢 repeated_npc_id()
npc:id() called 3x in companion_add_waypoints
Impact: low
Show code
Cache npc:id() result
L1210 🟢 repeated_device
device called 4x in move_to_point
Impact: low
Show code
local dev = device()
L251 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! axr_companions | cleared old data: %s", "companion_"..c_idx)
L354 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("ERROR: do not have access to scripts\\beh_companion.ltx! Make sure you installed properly!")
L473 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Companions | Can't play the effect when it's being played aleady")
L490 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Companions | squad can't be added cause it doesn't exist?!")
L495 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Companions | squad (%s) is already companion squad", squad.id)
L520 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Companions | squad can't be dismissed cause it doesn't exist?!")
L525 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Companions | squad (%s) can't be dismissed cause it's not a companion squad", squad.id)
L539 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Companions | squad can't be released cause it doesn't exist?!")
L623 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR add_task_companion | can't find story squad [%s]", p[1])
L630 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR add_task_giver_companion | can't set up task giver as companion because task is not declared")
L637 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR add_task_giver_companion | task [%s] is not active", p[1])
L643 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR add_task_giver_companion | task giver id not found for task [%s]", p[1])
L650 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR add_task_giver_companion | can't find task giver object (%s) for task [%s]", id, p[1])
L659 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR add_task_giver_companion | can't set up task giver as companion because task is not declared")
L666 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR add_task_giver_companion | task [%s] is not active", p[1])
L672 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR add_task_giver_companion | task giver id not found for task [%s]", p[1])
L679 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR add_task_giver_companion | can't find task giver object (%s) for task [%s]", id, p[1])
L690 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR add_speaker_companion | actor is not talking")
L698 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR add_speaker_companion | speaker id not found for task [%s]", task_id)
L704 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR add_speaker_companion | can't find speaker object (%s) for task [%s]", id, task_id)
L714 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("- %s | saved companion id (%s)", task_id, id)
L732 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR dismiss_speaker_companion | speaker squad id not found for task [%s]", task_id)
L774 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! setup_companion_task: no smart found! %s", smart_id or smrt_name)
L779 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! setup_companion_task: Trying to setup companion squad with a non-existent section!")
L1260 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!ERROR axr_companions.get_inventory_table | no npc object recieved")
L1339 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe('ERROR axr_companions.trasnfer_item | no object recieved | item: %s - npc_from: %s - npc_to: %s', (item and true), (npc_from and true), (npc_to and true))
L1363 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('~ axr_companions.trasnfer_item | item [%s] is not assigned to companion [%s] | assigned companion: %s - assigned item: %s', item:name(), npc_from:name(), is_assigned_companion(npc_from), is_assigned_item(id_from,item_id))
L1399 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('! is_assigned_item: one or more arguments nil: %s %s',npc_id, item_id)
L1501 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('! is_assigned_companion: id is nil: %s %s',npc_id)
L20 🔴 global_write
Global write: allow_only_friends_as_companions
Impact: low
Show code
allow_only_friends_as_companions = true
L21 🔴 global_write
Global write: allow_simulation_squads_as_companions
Impact: low
Show code
allow_simulation_squads_as_companions = false
L22 🔴 global_write
Global write: max_actor_squad_size
Impact: low
Show code
max_actor_squad_size = 0 -- used only for non task companions
L25 🔴 global_write
Global write: companion_squads
Impact: low
Show code
companion_squads = {}
L26 🔴 global_write
Global write: non_task_companions
Impact: low
Show code
non_task_companions = {}
L148 🔴 global_write
Global write: non_task_companions
Impact: low
Show code
non_task_companions = m_data.non_task_companions or non_task_companions
L151 🔴 global_write
Global write: companion_squads
Impact: low
Show code
companion_squads = m_data.companion_squads or companion_squads
L168 🔴 global_write
Global write: st
Impact: low
Show code
st = db.storage[k.id]
L231 🔴 global_write
Global write: max_actor_squad_size
Impact: low
Show code
max_actor_squad_size = ini:r_float_ex("main","max_actor_squad_size_patriarch") or 4
L261 🔴 global_write
Global write: Enabled
Impact: low
Show code
Enabled = ini:r_bool_ex("main","enable",false)
L284 🔴 global_write
Global write: allow_only_friends_as_companions
Impact: low
Show code
allow_only_friends_as_companions = ini:r_bool_ex("main","allow_only_friends_as_companions",false)
L285 🔴 global_write
Global write: allow_simulation_squads_as_companions
Impact: low
Show code
allow_simulation_squads_as_companions = ini:r_bool_ex("main","allow_simulation_squads_as_companions",false)
L286 🔴 global_write
Global write: max_actor_squad_size
Impact: low
Show code
max_actor_squad_size = ini:r_float_ex("main","max_actor_squad_size") or 2
L1045 🔴 global_write
Global write: st
Impact: low
Show code
st = db.storage[k.id]
L1233 🔴 global_write
Global write: st
Impact: low
Show code
st = db.storage[k.id]
L1808 🔴 global_write
Global write: pass
Impact: low
Show code
pass = false
L117 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_actor = sim:actor()
L126 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local squad = sim:object(id)
L217 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
sim:teleport_object(k.id,gvid,lvid,pos)
L296 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(id)
L298 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if (se_load_var(se_obj.id,se_obj:name(),"companion_cannot_teleport")) then
L303 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
if (id) and (sim:has_info(id,"npcx_beh_patrol_mode") or sim:has_info(id,"npcx_beh_wait")) then
L303 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
if (id) and (sim:has_info(id,"npcx_beh_patrol_mode") or sim:has_info(id,"npcx_beh_wait")) then
L360 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_npc = sim:object(id)
L363 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local unreg = sim:object(unreg_id)
L365 🟡 potential_nil_access
Potential nil access: 'unreg' from :object() used without nil check
Impact: low
Show code
unreg:unregister_npc(se_npc)
L379 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_npc = sim:object(id)
L382 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local unreg = sim:object(unreg_id)
L384 🟡 potential_nil_access
Potential nil access: 'unreg' from :object() used without nil check
Impact: low
Show code
unreg:unregister_npc(se_npc)
L568 🟡 potential_nil_access
Potential nil access: 'companion' from level.object_by_id() used without nil check
Impact: low
Show code
if companion and companion:alive() and (not companion:best_enemy()) then
L568 🟡 potential_nil_access
Potential nil access: 'companion' from level.object_by_id() used without nil check
Impact: low
Show code
if companion and companion:alive() and (not companion:best_enemy()) then
L572 🟡 potential_nil_access
Potential nil access: 'target' from level.object_by_id() used without nil check
Impact: low
Show code
and target:alive()
L573 🟡 potential_nil_access
Potential nil access: 'target' from level.object_by_id() used without nil check
Impact: low
Show code
and target:best_enemy()
L574 🟡 potential_nil_access
Potential nil access: 'target' from level.object_by_id() used without nil check
Impact: low
Show code
and ((target:best_enemy():id() == 0) or (target:best_enemy():id() == companion_id))
L574 🟡 potential_nil_access
Potential nil access: 'target' from level.object_by_id() used without nil check
Impact: low
Show code
and ((target:best_enemy():id() == 0) or (target:best_enemy():id() == companion_id))
L576 🟡 potential_nil_access
Potential nil access: 'target' from level.object_by_id() used without nil check
Impact: low
Show code
xr_danger.set_script_danger(companion,7000,target:id(),vector():set(target:position()))
L576 🟡 potential_nil_access
Potential nil access: 'target' from level.object_by_id() used without nil check
Impact: low
Show code
xr_danger.set_script_danger(companion,7000,target:id(),vector():set(target:position()))
L1275 🟡 potential_nil_access
Potential nil access: 'itm_slot' from :item_in_slot() used without nil check
Impact: low
Show code
ignore_ids[itm_slot:id()] = true
L1282 🟡 potential_nil_access
Potential nil access: 'wpn' from :item_in_slot() used without nil check
Impact: low
Show code
local ammos = utils_item.get_ammo(wpn:section(), wpn:id(), true)
L1282 🟡 potential_nil_access
Potential nil access: 'wpn' from :item_in_slot() used without nil check
Impact: low
Show code
local ammos = utils_item.get_ammo(wpn:section(), wpn:id(), true)
L1363 🟡 potential_nil_access
Potential nil access: 'item' from level.object_by_id() used without nil check
Impact: low
Show code
printf('~ axr_companions.trasnfer_item | item [%s] is not assigned to companion [%s] | assigned companion: %s - assigned item: %s', item:name(), npc_from:name(), is_assigned_companion(npc_from), is_assigned_item(id_from,item_id))
L1584 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
if obj and obj:has_info("npcx_is_companion") and (distance_between(db.actor,obj) <= max_trade_distance) then
L1526 🟡 unused_local_variable
Local variable 'over_weight' is assigned but never used
Impact: low
Show code
local over_weight, tot_weight, max_weight = is_overweight(npc)

item_cooking.script

L88 🟢 uncached_globals_summary
Cache 1 globals in InitControls
Impact: medium
Show code
L129: tostring L130: tostring
L291 🟢 uncached_globals_summary
Cache 2 globals in Load_MealRecipes
Impact: medium
Show code
L298: tonumber L315: tonumber L317: tostring L318: tostring
L199 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str = str .. " " .. ui_item.get_sec_name(sec) .. ","
L32 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!ERROR item_cooking | no game object passed!")
L296 🔴 global_write
Global write: result
Impact: low
Show code
result, id, value = self.ini:r_line_ex("fuel",i,"","")
L296 🔴 global_write
Global write: id
Impact: low
Show code
result, id, value = self.ini:r_line_ex("fuel",i,"","")
L296 🔴 global_write
Global write: value
Impact: low
Show code
result, id, value = self.ini:r_line_ex("fuel",i,"","")
L305 🔴 global_write
Global write: result
Impact: low
Show code
result, id, value = self.ini:r_line_ex("meal_list",i,"","")
L305 🔴 global_write
Global write: id
Impact: low
Show code
result, id, value = self.ini:r_line_ex("meal_list",i,"","")
L305 🔴 global_write
Global write: value
Impact: low
Show code
result, id, value = self.ini:r_line_ex("meal_list",i,"","")
L307 🔴 global_write
Global write: id
Impact: low
Show code
id = string.sub(id,3)
L593 🟡 unused_local_variable
Local variable 'bind' is assigned but never used
Impact: low
Show code
local bind = dik_to_bind(dik)

ui_inventory.script

L800 🟢 table_insert_append
table.insert(context_str, v) -> context_str[#context_str+1] = v
Impact: high
Show code
table.insert(context_str, name)
L805 🟢 table_insert_append
table.insert(context_action, v) -> context_action[#context_action+1] = v
Impact: high
Show code
table.insert(context_action, func_action[1])
L806 🟢 table_insert_append
table.insert(context_params, v) -> context_params[#context_params+1] = v
Impact: high
Show code
table.insert(context_params, {id, bag, unpack(func_action)})
L1210 🟢 table_insert_append
table.insert(free_slots, v) -> free_slots[#free_slots+1] = v
Impact: high
Show code
table.insert(free_slots, cslots[i])
L745 🟢 uncached_globals_summary
Cache 1 globals in InitProperties
Impact: medium
Show code
L766: unpack L775: unpack
L1686 🟢 uncached_globals_summary
Cache 1 globals in UpdateStats
Impact: medium
Show code
L1691: pairs L1726: pairs
L1896 🟢 uncached_globals_summary
Cache 1 globals in On_Sort
Impact: medium
Show code
L1932: pairs L1935: pairs
L2326 🟢 uncached_globals_summary
Cache 1 globals in LMode_RefreshInventories
Impact: medium
Show code
L2333: pairs L2339: pairs
L2503 🟢 uncached_globals_summary
Cache 1 globals in TMode_RefreshInventories
Impact: medium
Show code
L2511: pairs L2516: pairs
L2822 🟢 uncached_globals_summary
Cache 1 globals in RMode_InitItem
Impact: medium
Show code
L2835: pairs L2881: pairs
L3473 🟢 uncached_globals_summary
Cache 1 globals in On_CC_Mouse1_DB
Impact: medium
Show code
L3531: unpack L3540: unpack
L3693 🟢 uncached_globals_summary
Cache 1 globals in Update
Impact: medium
Show code
L3722: pairs L3737: pairs
L3276 🟢 repeated_obj_from_section()
obj_from:section() called 3x in On_CC_DragDrop
Impact: low
Show code
Cache obj_from:section() result
L712 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR Can't get item game object!")
L892 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR UIInventory:Name_Custom | can't find function (%s) for %s in section [%s]", str[1] .. str[2], "use" .. i .. "_functor", sec)
L1270 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR UIInventory:Action_Custom | can't find function (%s) for %s in section [%s]", str[1] .. str[2], "use" .. i .. "_action_functor", sec)
L1701 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("UIInventory | can't get cast_CustomOutfit of [%s]", outfit:name())
L1734 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("UIInventory | can't get cast_Helmet of [%s]", outfit:name())
L17 🔴 global_write
Global write: display_supply_level
Impact: low
Show code
display_supply_level = true
L3298 🔴 global_write
Global write: quick_item
Impact: low
Show code
quick_item = exec_console_cmd("slot_" .. (idx_to - 1) .. " " .. obj_from:section())
L714 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
self:Print(nil, msg, obj:name())
L733 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
return p:id() == AC_ID
L736 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
return npc and p:id() == npc:id()
L1494 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check (auto-fixable)
Impact: low
Show code
self:ShowFaction(actor:character_community(), "player")
L1496 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
self.player_community:SetText( game.translate_string(actor:character_community()) )
L1497 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
self.player_icon:InitTexture( actor:character_icon() )
L1498 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
self.player_money:SetText( actor:money() )
L1499 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
self:ShowRank(actor:character_rank(), "player")
L1532 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local outfit = actor:item_in_slot(7)
L1533 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local backpack = actor:item_in_slot(13)
L1536 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local tot_weight = actor:get_total_weight()
L1539 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local max_weight = actor:get_actor_max_weight()
L1542 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
max_weight = max_weight + (outfit and outfit:get_additional_max_weight() or 0)
L1545 🟡 potential_nil_access
Potential nil access: 'backpack' from :item_in_slot() used without nil check
Impact: low
Show code
max_weight = max_weight + (backpack and backpack:get_additional_max_weight() or 0)
L1556 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:cast_Actor():conditions():BoosterForEach( function(booster_type, booster_time, booster_value)
L1627 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local item = actor:item_in_slot(i)
L1639 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local outfit = actor:item_in_slot(7)
L1656 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local outfit = actor:item_in_slot(7)
L1657 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local cnt_arty = actor:belt_count()
L1658 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local cnt_arty_slot = outfit and outfit:cast_CustomOutfit():get_artefact_count() or 0
L1662 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local item = i <= cnt_arty and actor:item_on_belt(i-1)
L1697 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local outfit = actor:item_in_slot(7)
L1730 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local helm = actor:item_in_slot(12)
L1758 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:iterate_belt( function(owner, obj)
L1782 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:cast_Actor():conditions():BoosterForEach( function(booster_type, booster_time, booster_value)
L1815 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local power = actor:cast_Actor():conditions():V_SatietyPower() --db.actor.satiety
L1831 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local satiety = actor:cast_Actor():conditions():GetSatiety()
L2117 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
local clsid = obj:clsid()
L2394 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
tot_weight = tot_weight + obj:weight()
L3069 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
local sec = obj:section()
L3070 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
local cond = obj:condition()
L3098 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
inventory_upgrades.effect_repair_item( obj:section(), obj:condition())
L3098 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
inventory_upgrades.effect_repair_item( obj:section(), obj:condition())
L3099 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
obj:set_condition(0.99999)
L2459 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = char_ini:r_line(known_info,i,"","")

ui_options.script

L1145 🟢 uncached_globals_summary
Cache 1 globals in curr_crosshair_clr
Impact: medium
Show code
L1150: tonumber L1152: tonumber
L1398 🟢 uncached_globals_summary
Cache 1 globals in Reset_opt
Impact: medium
Show code
L1404: unpack L1453: unpack
L2433 🟢 uncached_globals_summary
Cache 1 globals in On_Accept
Impact: medium
Show code
L2450: unpack L2452: unpack
L59 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L1054 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("- Changed player name from (%s) to (%s)", curr_name, new_name)
L1241 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!Found nil option value [%s]", id)
L68 🔴 global_write
Global write: options
Impact: low
Show code
options = {}
L83 🔴 global_write
Global write: options
Impact: low
Show code
options = {
L43 🟡 unused_local_variable
Local variable 'm_ceil' is assigned but never used
Impact: low
Show code
local m_floor, m_ceil, s_find, s_gsub = math.floor, math.ceil, string.find, string.gsub
L49 🟡 unused_local_variable
Local variable 'clr_g2' is assigned but never used
Impact: low
Show code
local clr_g2 = GetARGB(255, 200, 200, 200)
L50 🟡 unused_local_variable
Local variable 'clr_w' is assigned but never used
Impact: low
Show code
local clr_w = GetARGB(255, 255, 255, 255)
L2562 🟡 unused_local_variable
Local variable 'bind' is assigned but never used
Impact: low
Show code
local bind = dik_to_bind(dik)

utils_ui.script

L1138 🟢 table_insert_append
table.insert(self.childs, v) -> self.childs[#self.childs+1] = v
Impact: high
Show code
table.insert(self.childs, IsItem("ammo",sec) or 1)
L2253 🟢 uncached_globals_summary
Cache 1 globals in Reset
Impact: medium
Show code
L2257: pairs L2260: pairs
L2611 🟢 uncached_globals_summary
Cache 1 globals in Update
Impact: medium
Show code
L2750: math.ceil L2770: math.ceil
L1663 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR UICellContainer:RemoveItemManual | can't get game object for [%s]", sec)
L1820 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR UICellContainer:FindSimilar | no data recieved!")
L257 🔴 global_write
Global write: stats_table
Impact: low
Show code
stats_table = {}
L1187 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
self.section = obj and obj:section()
L122 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, kind, order = ini_sys:r_line_ex("item_kind_order",i,"","")
L2685 🟡 unused_local_variable
Local variable 'cls' is assigned but never used
Impact: low
Show code
local cls = obj:clsid()

utils_ui_icon_rotation_fix_mcm.script

L214 🟢 repeated_device
device called 4x in Add_Upgrade
Impact: low
Show code
local dev = device()

G.A.M.M.A. Unjam Reload on the same key

2 files (🟢5 🟡19 🔴19 🔵1)

arti_jamming.script

L316 🟢 repeated_gun_id()
gun:id() called 3x in actor_on_update
Impact: low
Show code
Cache gun:id() result
L323 🟢 repeated_gun_section()
gun:section() called 5x in actor_on_update
Impact: low
Show code
Cache gun:section() result
L391 🟢 repeated_wpn_id()
wpn:id() called 3x in calculate_jam
Impact: low
Show code
Cache wpn:id() result
L725 🟢 repeated_wpn_obj_id()
wpn_obj:id() called 2x in actor_on_weapon_fired
Impact: low
Show code
Cache wpn_obj:id() result
L51 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("arti_jamming | %s | " .. txt, time_global(), ...)
L2 🔴 global_write
Global write: gc
Impact: low
Show code
gc = game.translate_string
L3 🔴 global_write
Global write: math_random
Impact: low
Show code
math_random = math.random
L4 🔴 global_write
Global write: math_floor
Impact: low
Show code
math_floor = math.floor
L36 🔴 global_write
Global write: get_config
Impact: low
Show code
get_config = a_arti_jamming_mcm.get_config
L38 🔴 global_write
Global write: d_flag
Impact: low
Show code
d_flag = false
L157 🔴 global_write
Global write: n
Impact: low
Show code
n = floor(max(n or 1, 1))
L162 🔴 global_write
Global write: n
Impact: low
Show code
n = n - 1
L181 🔴 global_write
Global write: anim_playing
Impact: low
Show code
anim_playing = true
L195 🔴 global_write
Global write: snd_obj
Impact: low
Show code
snd_obj = sound_object(_sound[1])
L232 🔴 global_write
Global write: anim_playing
Impact: low
Show code
anim_playing = false
L238 🔴 global_write
Global write: unjam_motion_mark
Impact: low
Show code
unjam_motion_mark = false
L256 🔴 global_write
Global write: anim_playing
Impact: low
Show code
anim_playing = false
L257 🔴 global_write
Global write: unjam_motion_mark
Impact: low
Show code
unjam_motion_mark = false
L272 🔴 global_write
Global write: unjam_motion_mark
Impact: low
Show code
unjam_motion_mark = true
L469 🔴 global_write
Global write: silencer_status
Impact: low
Show code
silencer_status = wpn:weapon_is_silencer() and 1 or SYS_GetParam(2, wpn:section(), "silencer_status") == 1 and 1 or 0
L470 🔴 global_write
Global write: misfire_prob
Impact: low
Show code
misfire_prob = SYS_GetParam(2, wpn:section(), "misfire_start_prob") or 0
L471 🔴 global_write
Global write: silencer_jam_chance
Impact: low
Show code
silencer_jam_chance = misfire_prob < 0.002 and 1 * silencer_status or misfire_prob * 330 * silencer_status
L956 🔴 global_write
Global write: d_flag
Impact: low
Show code
d_flag = false
L962 🔴 global_write
Global write: d_flag
Impact: low
Show code
d_flag = true
L222 🟡 potential_nil_access
Potential nil access: 'active_item' from :active_item() used without nil check
Impact: low
Show code
if active_item and jammed_guns[active_item:id()] then
L234 🟡 potential_nil_access
Potential nil access: 'active_item' from :active_item() used without nil check
Impact: low
Show code
if id and active_item and id == active_item:id() or unjam_motion_mark then
L270 🟡 potential_nil_access
Potential nil access: 'active_item' from :active_item() used without nil check
Impact: low
Show code
if active_item and jammed_guns[active_item:id()] then
L316 🟡 potential_nil_access
Potential nil access: 'gun' from :active_item() used without nil check
Impact: low
Show code
if gun and gun:id() ~= cgd.id then
L611 🟡 potential_nil_access
Potential nil access: 'obj_wpn' from :active_item() used without nil check
Impact: low
Show code
local id = obj_wpn and obj_wpn:id() or 0
L886 🟡 potential_nil_access
Potential nil access: 'item' from :item_in_slot() used without nil check
Impact: low
Show code
local item_id = item and item:id() or 0
L968 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if wpn and jammed_guns[wpn:id()] then
L983 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
jammed_guns[wpn:id()] = 4
L984 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
print_dbg("Logged id %s, sec %s", wpn:id(), wpn:section())
L984 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
print_dbg("Logged id %s, sec %s", wpn:id(), wpn:section())
L644 🟢 dead_code_if_false
Dead code: if false (lines 644-651)
Impact: low
Show code
if false then--math.random(100) < misfire_chance / 3 then
L23 🟡 unused_local_variable
Local variable 'DAMAGE_THRESHOLD' is assigned but never used
Impact: low
Show code
local DAMAGE_THRESHOLD = 90
L25 🟡 unused_local_variable
Local variable 'REPLACE_THRESHOLD' is assigned but never used
Impact: low
Show code
local REPLACE_THRESHOLD = 0
L32 🟡 unused_local_variable
Local variable 'SALE_PART_MIN' is assigned but never used
Impact: low
Show code
local SALE_PART_MIN = 51
L533 🟡 unused_local_variable
Local variable 'heat_per_shot' is assigned but never used
Impact: low
Show code
local heat_per_shot = 10
L1095 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, sec, value = ini_overheat:r_line("custom_overheat" , i , "", "")

jam_animations.script

L25 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
local hudSection = SYS_GetParam(0, item:section(), "hud", item:section())
L25 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
local hudSection = SYS_GetParam(0, item:section(), "hud", item:section())
L30 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
local ammo = item:get_ammo_in_magazine()
L42 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
item:play_hud_motion(animName, true, 4, 1, 0)

G.A.M.M.A. Vehicles in Darkscape

1 file (🟢2 🟡0 🔴12 🔵0)

grok_vehicles_spawner.script

L48 🟢 uncached_globals_summary
Cache 1 globals in actor_on_first_update
Impact: medium
Show code
L50: pairs L57: pairs
L51 🟢 repeated_alife
alife called 4x in actor_on_first_update
Impact: low
Show code
local sim = alife()
L2 🔴 global_write
Global write: vtbl_darkscape
Impact: low
Show code
vtbl_darkscape = {
L16 🔴 global_write
Global write: vtbl_zaton
Impact: low
Show code
vtbl_zaton = {
L26 🔴 global_write
Global write: vtbl_jupiter
Impact: low
Show code
vtbl_jupiter = {
L38 🔴 global_write
Global write: vtbl_cnpp
Impact: low
Show code
vtbl_cnpp = {
L53 🔴 global_write
Global write: grok_vehicle_spawned
Impact: low
Show code
grok_vehicle_spawned = true
L60 🔴 global_write
Global write: grok_vehicle_spawned_zaton
Impact: low
Show code
grok_vehicle_spawned_zaton = true
L67 🔴 global_write
Global write: grok_vehicle_spawned_jupiter
Impact: low
Show code
grok_vehicle_spawned_jupiter = true
L74 🔴 global_write
Global write: grok_vehicle_spawned_cnpp
Impact: low
Show code
grok_vehicle_spawned_cnpp = true
L86 🔴 global_write
Global write: grok_vehicle_spawned
Impact: low
Show code
grok_vehicle_spawned = m_data.grok_vehicle_spawned
L87 🔴 global_write
Global write: grok_vehicle_spawned_zaton
Impact: low
Show code
grok_vehicle_spawned_zaton = m_data.grok_vehicle_spawned_zaton
L88 🔴 global_write
Global write: grok_vehicle_spawned_jupiter
Impact: low
Show code
grok_vehicle_spawned_jupiter = m_data.grok_vehicle_spawned_jupiter
L89 🔴 global_write
Global write: grok_vehicle_spawned_cnpp
Impact: low
Show code
grok_vehicle_spawned_cnpp = m_data.grok_vehicle_spawned_cnpp

G.A.M.M.A. Vices are free

2 files (🟢13 🟡21 🔴2 🔵28)

bind_awr.script

L251 🟢 table_insert_append
table.insert(angles_t[k], v) -> angles_t[k][#angles_t[k]+1] = v
Impact: high
Show code
angles_t[k] = {}
L289 🟢 uncached_globals_summary
Cache 1 globals in full_access
Impact: medium
Show code
L294: string.format L295: string.format
L422 🟢 uncached_globals_summary
Cache 2 globals in table_to_string
Impact: medium
Show code
L432: type L434: type L435: tostring L447: tostring
L61 🟢 repeated_npc_section()
npc:section() called 3x in OnDeath
Impact: low
Show code
Cache npc:section() result
L417 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
local txt = header and ("-- " .. tostring(header) .. "\n{\n\n") or "{\n\n"
L441 🟡 string_concat_in_loop
String concat in loop: txt = txt .. x
Impact: critical
Show code
key = "[\""..tostring(k) .. "\"]"
L164 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/ Registered vice [%s] = %s", name, i)
L172 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/ Registered vice lamp [%s] = %s", name, i)
L402 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
return tostring(p[i])
L482 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
txt = txt .. "\n}"
L153 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local s_obj = sim:object(i)
L218 🟡 potential_nil_access
Potential nil access: 'alife' from alife() used without nil check
Impact: low
Show code
local se_actor = alife:actor()
L277 🟡 potential_nil_access
Potential nil access: 'lamp' from level.object_by_id() used without nil check
Impact: low
Show code
if lamp then
L10 🟡 unused_local_variable
Local variable 'settings_list' is assigned but never used
Impact: low
Show code
local settings_list = {}

xr_conditions.script

L2183 🟢 table_insert_append
table.insert(reachable_theme, v) -> reachable_theme[#reachable_theme+1] = v
Impact: high
Show code
table.insert(reachable_theme,k)
L2423 🟢 table_insert_append
table.insert(hint_table, v) -> hint_table[#hint_table+1] = v
Impact: high
Show code
table.insert(hint_table, "st_upgr_toolkit_1")
L2428 🟢 table_insert_append
table.insert(hint_table, v) -> hint_table[#hint_table+1] = v
Impact: high
Show code
table.insert(hint_table, "st_upgr_toolkit_2")
L2433 🟢 table_insert_append
table.insert(hint_table, v) -> hint_table[#hint_table+1] = v
Impact: high
Show code
table.insert(hint_table, "st_upgr_toolkit_3")
L2443 🟢 table_insert_append
table.insert(hint_table, v) -> hint_table[#hint_table+1] = v
Impact: high
Show code
table.insert(hint_table, "st_upgr_vodka")
L2445 🟢 table_insert_append
table.insert(hint_table, v) -> hint_table[#hint_table+1] = v
Impact: high
Show code
table.insert(hint_table, "st_upgr_vodka")
L2154 🟢 uncached_globals_summary
Cache 1 globals in jup_b221_who_will_start
Impact: medium
Show code
L2182: tostring L2184: tostring
L2651 🟢 uncached_globals_summary
Cache 1 globals in job_on_point
Impact: medium
Show code
L2666: tonumber L2677: tonumber
L985 🟢 repeated_npc_id()
npc:id() called 3x in deadly_hit
Impact: low
Show code
Cache npc:id() result
L361 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("couldnt find talking npc")
L724 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong parameter in 'dist_to_actor_le' function!!!")
L732 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong parameter in 'dist_to_actor_ge' function!!!")
L908 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong number of params in npc_community")
L928 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong number of params in npc_rank")
L939 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong number of params in npc_profile")
L1374 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Not enough arguments in 'is_squad_enemy_to_actor' funciton!")
L1434 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
if detector_section == nil then printf("Wrong parameters in function 'actor_active_detector'") end
L1562 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Insufficient params in squad_in_zone function. story_id[%s], zone_name[%s]", tostring(story_id), tostring(zone_name))
L1596 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Insufficient params in squad_has_enemy function. story_id [%s]", tostring(story_id))
L1621 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Insufficient params in squad_in_zone_all function. story_id[%s], zone_name[%s]", tostring(story_id), tostring(zone_name))
L1699 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong parameters")
L1721 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong parameters")
L1731 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("Wrong parameter story_id[%s] in squad_exist function", tostring(story_id))
L1749 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("~ERROR squad_name_exist | section [%s] doesn't exist in system_ini", tostring(story_id))
L1758 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~WARNING squad_name_exist | cant' get smart obeject [%s]", smart_name)
L1790 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong parameter squad_id[%s] in 'squad_npc_count_ge' function", tostring(squad_id))
L1829 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Signal rocket name is not set!")
L1834 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("No such signal rocket: [%s] on level", tostring(p[1]))
L1841 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("wrong story id")
L1940 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
if (p and p[1]) == nil then printf("Wrong parameters in function 'check_bloodsucker_state'!!!") end
L2184 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("jup_b221_who_will_start: table reachable_theme ------------------------------> [%s]", tostring(k))
L2188 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("No such parameters in function 'jup_b221_who_will_start'")
L2196 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong parameters in function 'jup_b221_who_will_start'")
L1779 🔴 global_write
Global write: npc_id
Impact: low
Show code
npc_id = npc.id
L1781 🔴 global_write
Global write: npc_id
Impact: low
Show code
npc_id = npc:id()
L1020 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = id and sim:object(id)
L1035 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = id and sim:object(id)
L1070 🟡 potential_nil_access
Potential nil access: 'npc1' from :object() used without nil check
Impact: low
Show code
if npc1 and IsStalker( npc1 ) and npc1:alive( ) then
L1241 🟡 potential_nil_access
Potential nil access: 'be' from :best_enemy() used without nil check (auto-fixable)
Impact: low
Show code
return be and be:alive() or false
L1246 🟡 potential_nil_access
Potential nil access: 'best_enemy' from :best_enemy() used without nil check (auto-fixable)
Impact: low
Show code
return db.actor and best_enemy ~= nil and best_enemy:id() == AC_ID
L1520 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = p[1] and npc and (type(npc.id) == "function" and sim:object(npc:id()) or npc)
L1526 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
if (sim:level_name(gg:vertex(se_obj.m_game_vertex_id):level_id()) == p[1]) then
L1584 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = k.id and sim:object(k.id)
L1635 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = k.object or k.id and sim:object(k.id)
L2221 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = k.object or k.id and sim:object(k.id)
L2254 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = k.object or k.id and sim:object(k.id)
L2558 🟡 potential_nil_access
Potential nil access: 'mgun' from :get_car() used without nil check (auto-fixable)
Impact: low
Show code
return mgun:IsObjectVisible(actor)
L1568 🟡 unused_local_variable
Local variable 'sim_board' is assigned but never used
Impact: low
Show code
local sim_board = SIMBOARD
L1605 🟡 unused_local_variable
Local variable 'obj_by_id' is assigned but never used
Impact: low
Show code
local obj_by_id = level.object_by_id
L1672 🟡 unused_local_variable
Local variable 'al' is assigned but never used
Impact: low
Show code
local al = alife()

G.A.M.M.A. Voiced Actor

2 files (🟢6 🟡1 🔴28 🔵0)

AGDD_voiced_actor.script

L184 🟢 uncached_globals_summary
Cache 1 globals in monster_on_death_callback
Impact: medium
Show code
L195: math.random L196: math.random
L207 🟢 uncached_globals_summary
Cache 1 globals in npc_on_death_callback
Impact: medium
Show code
L219: math.random L221: math.random
L257 🟢 uncached_globals_summary
Cache 1 globals in actor_on_update
Impact: medium
Show code
L316: math.random L319: math.random
L346 🟢 uncached_globals_summary
Cache 1 globals in actor_on_before_hit
Impact: medium
Show code
L360: math.random L362: math.random
L426 🟢 uncached_globals_summary
Cache 1 globals in on_key_release
Impact: medium
Show code
L438: string.find L438: string.find
L62 🔴 global_write
Global write: lang
Impact: low
Show code
lang = "_eng"
L64 🔴 global_write
Global write: lang
Impact: low
Show code
lang = ""
L68 🔴 global_write
Global write: muffle
Impact: low
Show code
muffle = "" -- initiates muffling condition
L73 🔴 global_write
Global write: muffle
Impact: low
Show code
muffle = ""
L75 🔴 global_write
Global write: muffle
Impact: low
Show code
muffle = ""
L96 🔴 global_write
Global write: combat_inertia
Impact: low
Show code
combat_inertia = 1
L102 🔴 global_write
Global write: combat_inertia
Impact: low
Show code
combat_inertia = time_global() + 10000 --sets the delay of ten seconds to ensure that combat status doesn't drop in case enemies stop targeting the actor for a short time
L164 🔴 global_write
Global write: combat_intensity
Impact: low
Show code
combat_intensity = 0 --main value that drives the combat status system
L165 🔴 global_write
Global write: combat_intensity_drain_cooldown
Impact: low
Show code
combat_intensity_drain_cooldown = 0 --auxilary value, prevents combat progression from draining constantly, instead it only drains after nothing combat-related happens for some time
L166 🔴 global_write
Global write: combat_medium_threshold
Impact: low
Show code
combat_medium_threshold = 500 --the threshold at which combat status switches to it's second phase
L167 🔴 global_write
Global write: combat_high_threshold
Impact: low
Show code
combat_high_threshold = 1500 --the threshold at which combat status switches to it's final third phase (combat_intensity value doesn't stop there and can progress even further, but that won't have any changes)
L178 🔴 global_write
Global write: combat_intensity
Impact: low
Show code
combat_intensity = combat_intensity + intensity --adds it
L180 🔴 global_write
Global write: combat_intensity_drain_cooldown
Impact: low
Show code
combat_intensity_drain_cooldown = combat_intensity_drain_cooldown + cooldown --adds the cooldown even if we didn't add intensity
L186 🔴 global_write
Global write: combat_intensity
Impact: low
Show code
combat_intensity = 1
L209 🔴 global_write
Global write: combat_intensity
Impact: low
Show code
combat_intensity = 1
L255 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 0
L256 🔴 global_write
Global write: delay
Impact: low
Show code
delay = 500
L258 🔴 global_write
Global write: tg
Impact: low
Show code
tg = time_global()
L261 🔴 global_write
Global write: grok_delay
Impact: low
Show code
grok_delay = tg + delay
L262 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 1
L266 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 0
L281 🔴 global_write
Global write: combat_intensity
Impact: low
Show code
combat_intensity = combat_intensity - 1
L284 🔴 global_write
Global write: combat_intensity_drain_cooldown
Impact: low
Show code
combat_intensity_drain_cooldown = combat_intensity_drain_cooldown - 2
L287 🔴 global_write
Global write: combat_intensity
Impact: low
Show code
combat_intensity = clamp(combat_intensity,0,combat_high_threshold * 2) --keeps combat intensity value in bounds, it shouldn't go into negatives nor overshoot the max cap
L288 🔴 global_write
Global write: combat_intensity_drain_cooldown
Impact: low
Show code
combat_intensity_drain_cooldown = clamp(combat_intensity_drain_cooldown,0,1000) --same thing but for the cooldown
L118 🟡 unused_local_variable
Local variable 'i' is assigned but never used
Impact: low
Show code
local i,v = next(axr_companions.companion_squads,nil) --gets squad info

ui_addon_companion_quick_menu.script

L6 🟢 uncached_globals_summary
Cache 1 globals in on_key_press
Impact: medium
Show code
L25: math.random L27: math.random
L21 🔴 global_write
Global write: lang
Impact: low
Show code
lang = "_eng"
L23 🔴 global_write
Global write: lang
Impact: low
Show code
lang = ""
L25 🔴 global_write
Global write: chance
Impact: low
Show code
chance = math.random(0,100)

G.A.M.M.A. Weapon Pack

10 files (🟢6 🟡7 🔴29 🔵2)

animation_common.script

L31 🟢 table_insert_append
table.insert(anim_mutators, v) -> anim_mutators[#anim_mutators+1] = v
Impact: high
Show code
table.insert(anim_mutators, {functor=functor, priority=priority})
L88 🟢 repeated_item_section()
item:section() called 3x in actor_on_hud_animation_play
Impact: low
Show code
Cache item:section() result

aol_anim_transitions.script

L6 🟢 table_insert_append
table.insert(valid_anims, v) -> valid_anims[#valid_anims+1] = v
Impact: high
Show code
table.insert(valid_anims, anm_suffix)
L37 🟢 table_insert_append
table.insert(pattern_transitions[hud_section], v) -> pattern_transitions[hud_section][#pattern_transitions[hud_section]+1] = v
Impact: high
Show code
table.insert(pattern_transitions[hud_section], {
L99 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L128 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L15 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L32 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L3 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L10 🔴 global_write
Global write: transitions
Impact: low
Show code
transitions = {
L26 🔴 global_write
Global write: pattern_transitions
Impact: low
Show code
pattern_transitions = {
L162 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L51 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_items:r_line_ex(section,i,"","")

aol_sprint_cancel.script

L16 🔴 global_write
Global write: aol_anim_transitions_anm_transitions
Impact: low
Show code
aol_anim_transitions_anm_transitions = aol_anim_transitions.anm_transitions

close_combat_weapons_launchers.script

L39 🔴 global_write
Global write: n
Impact: low
Show code
n = floor(max(n or 1, 1))
L44 🔴 global_write
Global write: n
Impact: low
Show code
n = n - 1
L78 🟡 potential_nil_access
Potential nil access: 'be' from :best_enemy() used without nil check (auto-fixable)
Impact: low
Show code
range = be and be:position():distance_to_sqr(npc:position())
L31 🟡 unused_local_variable
Local variable 'mr2' is assigned but never used
Impact: low
Show code
local mr2 = melee_range * melee_range

m1a1_autoinject.script

L50 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update

shotgun_unjam_fix.script

L1 🔴 global_write
Global write: common
Impact: low
Show code
common = animation_common

trader_autoinject.script

L43 🟢 repeated_npc_id()
npc:id() called 3x in trade_manager.update
Impact: low
Show code
Cache npc:id() result
L187 🟢 repeated_item_section()
item:section() called 4x in itr_inv
Impact: low
Show code
Cache item:section() result
L16 🔴 global_write
Global write: find
Impact: low
Show code
find = string.find
L41 🔴 global_write
Global write: TraderUpdate
Impact: low
Show code
TraderUpdate = trade_manager.update

uni_anim_detectors.script

L14 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = false
L18 🔴 global_write
Global write: fdda_anim_prepare
Impact: low
Show code
fdda_anim_prepare = enhanced_animations.anim_prepare
L20 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L24 🔴 global_write
Global write: fdda_call_my_slot_back
Impact: low
Show code
fdda_call_my_slot_back = enhanced_animations.call_my_slot_back
L28 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = false
L33 🔴 global_write
Global write: fdda_bp_call_my_slot_back
Impact: low
Show code
fdda_bp_call_my_slot_back = zzz_ea_addon_backpack.call_my_slot_back
L37 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = false
L50 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L63 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L71 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L85 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L98 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L113 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L167 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = false
L122 🟡 potential_nil_access
Potential nil access: 'player_detector' from :active_detector() used without nil check
Impact: low
Show code
if player_detector and item:id() == player_detector:id() then
L160 🟡 potential_nil_access
Potential nil access: 'player_wpn' from :active_item() used without nil check
Impact: low
Show code
player_wpn and is_state_valid[player_wpn:get_state()]

weapon_cover_tilt_gun_trigger_radii.script

L6 🔴 global_write
Global write: weapon_trigger_radii
Impact: low
Show code
weapon_trigger_radii = {

z_parts_inject.script

L1 🔴 global_write
Global write: cached_r_string_ex
Impact: low
Show code
cached_r_string_ex = itms_manager.ini_parts.r_string_ex
L2 🔴 global_write
Global write: parts_custom
Impact: low
Show code
parts_custom = {}
L3 🔴 global_write
Global write: parts_custom_ini
Impact: low
Show code
parts_custom_ini = {

G.A.M.M.A. Wepl Hit Effects Rework

2 files (🟢1 🟡2 🔴2 🔵0)

wepl_hit_effect.script

L33 🟢 uncached_globals_summary
Cache 1 globals in actor_on_before_hit
Impact: medium
Show code
L85: math.random L91: math.random
L148 🔴 global_write
Global write: obj_t
Impact: low
Show code
obj_t = m_data.obj_t or {}
L40 🟡 potential_nil_access
Potential nil access: 'ply' from db.actor() used without nil check
Impact: low
Show code
if not ( ply and ply:alive() ) then return end
L105 🟡 potential_nil_access
Potential nil access: 'ply' from db.actor() used without nil check
Impact: low
Show code
if not ( ply and ply:alive() ) then return end

wepl_hit_effect_mcm.script

L13 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "wepl_hit_effect",sh=true ,gr={

G.A.M.M.A. X10 spawn rebalance

1 file (🟢0 🟡0 🔴1 🔵0)

z_sr_psy_antenna_no_sound_mute.script

L1 🔴 global_write
Global write: update_sound
Impact: low
Show code
update_sound = sr_psy_antenna.PsyAntenna.update_sound

G.A.M.M.A. YACS no quit

1 file (🟢1 🟡0 🔴2 🔵2)

ish_campfire_saving.script

L103 🟢 table_insert_append
table.insert(friendly_bases, v) -> friendly_bases[#friendly_bases+1] = v
Impact: high
Show code
table.insert(friendly_bases, smart)
L227 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("///YACS Save")
L253 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(message)
L19 🔴 global_write
Global write: bonus_bases
Impact: low
Show code
bonus_bases = {}
L23 🔴 global_write
Global write: the_bawses
Impact: low
Show code
the_bawses = {zat_b18_noah = true, m_trader = true, m_lesnik = true}

G.A.M.M.A. ZCP 1.4 Balanced Spawns

14 files (🟢57 🟡91 🔴24 🔵66)

bind_anomaly_field.script

L57 🟢 uncached_globals_summary
Cache 1 globals in ini_settings
Impact: medium
Show code
L84: tonumber L109: tonumber
L425 🟢 uncached_globals_summary
Cache 1 globals in pulse_anomaly_update
Impact: medium
Show code
L445: math.random L450: math.random
L30 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L48 🔴 global_write
Global write: dyn_anomalies
Impact: low
Show code
dyn_anomalies = {} -- [level][id] = name
L517 🔴 global_write
Global write: dyn_anomalies
Impact: low
Show code
dyn_anomalies = m_data.dyn_anomalies or {}
L554 🔴 global_write
Global write: fields_by_names
Impact: low
Show code
fields_by_names = {}

bind_awr.script

L266 🟢 table_insert_append
table.insert(angles_t[k], v) -> angles_t[k][#angles_t[k]+1] = v
Impact: high
Show code
angles_t[k] = {}
L304 🟢 uncached_globals_summary
Cache 1 globals in full_access
Impact: medium
Show code
L309: string.format L310: string.format
L437 🟢 uncached_globals_summary
Cache 2 globals in table_to_string
Impact: medium
Show code
L447: type L449: type L450: tostring L462: tostring
L61 🟢 repeated_npc_section()
npc:section() called 3x in OnDeath
Impact: low
Show code
Cache npc:section() result
L432 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
local txt = header and ("-- " .. tostring(header) .. "\n{\n\n") or "{\n\n"
L456 🟡 string_concat_in_loop
String concat in loop: txt = txt .. x
Impact: critical
Show code
key = "[\""..tostring(k) .. "\"]"
L164 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/ Registered vice [%s] = %s", name, i)
L172 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/ Registered vice lamp [%s] = %s", name, i)
L417 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
return tostring(p[i])
L497 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
txt = txt .. "\n}"
L153 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local s_obj = sim:object(i)
L233 🟡 potential_nil_access
Potential nil access: 'alife' from alife() used without nil check
Impact: low
Show code
local se_actor = alife:actor()
L292 🟡 potential_nil_access
Potential nil access: 'lamp' from level.object_by_id() used without nil check
Impact: low
Show code
if lamp then
L10 🟡 unused_local_variable
Local variable 'settings_list' is assigned but never used
Impact: low
Show code
local settings_list = {}

dph_debug_log.script

L123 🟢 table_insert_append
table.insert(private.modules, v) -> private.modules[#private.modules+1] = v
Impact: high
Show code
table.insert(private.modules, m)
L31 🟢 uncached_globals_summary
Cache 1 globals in new
Impact: medium
Show code
L85: ipairs L94: ipairs
L49 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe(public.format_entry("dph_debug_log/log", LOG_LEVEL_ERROR, "Unable to open logfile %s! Entry logged on the following line.", public.config.file))
L50 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(public.format_entry(mod, level, entry, ...))
L58 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe(ln)
L60 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(ln)
L71 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe(public.format_entry("dph_debug_log/pda", LOG_LEVEL_ERROR, "Could not send message to PDA: Actor does not exist! Entry logged on the following line."))
L72 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(public.format_entry(mod, level, entry, ...))
L139 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe(public.format_entry("dph_debug_log", LOG_LEVEL_ERROR, "Target %s threw an exception while logging <%s> %s", target, mod, entry))
L140 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("ERROR: %s", err)
L141 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(public.format_entry(mod, level, entry, ...))
L16 🔴 global_write
Global write: log_levels
Impact: low
Show code
log_levels = {
L78 🔴 global_write
Global write: m
Impact: low
Show code
m = tostring(mt)
L79 🔴 global_write
Global write: p
Impact: low
Show code
p = tostring(pt)
L137 🟡 unused_local_variable
Local variable 'status' is assigned but never used
Impact: low
Show code
local status, err = pcall(private.targets[target], mod, level, entry, ...)

faction_expansions.script

L128 🟢 uncached_globals_summary
Cache 1 globals in get_section
Impact: medium
Show code
L129: math.random L140: math.random
L8 🔴 global_write
Global write: faction
Impact: low
Show code
faction = {}
L9 🔴 global_write
Global write: level
Impact: low
Show code
level = {}
L10 🔴 global_write
Global write: mutant
Impact: low
Show code
mutant = {}
L11 🔴 global_write
Global write: mutant_tier_by_clsid
Impact: low
Show code
mutant_tier_by_clsid = {
L232 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_fact:r_line_ex("mutant_tier",i,"","")

game_setup.script

L106 🟢 uncached_globals_summary
Cache 1 globals in init_settings
Impact: medium
Show code
L127: tonumber L149: tonumber
L182 🟢 uncached_globals_summary
Cache 1 globals in try_spawn_world_item
Impact: medium
Show code
L203: math.random L229: math.random
L352 🟢 repeated_alife
alife called 3x in freedom_medic_fix
Impact: low
Show code
local sim = alife()
L79 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L319 🟡 potential_nil_access
Potential nil access: 'se' from :object() used without nil check
Impact: low
Show code
if se and (se:name() == 'bar_physic_object_mlr_0002' or se:name() == 'bar_physic_object_mlr_0003') then
L319 🟡 potential_nil_access
Potential nil access: 'se' from :object() used without nil check
Impact: low
Show code
if se and (se:name() == 'bar_physic_object_mlr_0002' or se:name() == 'bar_physic_object_mlr_0003') then
L334 🟡 potential_nil_access
Potential nil access: 'se' from :object() used without nil check
Impact: low
Show code
if se and (se:name() == 'ds_physic_destroyable_object_0046' or se:name() == 'ds_physic_object_0009' or se:name() == 'ds_physic_object_0010' or se:name() == 'ds_physic_object_0002') then
L334 🟡 potential_nil_access
Potential nil access: 'se' from :object() used without nil check
Impact: low
Show code
if se and (se:name() == 'ds_physic_destroyable_object_0046' or se:name() == 'ds_physic_object_0009' or se:name() == 'ds_physic_object_0010' or se:name() == 'ds_physic_object_0002') then
L334 🟡 potential_nil_access
Potential nil access: 'se' from :object() used without nil check
Impact: low
Show code
if se and (se:name() == 'ds_physic_destroyable_object_0046' or se:name() == 'ds_physic_object_0009' or se:name() == 'ds_physic_object_0010' or se:name() == 'ds_physic_object_0002') then
L334 🟡 potential_nil_access
Potential nil access: 'se' from :object() used without nil check
Impact: low
Show code
if se and (se:name() == 'ds_physic_destroyable_object_0046' or se:name() == 'ds_physic_object_0009' or se:name() == 'ds_physic_object_0010' or se:name() == 'ds_physic_object_0002') then
L396 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(i)
L426 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(i)

pda.script

L124 🟢 uncached_globals_summary
Cache 1 globals in get_time_elapsed
Impact: medium
Show code
L129: string.format L131: string.format
L139 🟢 uncached_globals_summary
Cache 1 globals in get_stat
Impact: medium
Show code
L143: tostring L145: tostring
L530 🟢 uncached_globals_summary
Cache 1 globals in coc_rankings_set_hint
Impact: medium
Show code
L554: tostring L557: tostring
L464 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("- get_coc_ranking_list | id [%s] = %s", i , coc_ranking_list[i])
L4 🔴 global_write
Global write: dialog_closed
Impact: low
Show code
dialog_closed = true
L96 🔴 global_write
Global write: dialog_closed
Impact: low
Show code
dialog_closed = false
L119 🔴 global_write
Global write: dialog_closed
Impact: low
Show code
dialog_closed = true
L474 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
t[0] = sim:actor():rank()
L478 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(i)
L479 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if (se_obj and IsStalker(nil,se_obj:clsid()) and se_obj:alive() and se_obj:community() ~= "zombied" and se_obj:community() ~= "trader") then
L479 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if (se_obj and IsStalker(nil,se_obj:clsid()) and se_obj:alive() and se_obj:community() ~= "zombied" and se_obj:community() ~= "trader") then
L479 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if (se_obj and IsStalker(nil,se_obj:clsid()) and se_obj:alive() and se_obj:community() ~= "zombied" and se_obj:community() ~= "trader") then
L479 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if (se_obj and IsStalker(nil,se_obj:clsid()) and se_obj:alive() and se_obj:community() ~= "zombied" and se_obj:community() ~= "trader") then
L483 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
t[se_obj.id] = se_obj:rank()
L617 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local icon = ini_sys:r_string_ex(outfit:section(),"character_portrait")
L655 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
if actor:dont_has_info(v.target) then
L659 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
if (db.storage[obj_id].object:position():distance_to(actor:position()) <= n_dist) then

sim_board.script

L91 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Smart already exist in list [%s]", obj:name())
L175 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("create_squad_at_named_location: squad section does not exist in misc\\squad_descr.ltx: %s",squad_id)
L183 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('create_squad_at_named_location: named location not defined in named_locations.ltx: %s',loc_name)
L199 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("str_explode_num: warning: %s couldn't be parsed as number", s)
L314 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("---------------- Welcome To Test Map ----------------")
L371 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("sim_board:fill_start_position incorrect smart by name %s",section)
L154 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = k.object or k.id and sim:object(k.id)
L220 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = k.object or k.id and sim:object(k.id)
L287 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local squad = se_obj.group_id and se_obj.group_id ~= 65535 and sim:object(se_obj.group_id)
L293 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local smart = squad.smart_id and sim:object(squad.smart_id)
L6 🟡 unused_local_variable
Local variable 'tsort' is assigned but never used
Impact: low
Show code
local level,alife,game_graph,math,pairs,tostring,tonumber,tsort,tinsert = level,alife,game_graph,math,pairs,tostring,tonumber,table.sort,table.insert
L6 🟡 unused_local_variable
Local variable 'tinsert' is assigned but never used
Impact: low
Show code
local level,alife,game_graph,math,pairs,tostring,tonumber,tsort,tinsert = level,alife,game_graph,math,pairs,tostring,tonumber,table.sort,table.insert
L282 🟡 unused_local_variable
Local variable 'community_groups' is assigned but never used
Impact: low
Show code
local community_groups = {}

sim_squad_scripted.script

L629 🟢 uncached_globals_summary
Cache 2 globals in create_npc
Impact: medium
Show code
L643: tonumber L645: tonumber L722: math.random L722: math.random
L925 🟢 uncached_globals_summary
Cache 1 globals in STATE_Write
Impact: medium
Show code
L935: tostring L936: tostring
L949 🟢 uncached_globals_summary
Cache 1 globals in STATE_Read
Impact: medium
Show code
L965: tonumber L971: tonumber
L604 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: npc section %s does not exist!",spawn_section)
L610 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("INCORRECT npc_spawn_section USED [%s]. You cannot use npc with custom_data in squads", spawn_section)
L686 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('spawn smart: %s', spawn_smart)
L713 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!!! GETTING RANDOM COUNT FOR "..faction.." | " .. tonumber(warfare_options.options.factions[faction].min_random_squad_count) .. " - " .. tonumber(warfare_options.options.factions[faction].max_random_squad_count) .. " !!!!")
L734 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("You are trying to spawn an empty squad [%s]!!!", settings_id)
L860 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("squad community is 'nil' for player_id [%s]", self.player_id)
L12 🔴 global_write
Global write: dbg_map_hud
Impact: low
Show code
dbg_map_hud = false
L228 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_actor = sim:actor()
L239 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local cur_lvl = sim:level_name(game_graph():vertex(self.m_game_vertex_id):level_id())
L427 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(id)
L499 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local obj = sim:object(member_id)
L619 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local actor = sim:actor()
L620 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
if (simulation_objects.is_on_the_same_level(obj, actor) and spawn_position:distance_to_sqr(actor.position) <= sim:switch_distance()^2) then
L849 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(k.id)
L850 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if se_obj and se_obj:has_detector() then
L1215 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_actor = sim:actor()
L21 🟡 unused_local_variable
Local variable 'a' is assigned but never used
Impact: low
Show code
local a,key,val = locations_ini:r_line_ex(section,0,"","")
L21 🟡 unused_local_variable
Local variable 'val' is assigned but never used
Impact: low
Show code
local a,key,val = locations_ini:r_line_ex(section,0,"","")
L173 🟡 unused_local_variable
Local variable 'itm' is assigned but never used
Impact: low
Show code
local itm = alife_create_item(vv, alife_object(k.id))
L801 🟡 unused_local_variable
Local variable 'planner' is assigned but never used
Impact: low
Show code
local planner = npc:motivation_action_manager()
L1387 🟡 unused_local_variable
Local variable 'smarts_by_no_assault_zones' is assigned but never used
Impact: low
Show code
local smarts_by_no_assault_zones = {

smart_terrain.script

L626 🟢 uncached_globals_summary
Cache 1 globals in select_npc_job
Impact: medium
Show code
L695: pairs L705: pairs
L925 🟢 uncached_globals_summary
Cache 1 globals in STATE_Write
Impact: medium
Show code
L935: pairs L944: pairs
L1121 🟢 uncached_globals_summary
Cache 2 globals in get_smart_props
Impact: medium
Show code
L1123: tostring L1129: tostring L1146: pairs L1162: pairs
L1209 🟢 uncached_globals_summary
Cache 1 globals in check_smart_faction
Impact: medium
Show code
L1211: pairs L1220: pairs
L1597 🟢 uncached_globals_summary
Cache 1 globals in try_respawn
Impact: medium
Show code
L1698: math.random L1714: math.random
L1359 🟢 repeated_npc_id()
npc:id() called 4x in setup_logic
Impact: low
Show code
Cache npc:id() result
L528 🟡 string_concat_in_loop
String concat in loop: path_name = path_name .. x
Impact: critical
Show code
path_name = path_name.."_task"
L1148 🟡 string_concat_in_loop
String concat in loop: props = props .. x
Impact: critical
Show code
props = props.."["..k.."] = "..v.num.."("..(xr_logic.pick_section_from_condlist(db.actor, self,self.respawn_params[k].num) or "0")..")\\n"
L1163 🟡 string_concat_in_loop
String concat in loop: props = props .. x
Impact: critical
Show code
props = props .. tostring(k) .. "\\n"
L1169 🟡 string_concat_in_loop
String concat in loop: props = props .. x
Impact: critical
Show code
props = props .. prop .. " = " .. val .. "\\n"
L199 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR!: smart_terrain: no configuration file defined in spawn ini for %s",self:name())
L210 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: There is no configuration file [%s] in smart_terrain [%s]", filename, self:name())
L217 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! SMART_TERRAIN [%s] has no terrain_mask section in smart_terrain_masks.ltx!!!",self:name())
L276 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s Wrong smart_terrain respawn_params section [%s](there is no section)",self:name(),respawn_params)
L282 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s Wrong smart_terrain respawn_params section [%s](empty params)", self:name(), respawn_params)
L293 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: %s Wrong smatr_terrain respawn_params section [%s] prop [%s](there is no section)",self:name(), respawn_params, prop_name)
L313 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
return printf("fill_npc_info invalid clsid for %s",obj and obj:name())
L318 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
return printf("fill_npc_info invalid stype for %s [clsid=%s]",obj and obj:name(),cls)
L351 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
return printf("register_npc no clsid! %s",obj and obj:name())
L446 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("validate_patrol_path WARNING: %s: invalid game_vertex_id for point %s",path_name,i)
L451 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("validate_patrol_path ERROR: %s: path does not exist",path_name)
L471 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!CRITICAL ERROR: %s does not have a dynamic ltx!",self:name())
L491 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("gulag: ltx=%s no 'active' in section %s", self.ltx_name, section)
L517 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("smart_terrain.load_jobs(): Cannot find path_field in section %s. ini_path=%s",active_section,job.ini_path)
L539 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s:load_jobs() There is no such patrol path %s",self:name(),path_name)
L549 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("There is an exclusive job with wrong smatrcover name [%s] smartterrain [%s]", tostring(smartcover_name), self:name())
L634 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
return printf("%s no npc_info!",self:name())
L640 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
return printf("%s no job table for %s [stype = %s]",self:name(),npc_info.se_obj:name(),npc_info.stype)
L1007 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s:STATE_Read: invalid id in npc_info table. Check for save corruption or error in smart_terrain job system.")
L1355 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s.setup_logic: NPC is nil",self:name())
L1361 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s.setup_logic: npc_info is nil! for id=%s",self:name(),npc:id())
L1366 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s.setup_logic: npc_info.se_obj is nil! for id=%s",self:name(),npc:id())
L1372 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s.setup_logic: npc_info has no job! for id=%s",self:name(),npc:id())
L1385 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[smart_terrain %s] section=%s, don't use section 'nil'!", self:name(), sect)
L1709 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("ERROR: %s Incorrect Respawn Params. respawn_params[%s].num=%s already_spawned[%s]=%s already_spawned[%s].num=%s",self:name(),k,v.num,k,type(self.already_spawned[k]),self.already_spawned[k] and self.already_spawned[k].num)
L11 🔴 global_write
Global write: nearest_to_actor_smart
Impact: low
Show code
nearest_to_actor_smart = {id = nil , dist = math.huge}
L12 🔴 global_write
Global write: dbg_hud
Impact: low
Show code
dbg_hud = false
L137 🔴 global_write
Global write: actor_level
Impact: low
Show code
actor_level = nil
L146 🔴 global_write
Global write: actor_level
Impact: low
Show code
actor_level = actor_level or sim:level_name(gg:vertex(sim:actor().m_game_vertex_id):level_id())
L1786 🔴 global_write
Global write: temp1
Impact: low
Show code
temp1, level_name, temp2 = names_ini:r_line("levels", i, "", "")
L1786 🔴 global_write
Global write: level_name
Impact: low
Show code
temp1, level_name, temp2 = names_ini:r_line("levels", i, "", "")
L1786 🔴 global_write
Global write: temp2
Impact: low
Show code
temp1, level_name, temp2 = names_ini:r_line("levels", i, "", "")
L1790 🔴 global_write
Global write: result
Impact: low
Show code
result, smart_name, value = names_ini:r_line(level_name, i, "", "")
L1790 🔴 global_write
Global write: smart_name
Impact: low
Show code
result, smart_name, value = names_ini:r_line(level_name, i, "", "")
L1790 🔴 global_write
Global write: value
Impact: low
Show code
result, smart_name, value = names_ini:r_line(level_name, i, "", "")
L146 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
actor_level = actor_level or sim:level_name(gg:vertex(sim:actor().m_game_vertex_id):level_id())
L146 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
actor_level = actor_level or sim:level_name(gg:vertex(sim:actor().m_game_vertex_id):level_id())
L147 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local smart_level = sim:level_name(gg:vertex(self.m_game_vertex_id):level_id())
L197 🟡 potential_nil_access
Potential nil access: 'spawn_ini' from :spawn_ini() used without nil check
Impact: low
Show code
local filename = spawn_ini:r_string_ex(smart_sect,"cfg")
L1074 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local sobj = sim:object(id)
L1075 🟡 potential_nil_access
Potential nil access: 'sobj' from :object() used without nil check
Impact: low
Show code
local cls = sobj and sobj:clsid()
L1095 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(id)
L1249 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_actor = sim:actor()
L1398 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local smart = se_obj.m_smart_terrain_id and se_obj.m_smart_terrain_id ~= 65535 and sim:object(se_obj.m_smart_terrain_id)
L1427 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local smart = sim and se_obj.m_smart_terrain_id and se_obj.m_smart_terrain_id ~= 65535 and sim:object(se_obj.m_smart_terrain_id)
L1461 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = k.object or k.id and sim:object(k.id)
L291 🟡 unused_local_variable
Local variable 'prop_condlist' is assigned but never used
Impact: low
Show code
local result, prop_name, prop_condlist = ini:r_line(respawn_params,j,"","")

smr_civil_war.script

L114 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(member.id)
L115 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj2 = sim:object(k.id)
L116 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
smr_debug.get_log().info("civilwar/relations", "setting up squad relations between %s and %s in squad %s", se_obj:section_name(), se_obj2:section_name(), squad:section_name())
L116 🟡 potential_nil_access
Potential nil access: 'se_obj2' from :object() used without nil check (auto-fixable)
Impact: low
Show code
smr_debug.get_log().info("civilwar/relations", "setting up squad relations between %s and %s in squad %s", se_obj:section_name(), se_obj2:section_name(), squad:section_name())
L118 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
se_obj:force_set_goodwill(5000, se_obj2.id)
L119 🟡 potential_nil_access
Potential nil access: 'se_obj2' from :object() used without nil check
Impact: low
Show code
se_obj2:force_set_goodwill(5000, se_obj.id)
L127 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(k.id)
L128 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if (not IsStalker(nil, se_obj:clsid())) then
L129 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
smr_debug.get_log().info("civilwar/relations", "not a stalker: %s in squad %s", se_obj:section_name(), squad:section_name())
L132 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
smr_debug.get_log().info("civilwar/relations", "setting up relations for %s in squad %s", se_obj:section_name(), squad:section_name())
L133 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
se_obj:force_set_goodwill(-5000, sim:object(0))
L133 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
se_obj:force_set_goodwill(-5000, sim:object(0))

smr_loot.script

L422 🟢 table_insert_append
table.insert(useful_tier1, v) -> useful_tier1[#useful_tier1+1] = v
Impact: high
Show code
table.insert(useful_tier1, "device_glowstick_orange")
L423 🟢 table_insert_append
table.insert(useful_tier1, v) -> useful_tier1[#useful_tier1+1] = v
Impact: high
Show code
table.insert(useful_tier1, "device_glowstick_red")
L424 🟢 table_insert_append
table.insert(useful_tier1, v) -> useful_tier1[#useful_tier1+1] = v
Impact: high
Show code
table.insert(useful_tier1, "device_glowstick_blue")
L425 🟢 table_insert_append
table.insert(useful_tier1, v) -> useful_tier1[#useful_tier1+1] = v
Impact: high
Show code
table.insert(useful_tier1, "device_glowstick")
L428 🟢 table_insert_append
table.insert(useful_tier1, v) -> useful_tier1[#useful_tier1+1] = v
Impact: high
Show code
table.insert(useful_tier1, "lockpick")
L429 🟢 table_insert_append
table.insert(useful_tier1, v) -> useful_tier1[#useful_tier1+1] = v
Impact: high
Show code
table.insert(useful_tier1, "bundle_lockpick")
L430 🟢 table_insert_append
table.insert(useful_tier2, v) -> useful_tier2[#useful_tier2+1] = v
Impact: high
Show code
table.insert(useful_tier2, "lockpick_set")
L431 🟢 table_insert_append
table.insert(useful_tier4, v) -> useful_tier4[#useful_tier4+1] = v
Impact: high
Show code
table.insert(useful_tier4, "skeleton_key")
L434 🟢 table_insert_append
table.insert(repair_tier1, v) -> repair_tier1[#repair_tier1+1] = v
Impact: high
Show code
table.insert(repair_tier1, "ramrod_tool")
L435 🟢 table_insert_append
table.insert(repair_tier1, v) -> repair_tier1[#repair_tier1+1] = v
Impact: high
Show code
table.insert(repair_tier1, "rasp_tool")
L436 🟢 table_insert_append
table.insert(repair_tier1, v) -> repair_tier1[#repair_tier1+1] = v
Impact: high
Show code
table.insert(repair_tier1, "sewing_thread")
L437 🟢 table_insert_append
table.insert(repair_tier2, v) -> repair_tier2[#repair_tier2+1] = v
Impact: high
Show code
table.insert(repair_tier2, "heavy_sewing_thread")
L298 🟢 uncached_globals_summary
Cache 1 globals in try_spawn_ammo
Impact: medium
Show code
L299: math.random L301: math.random
L324 🟡 unused_local_variable
Local variable 'f' is assigned but never used
Impact: low
Show code
local f = factor or 1

smr_pop.script

L1007 🟢 table_insert_append
table.insert(unused_mutant_spawn_table[mn[1]], v) -> unused_mutant_spawn_table[mn[1]][#unused_mutant_spawn_table[mn[1]]+1] = v
Impact: high
Show code
table.insert(unused_mutant_spawn_table[mn[1]], v)
L1021 🟢 table_insert_append
table.insert(zombie_spawn_table, v) -> zombie_spawn_table[#zombie_spawn_table+1] = v
Impact: high
Show code
table.insert(zombie_spawn_table, s)
L1027 🟢 table_insert_append
table.insert(zombie_spawn_table, v) -> zombie_spawn_table[#zombie_spawn_table+1] = v
Impact: high
Show code
table.insert(zombie_spawn_table, "simulation_zombie")
L1038 🟢 table_insert_append
table.insert(faction_spawn_table, v) -> faction_spawn_table[#faction_spawn_table+1] = v
Impact: high
Show code
table.insert(faction_spawn_table, n)
L1043 🟢 table_insert_append
table.insert(faction_spawn_table, v) -> faction_spawn_table[#faction_spawn_table+1] = v
Impact: high
Show code
table.insert(faction_spawn_table, "stalker")
L1083 🟢 string_len
string.len(m) -> #m
Impact: low
Show code
if (string.sub(section, 1, string.len(m)) == m) then
L1220 🟢 string_len
string.len("simulation_") -> #"simulation_"
Impact: low
Show code
if (string.sub(orig_spawn, 1, string.len("simulation_")) == "simulation_")
L1312 🟢 string_len
string.len("simulation_") -> #"simulation_"
Impact: low
Show code
if (squad:npc_count() <= 1) and (string.sub(squad:name(), 1, string.len("simulation_")) == "simulation_") then
L10 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L979 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("level %s not found, returning nil", level_name)
L985 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("spawning %s", squad)
L1094 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("ZCP Balanced Mutants enabled")
L1096 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("Level name: %s", level_name)
L1224 🔵 debug_statement
Debug call: trace()
Impact: medium
Show code
trace("calling random mutant spawn")
L1302 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = k.object or k.id and sim:object(k.id)
L1315 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = k.object or k.id and sim:object(k.id)
L1336 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = k.object or k.id and sim:object(k.id)
L1394 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = k.object or k.id and sim:object(k.id)

tasks_fetch.script

L344 🟢 repeated_npc_id()
npc:id() called 3x in <global>
Impact: low
Show code
Cache npc:id() result
L208 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR: fetch_reward_and_remove | no fetch item found!")
L213 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Warning: fetch_reward_and_remove | total_cost is below 50")
L285 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR xr_effects.remove_artefact_item | no var found for %s", p[1])
L464 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR: %s | fetch list [%s] is invalid", p[1], p[2])
L571 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: xr_effects:setup_generic_fetch_task - invalid section %s",sec)
L759 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! WARNING: fetch_list.ltx | wrong section name [%s]", id)
L653 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local item = section and actor:object(section)
L676 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
if actor:object(section .. "_af_aam")
L677 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
or actor:object(section .. "_af_iam")
L678 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
or actor:object(section .. "_af_aac")
L679 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
or actor:object(section .. "_lead_box")
L124 🟡 unused_local_variable
Local variable 'sim' is assigned but never used
Impact: low
Show code
local sim = alife()

ui_mm_faction_select.script

L201 🟢 table_insert_append
table.insert(start_pos, v) -> start_pos[#start_pos+1] = v
Impact: high
Show code
table.insert(start_pos,ini_map:r_float_ex(start_location, "lvid"))
L202 🟢 table_insert_append
table.insert(start_pos, v) -> start_pos[#start_pos+1] = v
Impact: high
Show code
table.insert(start_pos,ini_map:r_float_ex(start_location, "gvid"))
L203 🟢 table_insert_append
table.insert(start_pos, v) -> start_pos[#start_pos+1] = v
Impact: high
Show code
table.insert(start_pos,vector():set(ini_map:r_float_ex(start_location,"x"),ini_map:r_float_ex(start_location,"y"),ini_map:r_float_ex(start_location,"z")))
L1130 🟢 table_insert_append
table.insert(self.table_icon, v) -> self.table_icon[#self.table_icon+1] = v
Impact: high
Show code
table.insert(self.table_icon, def_icon)
L1137 🟢 table_insert_append
table.insert(self.table_icon, v) -> self.table_icon[#self.table_icon+1] = v
Impact: high
Show code
table.insert(self.table_icon, id)
L1151 🟢 table_insert_append
table.insert(self.table_map, v) -> self.table_map[#self.table_map+1] = v
Impact: high
Show code
table.insert(self.table_map, "random_location")
L1161 🟢 table_insert_append
table.insert(self.table_map, v) -> self.table_map[#self.table_map+1] = v
Impact: high
Show code
table.insert(self.table_map, id)
L1164 🟢 table_insert_append
table.insert(self.table_map, v) -> self.table_map[#self.table_map+1] = v
Impact: high
Show code
table.insert(self.table_map, id)
L43 🟢 uncached_globals_summary
Cache 2 globals in on_game_load
Impact: medium
Show code
L57: tostring L57: tostring L57: math.random L57: math.random
L406 🟢 uncached_globals_summary
Cache 2 globals in __init
Impact: medium
Show code
L446: tonumber L457: tonumber L447: tostring L458: tostring
L1180 🟢 uncached_globals_summary
Cache 2 globals in LoadLoadout
Impact: medium
Show code
L1186: tostring L1187: tostring L1198: tonumber L1198: tonumber
L1528 🟡 string_concat_in_loop
String concat in loop: str_stats = str_stats .. x
Impact: critical
Show code
str_stats = str_stats .. "%c[0,150,150,150]• %c[0,50,175,50]" .. game.translate_string("st_faction_" .. k) .. "\\n"
L1688 🟡 string_concat_in_loop
String concat in loop: loadout_str = loadout_str .. x
Impact: critical
Show code
loadout_str = loadout_str .. "," .. ci.section
L1252 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("sec: %s | points: %s | points left: %s", ci.section, points, self.points_left)
L307 🟡 unused_local_variable
Local variable 'sim' is assigned but never used
Impact: low
Show code
local sim = alife()
L1195 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, sec, value = ini_itm:r_line(self.selected_faction .. "_loadout" , i , "", "")
L1618 🟡 unused_local_variable
Local variable 'bind' is assigned but never used
Impact: low
Show code
local bind = dik_to_bind(dik)

GBOOBS_Enhanced_Recoil_Revised

2 files (🟢4 🟡10 🔴10 🔵0)

grok_bo_enhanced_recoil.script

L196 🟢 table_insert_append
table.insert(anims, v) -> anims[#anims+1] = v
Impact: high
Show code
table.insert(anims,{e = i,d = v[2] or math.random(0,1),c = cnt})
L14 🟢 uncached_globals_summary
Cache 1 globals in parse_anims
Impact: medium
Show code
L45: tonumber L59: tonumber
L152 🟢 uncached_globals_summary
Cache 1 globals in shoot_effect
Impact: medium
Show code
L166: math.random L171: math.random
L276 🟢 repeated_wpn_section()
wpn:section() called 5x in shoot_effect
Impact: low
Show code
Cache wpn:section() result
L89 🔴 global_write
Global write: modifier_table
Impact: low
Show code
modifier_table = {
L151 🔴 global_write
Global write: abakan_state
Impact: low
Show code
abakan_state = 0
L290 🔴 global_write
Global write: abakan_state
Impact: low
Show code
abakan_state = 1
L294 🔴 global_write
Global write: abakan_state
Impact: low
Show code
abakan_state = 2
L308 🔴 global_write
Global write: abakan_state
Impact: low
Show code
abakan_state = 0
L385 🔴 global_write
Global write: settings
Impact: low
Show code
settings = load_defaults()
L388 🔴 global_write
Global write: settings
Impact: low
Show code
settings = load_defaults()
L204 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
wpn:iterate_installed_upgrades( function(upgr_sec)
L260 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
local c = wpn:condition()
L276 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
wpn:section():find("abakan")
L277 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
or wpn:section():find("an_94")
L278 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
or wpn:section():find("an94")
L281 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
and (wpn:cast_Weapon():GetAmmoElapsed() > 1 or abakan_state == 1)
L283 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
and wpn:cast_Weapon():GetFireMode() ~= 1
L285 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
and (SYS_GetParam(1, wpn:section(), "cycle_down") or wpn:cast_Weapon():GetFireMode() == 2)
L285 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
and (SYS_GetParam(1, wpn:section(), "cycle_down") or wpn:cast_Weapon():GetFireMode() == 2)
L305 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
local timer = 1 / (SYS_GetParam(2, wpn:section(), "rpm") / 60) + 0.001

grok_bo_enhanced_recoil_mcm.script

L1 🔴 global_write
Global write: op_id
Impact: low
Show code
op_id = "demonized_grok_bo_enhanced_recoil"
L2 🔴 global_write
Global write: op_preset_id
Impact: low
Show code
op_preset_id = "presets"
L4 🔴 global_write
Global write: op
Impact: low
Show code
op = {

G_FLAT's Indirect Parts Favoriter

1 file (🟢13 🟡0 🔴0 🔵0)

indirect_parts_favoriter.script

L75 🟢 table_insert_append
table.insert(context_str, v) -> context_str[#context_str+1] = v
Impact: high
Show code
table.insert(context_str, name_and_cond(k, v, t, 1))
L76 🟢 table_insert_append
table.insert(context_action, v) -> context_action[#context_action+1] = v
Impact: high
Show code
table.insert(context_action, "favorite_part")
L77 🟢 table_insert_append
table.insert(context_params, v) -> context_params[#context_params+1] = v
Impact: high
Show code
table.insert(context_params, {obj:id(), k, 1})
L86 🟢 table_insert_append
table.insert(context_str, v) -> context_str[#context_str+1] = v
Impact: high
Show code
table.insert(context_str, "")
L87 🟢 table_insert_append
table.insert(context_action, v) -> context_action[#context_action+1] = v
Impact: high
Show code
table.insert(context_action, "favorite_part")
L88 🟢 table_insert_append
table.insert(context_params, v) -> context_params[#context_params+1] = v
Impact: high
Show code
table.insert(context_params, {obj:id(), nil, 0})
L93 🟢 table_insert_append
table.insert(context_str, v) -> context_str[#context_str+1] = v
Impact: high
Show code
table.insert(context_str, name_and_cond(nil, nil, t, 2))
L94 🟢 table_insert_append
table.insert(context_action, v) -> context_action[#context_action+1] = v
Impact: high
Show code
table.insert(context_action, "favorite_part")
L95 🟢 table_insert_append
table.insert(context_params, v) -> context_params[#context_params+1] = v
Impact: high
Show code
table.insert(context_params, {obj:id(), nil, 2})
L100 🟢 table_insert_append
table.insert(context_str, v) -> context_str[#context_str+1] = v
Impact: high
Show code
table.insert(context_str, name_and_cond(nil, nil, t, 3))
L101 🟢 table_insert_append
table.insert(context_action, v) -> context_action[#context_action+1] = v
Impact: high
Show code
table.insert(context_action, "favorite_part")
L102 🟢 table_insert_append
table.insert(context_params, v) -> context_params[#context_params+1] = v
Impact: high
Show code
table.insert(context_params, {obj:id(), nil, 3})
L77 🟢 repeated_obj_id()
obj:id() called 4x in init_favorite_parts_menu
Impact: low
Show code
Cache obj:id() result

G_FLAT's Individualy Recruitable Companions

1 file (🟢0 🟡2 🔴0 🔵0)

modxml_individually_recruitable_companions.script

L9 🟡 unused_local_variable
Local variable 'res1' is assigned but never used
Impact: low
Show code
local res1 = dialog_list:add("friendly_companion_dialog_individually")
L12 🟡 unused_local_variable
Local variable 'res2' is assigned but never used
Impact: low
Show code
local res2 = dialog_list:add("paid_companion_dialog_individually")

G_FLAT's More Measurement Task Maps

1 file (🟢0 🟡0 🔴1 🔵0)

more_measurement_task_maps_mcm.script

L2 🔴 global_write
Global write: options
Impact: low
Show code
options = {

G_FLAT's Msv Above Radiation Icon

1 file (🟢0 🟡0 🔴5 🔵0)

msv_over_radiation_status_mcm.script

L1 🔴 global_write
Global write: icon_msv_requirement
Impact: low
Show code
icon_msv_requirement = 2
L2 🔴 global_write
Global write: faster_refresh_rate
Impact: low
Show code
faster_refresh_rate = true
L65 🔴 global_write
Global write: ch_options
Impact: low
Show code
ch_options = {
L92 🔴 global_write
Global write: icon_msv_requirement
Impact: low
Show code
icon_msv_requirement = ui_mcm.get("rad_status_icon_msv/icon_msv_requirement")
L93 🔴 global_write
Global write: faster_refresh_rate
Impact: low
Show code
faster_refresh_rate = ui_mcm.get("rad_status_icon_msv/faster_refresh_rate")

G_FLAT's Remember Belt Items

2 files (🟢0 🟡1 🔴1 🔵0)

remember_outfit_belt.script

L86 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local outfit_id = outfit and outfit:id()

remember_outfit_belt_mcm.script

L2 🔴 global_write
Global write: options
Impact: low
Show code
options = {

G_FLAT's Unusable Parts Handler

2 files (🟢1 🟡1 🔴1 🔵0)

unusable_parts_handler.script

L83 🟢 uncached_globals_summary
Cache 1 globals in is_unusable_part
Impact: medium
Show code
L89: string.find L93: string.find
L38 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
if obj and IsStalker(obj) and not important_npcs[obj:section()] then

unusable_parts_handler_mcm.script

L2 🔴 global_write
Global write: options
Impact: low
Show code
options = {

G_FLAT's and Grok's Hunting Kit Rework

1 file (🟢2 🟡10 🔴0 🔵2)

ui_mutant_loot.script

L363 🟢 uncached_globals_summary
Cache 1 globals in SetMutantImage
Impact: medium
Show code
L375: tostring L376: tostring
L218 🟢 repeated_obj_id()
obj:id() called 5x in monster_on_actor_use_callback
Impact: low
Show code
Cache obj:id() result
L194 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!ERROR ui_mutant_loot | no game object passed!")
L534 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR ui_mutant_loot | can't retrieve online object of mutant [%s](%s)", self.section, self.id)
L121 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local backpack = actor:item_in_slot(13)
L125 🟡 potential_nil_access
Potential nil access: 'backpack' from :item_in_slot() used without nil check
Impact: low
Show code
if (needs_equipped_hk and (backpack and (backpack:section() == sec_kit_hunt))) or (not needs_equipped_hk and db.actor:object(sec_kit_hunt)) then
L402 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local backpack = actor:item_in_slot(13)
L406 🟡 potential_nil_access
Potential nil access: 'backpack' from :item_in_slot() used without nil check
Impact: low
Show code
if (needs_equipped_hk and (backpack and (backpack:section() == sec_kit_hunt))) or (not needs_equipped_hk and db.actor:object(sec_kit_hunt)) then
L400 🟡 unused_local_variable
Local variable 'sim' is assigned but never used
Impact: low
Show code
local sim = alife()
L115 🟡 unused_local_variable
Local variable 'npc_id' is assigned but never used
Impact: low
Show code
local npc_id = npc and npc:id()
L116 🟡 unused_local_variable
Local variable 'npc_pos' is assigned but never used
Impact: low
Show code
local npc_pos = npc and npc:position()
L117 🟡 unused_local_variable
Local variable 'npc_lvl_id' is assigned but never used
Impact: low
Show code
local npc_lvl_id = npc and npc:level_vertex_id()
L118 🟡 unused_local_variable
Local variable 'npc_game_id' is assigned but never used
Impact: low
Show code
local npc_game_id = npc and npc:game_vertex_id()
L158 🟡 unused_local_variable
Local variable 'uses' is assigned but never used
Impact: low
Show code
local sec_d, uses = utils_item.get_defined_uses(sec)

Geiger_ticks_early

2 files (🟢1 🟡0 🔴1 🔵0)

geiger_tick.script

L7 🟢 uncached_globals_summary
Cache 1 globals in actor_on_first_update
Impact: medium
Show code
L10: string.find L10: string.find

geiger_tick_mcm.script

L11 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "geiger_tick",sh=true ,gr={

Grenades Trajectory mod

1 file (🟢2 🟡0 🔴0 🔵1)

grenade_trajectory.script

L193 🟢 uncached_globals_summary
Cache 1 globals in Update
Impact: medium
Show code
L217: tostring L217: tostring
L564 🟢 uncached_globals_summary
Cache 1 globals in actor_on_first_update
Impact: medium
Show code
L580: tostring L580: tostring
L52 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[GT] " .. fmt, ...)

Grok's & Bert's Casings Falling Sounds

1 file (🟢1 🟡1 🔴15 🔵0)

grok_casings_sounds.script

L150 🟢 uncached_globals_summary
Cache 1 globals in actor_on_weapon_fired
Impact: medium
Show code
L177: math.random L188: math.random
L7 🔴 global_write
Global write: mat_to_sound
Impact: low
Show code
mat_to_sound = {
L24 🔴 global_write
Global write: cal_to_sound
Impact: low
Show code
cal_to_sound = {
L75 🔴 global_write
Global write: time_table
Impact: low
Show code
time_table = {
L110 🔴 global_write
Global write: no_casing_drop
Impact: low
Show code
no_casing_drop = {
L126 🔴 global_write
Global write: mat
Impact: low
Show code
mat = "default"
L133 🔴 global_write
Global write: found_mat
Impact: low
Show code
found_mat = sf(current_material, k)
L140 🔴 global_write
Global write: material_sound
Impact: low
Show code
material_sound = mat_to_sound[current_material]
L142 🔴 global_write
Global write: material_sound
Impact: low
Show code
material_sound = mat_to_sound["default"]
L173 🔴 global_write
Global write: material_sound
Impact: low
Show code
material_sound = mat_to_sound["default"]
L177 🔴 global_write
Global write: rand
Impact: low
Show code
rand = math.random(1,100)
L179 🔴 global_write
Global write: material_sound
Impact: low
Show code
material_sound = "grass"
L181 🔴 global_write
Global write: material_sound
Impact: low
Show code
material_sound = "grass"
L183 🔴 global_write
Global write: material_sound
Impact: low
Show code
material_sound = "dirt"
L193 🔴 global_write
Global write: vol
Impact: low
Show code
vol = math.random(1,6) * 0.1
L202 🔴 global_write
Global write: vol
Impact: low
Show code
vol = math.random(1,6) * 0.1
L5 🟡 unused_local_variable
Local variable 'dte' is assigned but never used
Impact: low
Show code
local dte = demonized_time_events

Grok's and Darkasleif's Armor Exchange

2 files (🟢0 🟡1 🔴79 🔵0)

grok_armor_convert.script

L2 🔴 global_write
Global write: all_light
Impact: low
Show code
all_light = {
L17 🔴 global_write
Global write: all_medium
Impact: low
Show code
all_medium = {
L64 🔴 global_write
Global write: all_sci
Impact: low
Show code
all_sci = {
L83 🔴 global_write
Global write: all_skat
Impact: low
Show code
all_skat = {
L98 🔴 global_write
Global write: all_exolight
Impact: low
Show code
all_exolight = {
L122 🔴 global_write
Global write: all_exo
Impact: low
Show code
all_exo = {
L139 🔴 global_write
Global write: all_noso
Impact: low
Show code
all_noso = {
L154 🔴 global_write
Global write: loner_light
Impact: low
Show code
loner_light = {
L166 🔴 global_write
Global write: loner_medium
Impact: low
Show code
loner_medium = {
L207 🔴 global_write
Global write: loner_sci
Impact: low
Show code
loner_sci = {
L224 🔴 global_write
Global write: loner_exolight
Impact: low
Show code
loner_exolight = {
L247 🔴 global_write
Global write: loner_exo
Impact: low
Show code
loner_exo = {
L270 🔴 global_write
Global write: cs_light
Impact: low
Show code
cs_light = {
L283 🔴 global_write
Global write: cs_medium
Impact: low
Show code
cs_medium = {
L328 🔴 global_write
Global write: cs_sci
Impact: low
Show code
cs_sci = {
L346 🔴 global_write
Global write: cs_skat
Impact: low
Show code
cs_skat = {
L360 🔴 global_write
Global write: cs_exolight
Impact: low
Show code
cs_exolight = {
L382 🔴 global_write
Global write: cs_exo
Impact: low
Show code
cs_exo = {
L402 🔴 global_write
Global write: merc_light
Impact: low
Show code
merc_light = {
L414 🔴 global_write
Global write: merc_medium
Impact: low
Show code
merc_medium = {
L455 🔴 global_write
Global write: merc_sci
Impact: low
Show code
merc_sci = {
L473 🔴 global_write
Global write: merc_skat
Impact: low
Show code
merc_skat = {
L487 🔴 global_write
Global write: merc_exolight
Impact: low
Show code
merc_exolight = {
L507 🔴 global_write
Global write: merc_exo
Impact: low
Show code
merc_exo = {
L523 🔴 global_write
Global write: merc_noso
Impact: low
Show code
merc_noso = {
L538 🔴 global_write
Global write: dolg_medium
Impact: low
Show code
dolg_medium = {
L580 🔴 global_write
Global write: dolg_sci
Impact: low
Show code
dolg_sci = {
L596 🔴 global_write
Global write: dolg_skat
Impact: low
Show code
dolg_skat = {
L608 🔴 global_write
Global write: dolg_exolight
Impact: low
Show code
dolg_exolight = {
L627 🔴 global_write
Global write: dolg_exo
Impact: low
Show code
dolg_exo = {
L643 🔴 global_write
Global write: dolg_noso
Impact: low
Show code
dolg_noso = {
L656 🔴 global_write
Global write: freedom_medium
Impact: low
Show code
freedom_medium = {
L699 🔴 global_write
Global write: freedom_sci
Impact: low
Show code
freedom_sci = {
L717 🔴 global_write
Global write: freedom_skat
Impact: low
Show code
freedom_skat = {
L731 🔴 global_write
Global write: freedom_exolight
Impact: low
Show code
freedom_exolight = {
L753 🔴 global_write
Global write: freedom_exo
Impact: low
Show code
freedom_exo = {
L769 🔴 global_write
Global write: freedom_noso
Impact: low
Show code
freedom_noso = {
L783 🔴 global_write
Global write: army_medium
Impact: low
Show code
army_medium = {
L831 🔴 global_write
Global write: army_skat
Impact: low
Show code
army_skat = {
L845 🔴 global_write
Global write: army_exolight
Impact: low
Show code
army_exolight = {
L868 🔴 global_write
Global write: army_exo
Impact: low
Show code
army_exo = {
L884 🔴 global_write
Global write: army_noso
Impact: low
Show code
army_noso = {
L898 🔴 global_write
Global write: bandit_light
Impact: low
Show code
bandit_light = {
L912 🔴 global_write
Global write: bandit_medium
Impact: low
Show code
bandit_medium = {
L954 🔴 global_write
Global write: bandit_sci
Impact: low
Show code
bandit_sci = {
L971 🔴 global_write
Global write: bandit_skat
Impact: low
Show code
bandit_skat = {
L985 🔴 global_write
Global write: bandit_exolight
Impact: low
Show code
bandit_exolight = {
L1008 🔴 global_write
Global write: bandit_exo
Impact: low
Show code
bandit_exo = {
L1027 🔴 global_write
Global write: renegade_medium
Impact: low
Show code
renegade_medium = {
L1074 🔴 global_write
Global write: renegade_sci
Impact: low
Show code
renegade_sci = {
L1092 🔴 global_write
Global write: renegade_exo
Impact: low
Show code
renegade_exo = {
L1114 🔴 global_write
Global write: mono_medium
Impact: low
Show code
mono_medium = {
L1158 🔴 global_write
Global write: mono_sci
Impact: low
Show code
mono_sci = {
L1175 🔴 global_write
Global write: mono_skat
Impact: low
Show code
mono_skat = {
L1189 🔴 global_write
Global write: mono_exolight
Impact: low
Show code
mono_exolight = {
L1212 🔴 global_write
Global write: mono_exo
Impact: low
Show code
mono_exo = {
L1228 🔴 global_write
Global write: mono_noso
Impact: low
Show code
mono_noso = {
L1245 🔴 global_write
Global write: greh_medium
Impact: low
Show code
greh_medium = {
L1289 🔴 global_write
Global write: greh_exo
Impact: low
Show code
greh_exo = {
L1310 🔴 global_write
Global write: isg_medium
Impact: low
Show code
isg_medium = {
L1353 🔴 global_write
Global write: isg_sci
Impact: low
Show code
isg_sci = {
L1371 🔴 global_write
Global write: isg_skat
Impact: low
Show code
isg_skat = {
L1386 🔴 global_write
Global write: isg_exolight
Impact: low
Show code
isg_exolight = {
L1409 🔴 global_write
Global write: isg_exo
Impact: low
Show code
isg_exo = {
L1425 🔴 global_write
Global write: isg_noso
Impact: low
Show code
isg_noso = {
L1438 🔴 global_write
Global write: ecolog_medium
Impact: low
Show code
ecolog_medium = {
L1484 🔴 global_write
Global write: ecolog_sci
Impact: low
Show code
ecolog_sci = {
L1503 🔴 global_write
Global write: ecolog_exo
Impact: low
Show code
ecolog_exo = {

grok_armor_trade.script

L10 🔴 global_write
Global write: armor_to_remove
Impact: low
Show code
armor_to_remove = nil
L11 🔴 global_write
Global write: to_return
Impact: low
Show code
to_return = nil
L12 🔴 global_write
Global write: condition
Impact: low
Show code
condition = nil
L16 🔴 global_write
Global write: obj
Impact: low
Show code
obj = db.actor:object(k)
L17 🔴 global_write
Global write: condition
Impact: low
Show code
condition = obj:condition()
L18 🔴 global_write
Global write: to_return
Impact: low
Show code
to_return = k
L27 🔴 global_write
Global write: obj
Impact: low
Show code
obj = db.actor:object(sec)
L36 🔴 global_write
Global write: armor_to_remove
Impact: low
Show code
armor_to_remove,reward_condition = actor_has_armor(table)
L36 🔴 global_write
Global write: reward_condition
Impact: low
Show code
armor_to_remove,reward_condition = actor_has_armor(table)
L37 🔴 global_write
Global write: reward_armor
Impact: low
Show code
reward_armor = table["reward"]
L38 🔴 global_write
Global write: trade_cost
Impact: low
Show code
trade_cost = table["cost"]
L17 🟡 potential_nil_access
Potential nil access: 'obj' from :object() used without nil check
Impact: low
Show code
condition = obj:condition()

Immersive_Ambience_Expansion

2 files (🟢7 🟡5 🔴0 🔵12)

ambience_exp_mcm.script

L129 🟢 uncached_globals_summary
Cache 1 globals in random_without_repeat
Impact: medium
Show code
L131: math.random L133: math.random
L183 🟢 uncached_globals_summary
Cache 1 globals in random_position_from_plr
Impact: medium
Show code
L186: math.random L186: math.random
L227 🟢 uncached_globals_summary
Cache 1 globals in actor_on_first_update
Impact: medium
Show code
L229: math.random L232: math.random
L257 🟢 uncached_globals_summary
Cache 1 globals in combat_on_going
Impact: medium
Show code
L258: math.random L260: math.random
L281 🟢 uncached_globals_summary
Cache 1 globals in combat
Impact: medium
Show code
L284: math.random L286: math.random
L303 🟢 uncached_globals_summary
Cache 2 globals in actor_on_update
Impact: medium
Show code
L312: pairs L327: pairs L314: math.random L316: math.random
L113 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("ze table\n%s", utils_data.print_table(a, false, true))
L115 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(a)
L170 🟡 potential_nil_access
Potential nil access: 'player' from db.actor() used without nil check
Impact: low
Show code
if not (player and player:alive()) then return end
L31 🟡 unused_local_variable
Local variable 'base_pos_list' is assigned but never used
Impact: low
Show code
local base_pos_list = {
L67 🟡 unused_local_variable
Local variable 'random_footstep' is assigned but never used
Impact: low
Show code
local random_footstep = {chance = 0.02, sound_list_size = 3}
L71 🟡 unused_local_variable
Local variable 'rain_weather' is assigned but never used
Impact: low
Show code
local rain_weather = {"w_rain1","w_rain3","w_rain2","w_storm1","w_storm2"}

demonized_time_events.script

L23 🟢 uncached_globals_summary
Cache 1 globals in print_table
Impact: medium
Show code
L32: type L34: type
L35 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = function",k)
L38 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s",k,utils_data.vector_to_string(v))
L40 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = userdata", k)
L45 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = true",k)
L47 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = true")
L51 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = false", k)
L53 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = false")
L58 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s", k,v)
L60 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = nil", k,v)
L121 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("refreshing time events")
L202 🟡 unused_local_variable
Local variable 'tg_past' is assigned but never used
Impact: low
Show code
local tg_past = 0

Interaction Dot Marks

18 files (🟢35 🟡38 🔴148 🔵124)

dotmarks_hideout_furniture_mcm.script

L124 🟢 table_insert_append
table.insert(generated_menu, v) -> generated_menu[#generated_menu+1] = v
Impact: high
Show code
table.insert(generated_menu, v)
L132 🟢 uncached_globals_summary
Cache 1 globals in on_game_start
Impact: medium
Show code
L214: string.format L248: string.format
L38 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
if logtext and (ui_hud_dotmarks and ui_hud_dotmarks.debuglogs) then printf(logprefix .. logtext, ...) end
L80 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[%s][dotmarks_hideout_furniture] Suspending DotMarks operation for Hideout Furniture placement mode", time_global())
L83 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[%s][dotmarks_hideout_furniture] Placement mode over, resuming normal DotMarks operation", time_global())
L97 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("dotmarks_hideout_furniture.script is injecting blank functors into dotmarks_main.cfg.scan")
L149 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[%s][dotmarks_on_new_object_scan] Hideout Furniture patch is checking %s", time_global(), nameid(obj))
L286 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[%s][dotmarks_on_setup_pri_interact] Hideout Furniture patch is checking for a custom primary action on %s", time_global(), mark.name)
L289 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("Setting up primary primary interaction as a placeable radio")
L294 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("Setting primary interaction text for placeable light")
L298 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("Setting up primary interaction as a placeable fan")
L302 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("Setting up primary interaction as a placeable bed")
L306 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("Setting up primary interaction as a placeable stove")
L310 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("Setting up primary interaction text for placeable piano")
L314 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("Primary pickup prompt is disabled for HF props")
L319 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("Setting up default interaction text for a static prop")
L322 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("No customization found, returning mark unaltered")
L336 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[%s][dotmarks_on_setup_sec_interact] Hideout Furniture patch is setting up the secondary action for %s", time_global(), mark.name)
L354 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("[%s][dotmarks_on_manual_interact_release] Hideout Furniture patch is checking whether to handle interaction with %s | primary take enabled: %s", time_global(), mark.name, cfg.hf_add_primary_pickup)
L356 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("No special handling for HF stashes")
L359 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("%s has a custom primary interaction functor, executing it now", mark.name)
L362 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("Triggering take animation and notifying HF to pick up %s when complete", mark.name)
L29 🔴 global_write
Global write: placement_mode
Impact: low
Show code
placement_mode = false
L31 🔴 global_write
Global write: resume_delay
Impact: low
Show code
resume_delay = 0.25
L33 🔴 global_write
Global write: delaying
Impact: low
Show code
delaying = false
L73 🔴 global_write
Global write: placement_mode
Impact: low
Show code
placement_mode = placeable_furniture.in_placing_state()
L87 🔴 global_write
Global write: delaying
Impact: low
Show code
delaying = false
L107 🔴 global_write
Global write: mcm_menu_additions
Impact: low
Show code
mcm_menu_additions = {

dotmarks_main.script

L114 🟢 repeated_obj_clsid()
obj:clsid() called 19x in <global>
Impact: low
Show code
Cache obj:clsid() result
L175 🟢 repeated_obj_section()
obj:section() called 27x in <global>
Impact: low
Show code
Cache obj:section() result
L222 🟢 repeated_obj_id()
obj:id() called 20x in <global>
Impact: low
Show code
Cache obj:id() result
L4 🔴 global_write
Global write: script_name
Impact: low
Show code
script_name = "dotmarks_main"
L5 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "1.4.0"
L6 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20250721.1
L76 🔴 global_write
Global write: dotmarks_config_file
Impact: low
Show code
dotmarks_config_file = "scripts\\dotmarks_defaults.ltx"
L82 🔴 global_write
Global write: cfg
Impact: low
Show code
cfg = nil
L1028 🔴 global_write
Global write: r
Impact: low
Show code
if r == "" then r = nil end
L1329 🔴 global_write
Global write: cfg
Impact: low
Show code
cfg = dup_table(base_config)
L1486 🔴 global_write
Global write: fonts
Impact: low
Show code
fonts = {
L77 🟡 unused_local_variable
Local variable 'nameid' is assigned but never used
Impact: low
Show code
local nameid = obj_name_and_id
L1208 🟡 unused_local_variable
Local variable 'recipe_is_known' is assigned but never used
Impact: low
Show code
local recipe_is_known

dotmarks_mcm.script

L434 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr, get_argb_input_element(opt_id))
L439 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr, { id = "divider", type= "line" })
L463 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr,
L472 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr,
L476 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr, get_argb_input_element(argb_id))
L479 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr, { id = "divider", type= "line" })
L510 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr, { id = opt_id, type= "check", val = 1, def = enabled })
L512 🟢 table_insert_append
table.insert(gr, v) -> gr[#gr+1] = v
Impact: high
Show code
table.insert(gr, { id = "divider", type= "line" })
L64 🟢 uncached_globals_summary
Cache 1 globals in valid_mcm_version
Impact: medium
Show code
L69: tonumber L70: tonumber
L73 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
local _ = log and printf("[DotMarks] MCM version string: %s | major %s | minor %s | patch %s | functors exist: %s", MCM_VERSION, maj, min, pat, UI_FUNCTORS)
L76 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
_ = log and printf(pre.." MCM version check: %s", inv and "FAILED" or "Passed")
L21 🔴 global_write
Global write: script_name
Impact: low
Show code
script_name = "dotmarks_mcm"
L22 🔴 global_write
Global write: debuglogs
Impact: low
Show code
debuglogs = false
L37 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = dotmarks_main.script_version or "ersion not found!"
L39 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = tostring(dotmarks_main.release_date) or "date not found! Was ui_hud_dotmarks.script overwritten or disabled?"
L47 🔴 global_write
Global write: color_tokens
Impact: low
Show code
color_tokens = {
L501 🔴 global_write
Global write: tbl
Impact: low
Show code
tbl = {}
L739 🔴 global_write
Global write: color_tokens
Impact: low
Show code
color_tokens = utils_catspaw_text.get_color_tokens() or color_tokens
L747 🔴 global_write
Global write: op
Impact: low
Show code
op = { id = "dotmarks", gr = {
L26 🟡 unused_local_variable
Local variable 'headers' is assigned but never used
Impact: low
Show code
local headers = {}
L32 🟡 unused_local_variable
Local variable 'sfind' is assigned but never used
Impact: low
Show code
local sfind = string.find
L33 🟡 unused_local_variable
Local variable 'ssub' is assigned but never used
Impact: low
Show code
local ssub = string.sub
L35 🟡 unused_local_variable
Local variable 'nocolor_desc' is assigned but never used
Impact: low
Show code
local nocolor_desc = "ui_mcm_dotmarks_header_main_nocolor"
L137 🟡 unused_local_variable
Local variable 'ctrls' is assigned but never used
Impact: low
Show code
local ctrls = {}
L157 🟡 unused_local_variable
Local variable 'argb_ctrl' is assigned but never used
Impact: low
Show code
local argb_ctrl

modxml_maingame_no_item_icons.script

L55 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
local _ = DEV_DEBUG and printf("Processing DXML in %s for %s", xml_file_name, script_name)
L4 🔴 global_write
Global write: script_name
Impact: low
Show code
script_name = "modxml_maingame16_no_item_icons"
L5 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "1.0"
L6 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20250305

modxml_tutorial_hooks.script

L192 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
_ = DEV_DEBUG and printf("Processing DXML functor hooks in %s for %s", xml_file_name, script_name)
L221 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[TutorialMonitor] Began tutorial state %s at %s", tut, time_global())
L235 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[TutorialMonitor] Ended tutorial state %s at %s", tut, time_global())
L4 🔴 global_write
Global write: script_name
Impact: low
Show code
script_name = "modxml_tutorial_hooks"
L5 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "2.0"
L6 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20250410
L99 🔴 global_write
Global write: static_xmlfile
Impact: low
Show code
static_xmlfile = "maingame.xml"
L100 🔴 global_write
Global write: static_xmlnode
Impact: low
Show code
static_xmlnode = "quick_info"
L101 🔴 global_write
Global write: replacements_enabled
Impact: low
Show code
replacements_enabled = true -- killswitch
L102 🔴 global_write
Global write: callbacks_enabled
Impact: low
Show code
callbacks_enabled = true -- killswitch
L103 🔴 global_write
Global write: UIStaticTutorials
Impact: low
Show code
UIStaticTutorials = nil
L104 🔴 global_write
Global write: monitors
Impact: low
Show code
monitors = {}
L105 🔴 global_write
Global write: exceptions
Impact: low
Show code
exceptions = {
L256 🔴 global_write
Global write: UIStaticTutorials
Impact: low
Show code
UIStaticTutorials = xml:InitTextWnd(static_xmlnode, maingameui)

ui_hud_dotmarks.script

L127 🟢 uncached_globals_summary
Cache 1 globals in dump_debug_trace
Impact: medium
Show code
L130: pairs L133: pairs
L2080 🟢 uncached_globals_summary
Cache 1 globals in SetConditionText
Impact: medium
Show code
L2087: string.format L2091: string.format
L2378 🟢 uncached_globals_summary
Cache 1 globals in eleSetCurrentColor
Impact: medium
Show code
L2384: tonumber L2385: tonumber
L3352 🟢 uncached_globals_summary
Cache 1 globals in check_for_dependencies
Impact: medium
Show code
L3404: string.format L3408: string.format
L3589 🟢 uncached_globals_summary
Cache 1 globals in setup_pri_interact_prompt
Impact: medium
Show code
L3609: string.format L3612: string.format
L3643 🟢 uncached_globals_summary
Cache 1 globals in setup_sec_interact_prompt
Impact: medium
Show code
L3698: string.format L3711: string.format
L5234 🟢 uncached_globals_summary
Cache 1 globals in actor_on_update
Impact: medium
Show code
L5238: tostring L5265: tostring
L5599 🟢 uncached_globals_summary
Cache 1 globals in parse_file_data
Impact: medium
Show code
L5601: pairs L5608: pairs
L5754 🟢 uncached_globals_summary
Cache 1 globals in on_option_change
Impact: medium
Show code
L5780: pairs L5783: pairs
L4628 🟢 repeated_obj_section()
obj:section() called 5x in replace_invitem_with_bomb
Impact: low
Show code
Cache obj:section() result
L5801 🟡 string_concat_in_loop
String concat in loop: mcm_path = mcm_path .. x
Impact: critical
Show code
mcm_path = mcm_path .. k
L70 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Interaction Dot Marks %s (rel %s) began initialization at %s", script_version or "(version not found)", release_date or "missing", time_global())
L94 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
return debug_dump and logtext and printf(logprefix .. logtext, ...)
L124 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s [%s][%s] Trace: [%s][%s] %s", logprefix, ts, i, fn, ev, val or "")
L129 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(logprefix.."Dumping runtime metrics for %s", script_name)
L135 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("[%s][%s] [%s][%s] %s", t, i, f, e, v or "")
L251 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
local _ = (not hide) and dump("[%s][%s] Visibility and UI checks for %s | dist %s", mark.id, now, mark.name or mark.tutorial or mark.text, dist)
L296 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
_=dd and dump("Checking whether to show pri interact prompt for %s | targeted %s | in_range %s", mark.name, targeted, in_range)
L407 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
_=dd and dump("Final primary interact state: %s | %s", show_pri, nameid(mark.name, mark.id))
L417 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
_=dd and dump("Secondary interactions disabled via config, hiding UI for %s", mark.name)
L420 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
_=dd and dump("No ammo in weapon, hiding secondary interact")
L423 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
_=dd and dump("No battery or charge in device, hiding secondary interact")
L427 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
_=dd and dump("No items in container, no need to show secondary interact")
L431 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
_=dd and dump("Checking whether to show alt interact prompt for %s | show_pri %s | targeted %s", mark.name, show_pri, targeted)
L439 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
_=dd and dump("[%s][%s] Done with both prompt checks:\n* final state: %s | show_pri %s | show_sec %s | forced %s", time_global(), mark.name, prompts_shown, show_pri, show_sec, forced_on)
L458 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
_=dd and dump("Mark is hidden (%s) clearing texture", hide_reason or "no reason set")
L521 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Condition %s loaded for degraded world item [%s] from loot spot [%s]", cond, nameid(obj), name)
L596 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("[%s][UIHUDMarker:ActiveSwap] for %s: %s", time_global(), self.name or self.tutorial, state)
L1036 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("get_ied_text: mode %s | timer %s | str %s | text %s", cfg.mine_mode, timer, iedstr, iedtext)
L1100 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Suspending marker for %s", mark.name or mark.tutorial)
L1196 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("item_pickup_intercept fired | ret: %s | force: %s", flags and flags.ret_value, flags and flags.force)
L1228 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("flags.ret_value is true, setting to false")
L1242 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("flags.ret_value was false, returning object")
L1661 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("InteractPrompt:on_before_key_press | key %s | bind %s", key, bind)
L1683 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("[InteractPrompt] Passed args:")
L1684 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
for k,v in pairs(args) do dump("|| %s = %s", k, v) end
L2479 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("[%s][InteractPrompt:on_key_hold] Beginning hold of key %s", now, self.args.key)
L2499 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Sending callback dotmarks_on_before_marker_init for %s", nameid(get_mark_name(id), id))
L2872 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Sending callback dotmarks_on_prompt_visibility_change for prompt %s", self.uid)
L2884 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Sending callback dotmarks_on_before_prompt_visibility_change for prompt %s | %s", self.uid, nameid(get_mark_name(self.args.id), self.args.id))
L3069 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("InteractPrompt:CheckForWoundedStalkers found no health items")
L3243 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("current target: %s | L %s | T %s", locked_id or targeted_id, locked_id, targeted_id)
L3527 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Sending callback dotmarks_on_new_object_scan for %s", nameid(obj))
L3630 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Sending callback dotmarks_on_setup_pri_interact for %s", nameid(mark.name, mark.id))
L3665 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Sending callback dotmarks_on_setup_sec_interact for %s | verb_secondary: %s\n"..
L3692 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Setting up unload_and_take_ammo secondary action")
L3709 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Setting up take_and_inspect secondary action for artefact")
L3716 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Setting up plant_bomb secondary action")
L3726 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Setting up help_wounded_stalker secondary action")
L3734 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Setting up pick_up_backpack secondary action")
L3739 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Setting up trigger_autoloot secondary action")
L3747 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Setting up take_all_from_box secondary action")
L3757 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Setting up take_and_read secondary action")
L3767 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Setting up unpack_batteries secondary action")
L3777 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Setting up take_and_use secondary action for tool")
L3786 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Setting up take_and_use secondary action for consumable")
L3800 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Setting up deploy_backpack secondary action")
L3810 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Falling back to generic usage secondary action")
L4020 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Sending dotmarks_on_marker_init for %s", nameid(args.name, id))
L4121 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Sending dotmarks_on_before_marker_init for %s", nameid(args.name, id))
L4166 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("[%s] update_targeted_object: no longer targeting %s", time_global(), nameid(target))
L4176 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("[%s] update_targeted_object: targeted_id is now %s (%s) | method %s", time_global(), targeted_id, target and target:name(), method_txt)
L4263 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("FDDAR found No action with item_pickup tag")
L4268 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("FDDAR has an active body search animation, aborting take")
L4952 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Executing func_pickup for marker %s", mark.name)
L5129 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("State monitor for %s: %s", k, state_monitor(k))
L5213 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("[%s] Hint filter update%s", time_global(), text and (" - text is: "..text) or ", no text")
L5227 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("[Targets] Lookat curr: %s last %s | Pickup curr: %s last %s | Xhair curr: %s last %s", hmm.curr_target, hmm.last_target, hmm.curr_pickup, hmm.last_pickup, hmm.curr_crosshair, hmm.last_crosshair)
L5236 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("")
L5389 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Sending callback dotmarks_on_manual_interact_release | %s | %s | %s", id, nameid(mark and mark.name, id), flags and flags.ret_value)
L5392 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Further handling aborted by callback")
L5398 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("[%s] No completed hold action, item pickup should occur", time_global())
L5457 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("[%s] use key released%s | set at %s | dur held %s | hold time %s", time_global(), action_text, cfg.use_released, dur, time)
L5480 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Actor just took %s, unregistering scanned object", nameid(obj, id))
L5762 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
local _ = log and printf("Debug logging enabled: %s | verbose %s | debug_dump %s | DEV_DEBUG %s", debuglogs, verbose, debug_dump, DEV_DEBUG)
L5770 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
_=log and printf("No previous DotMarks version information found in MCM, setting to current version")
L5776 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
_=log and printf(vtext, last_version, last_release)
L5782 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Existing release %s is older than %s, adding opts to reset table", last_release, rel)
L5784 🔵 debug_statement
Debug call: dump()
Impact: medium
Show code
dump("Will reset opt %s", k)
L5898 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Storing found stash data for %s", nameid(v.name, id))
L4 🔴 global_write
Global write: script_name
Impact: low
Show code
script_name = "ui_hud_dotmarks"
L73 🔴 global_write
Global write: logprefix
Impact: low
Show code
logprefix = "[DotMarks] "
L74 🔴 global_write
Global write: debuglogs
Impact: low
Show code
debuglogs = false
L75 🔴 global_write
Global write: verbose
Impact: low
Show code
verbose = false
L76 🔴 global_write
Global write: debug_dump
Impact: low
Show code
debug_dump = false
L103 🔴 global_write
Global write: debuglogs
Impact: low
Show code
if (debug_en ~= nil) then debuglogs = debug_en end
L104 🔴 global_write
Global write: verbose
Impact: low
Show code
if (verbose_en ~= nil) then verbose = verbose_en end
L105 🔴 global_write
Global write: debug_dump
Impact: low
Show code
if (dump_en ~= nil) then debug_dump = dump_en end
L159 🔴 global_write
Global write: valid_mcm_version
Impact: low
Show code
valid_mcm_version = dotmarks_mcm.valid_mcm_version
L160 🔴 global_write
Global write: targeted_id
Impact: low
Show code
targeted_id, locked_id = nil
L160 🔴 global_write
Global write: locked_id
Impact: low
Show code
targeted_id, locked_id = nil
L161 🔴 global_write
Global write: scanning
Impact: low
Show code
scanning = false
L162 🔴 global_write
Global write: pickup_index
Impact: low
Show code
pickup_index = {}
L163 🔴 global_write
Global write: nearby_pickups
Impact: low
Show code
nearby_pickups = {}
L164 🔴 global_write
Global write: active_anims
Impact: low
Show code
active_anims = {}
L943 🔴 global_write
Global write: eased
Impact: low
Show code
eased = easing.easeOutElastic(cycle)
L1147 🔴 global_write
Global write: scanning
Impact: low
Show code
scanning = false
L1157 🔴 global_write
Global write: scanning
Impact: low
Show code
scanning = true
L2267 🔴 global_write
Global write: cls
Impact: low
Show code
cls = obj and obj:clsid()
L3394 🔴 global_write
Global write: cfg
Impact: low
Show code
cfg = cfg or {}
L3469 🔴 global_write
Global write: scanning
Impact: low
Show code
scanning = true
L3477 🔴 global_write
Global write: scanning
Impact: low
Show code
scanning = false
L3851 🔴 global_write
Global write: locked_id
Impact: low
Show code
locked_id = nil
L3854 🔴 global_write
Global write: targeted_id
Impact: low
Show code
targeted_id = nil
L4208 🔴 global_write
Global write: targeted_id
Impact: low
Show code
targeted_id = cfg.racked_items[id]
L4211 🔴 global_write
Global write: targeted_id
Impact: low
Show code
targeted_id = id
L4219 🔴 global_write
Global write: targeted_id
Impact: low
Show code
targeted_id = nil
L4224 🔴 global_write
Global write: targeted_id
Impact: low
Show code
targeted_id = best_hovered_id()
L4819 🔴 global_write
Global write: se_mag
Impact: low
Show code
se_mag = alife_create_item(mag_data.section, db.actor)
L5061 🔴 global_write
Global write: locked_id
Impact: low
Show code
locked_id = nearby_pickups[ind_new]
L5068 🔴 global_write
Global write: locked_id
Impact: low
Show code
locked_id = nil
L5070 🔴 global_write
Global write: nearby_pickups
Impact: low
Show code
nearby_pickups = {}
L5071 🔴 global_write
Global write: pickup_index
Impact: low
Show code
pickup_index = {}
L5076 🔴 global_write
Global write: actor_moving
Impact: low
Show code
actor_moving = (level.actor_moving_state() > 0)
L5082 🔴 global_write
Global write: actor_moving
Impact: low
Show code
actor_moving = dist > (cfg.actor_move_threshold or 0.1)
L5759 🔴 global_write
Global write: debuglogs
Impact: low
Show code
debuglogs = get_mcm("dotmarks/dmarkadv/debuglogs", debuglogs)
L5760 🔴 global_write
Global write: verbose
Impact: low
Show code
verbose = get_mcm("dotmarks/dmarkadv/verbose", verbose)
L5906 🔴 global_write
Global write: valid_mcm_version
Impact: low
Show code
valid_mcm_version = dotmarks_mcm and dotmarks_mcm.valid_mcm_version
L5914 🔴 global_write
Global write: mags_installed
Impact: low
Show code
mags_installed = (magazines and magazine_binder)
L5945 🔴 global_write
Global write: cfg
Impact: low
Show code
cfg = nil
L5950 🔴 global_write
Global write: cfg
Impact: low
Show code
cfg = nil
L4362 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local se_obj = actor and alife_create("inv_backpack", pos, actor:level_vertex_id(), actor:game_vertex_id())
L4362 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local se_obj = actor and alife_create("inv_backpack", pos, actor:level_vertex_id(), actor:game_vertex_id())
L4642 🟡 potential_nil_access
Potential nil access: 'npc' from level.object_by_id() used without nil check
Impact: low
Show code
if npc and IsStalker(npc) and npc:alive() then
L925 🟡 unused_local_variable
Local variable 'tooclose' is assigned but never used
Impact: low
Show code
local tooclose = mark.last_dist and mark.last_dist < dgr
L1697 🟡 unused_local_variable
Local variable 'pxoff' is assigned but never used
Impact: low
Show code
local pxoff = cfg.pri_use_x_offset
L1699 🟡 unused_local_variable
Local variable 'sxoff' is assigned but never used
Impact: low
Show code
local sxoff = cfg.sec_use_x_offset
L2639 🟡 unused_local_variable
Local variable 'fade_dir' is assigned but never used
Impact: low
Show code
local fade_dir = (alpha_start > alpha_end) and "out" or "in"
L5356 🟡 unused_local_variable
Local variable 'mkey' is assigned but never used
Impact: low
Show code
local mkey =
L5501 🟡 unused_local_variable
Local variable 'was_items' is assigned but never used
Impact: low
Show code
local was_items = mark.has_items
L5808 🟡 unused_local_variable
Local variable 'foo' is assigned but never used
Impact: low
Show code
local foo = ui_mcm.get(mcm_path)

ui_mcm_argb_input.script

L198 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Setting up colorblind control")
L25 🔴 global_write
Global write: script_name
Impact: low
Show code
script_name = "ui_mcm_argb_input"
L26 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "2.1.1"
L27 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20250428

utils_catspaw_common.script

L197 🟢 uncached_globals_summary
Cache 1 globals in to_bool
Impact: medium
Show code
L198: type L200: type
L278 🟢 uncached_globals_summary
Cache 1 globals in get_next_tg_interval
Impact: medium
Show code
L281: tonumber L282: tonumber
L592 🟢 uncached_globals_summary
Cache 1 globals in import_metatable
Impact: medium
Show code
L603: type L612: type
L47 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf((caller.logprefix or logprefix) .. logtext, ...)
L56 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf((caller.logprefix or logprefix) .. (caller.vprefix or vprefix) .. logtext, ...)
L66 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf((raw_prefix or "") .. logtext, ...)
L133 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( "! Modded exes not detected! No extra features available.\n" ..
L139 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(logdiv .. "@ Modded exes %s feature support (GAMMA: %s)", exes_version, using_gamma_modpack)
L141 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s %s (added %s): %s", v.enabled and "-" or "!", v.name, v.ver, v.func())
L143 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(logdiv)
L497 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! ERROR: no INI filename passed to %s.load_file_data%s, cannot continue!", script_name, args.called_by and (" by " ..args.called_by) or "")
L502 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
local function dl(s, ...) return log and printf(s, ...) end
L627 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Loaded %s v%s (rel %s)", script_name, script_version, release_date)
L4 🔴 global_write
Global write: script_name
Impact: low
Show code
script_name = "utils_catspaw_common"
L5 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "1.15"
L6 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20250530
L73 🔴 global_write
Global write: debuglogs
Impact: low
Show code
debuglogs = false
L74 🔴 global_write
Global write: verbose
Impact: low
Show code
verbose = false
L75 🔴 global_write
Global write: logprefix
Impact: low
Show code
logprefix = "[CatsyUtils] " -- gets prefixed, optional
L76 🔴 global_write
Global write: vprefix
Impact: low
Show code
vprefix = "[V] " -- gets added to verbose log entries, optional
L94 🔴 global_write
Global write: debuglogs
Impact: low
Show code
if (debug_en ~= nil) then debuglogs = debug_en end
L95 🔴 global_write
Global write: verbose
Impact: low
Show code
if (verbose_en ~= nil) then verbose = verbose_en end
L101 🔴 global_write
Global write: logdiv
Impact: low
Show code
logdiv = "~ ------------------------------------------------------------------------\n"
L107 🔴 global_write
Global write: engine_features
Impact: low
Show code
engine_features = {
L119 🔴 global_write
Global write: using_gamma_modpack
Impact: low
Show code
using_gamma_modpack = game_version:find("G.A.M.M.A.") and true or false
L121 🔴 global_write
Global write: using_modded_exes
Impact: low
Show code
using_modded_exes = using_gamma_modpack or exes_version and true or false
L245 🔴 global_write
Global write: easing
Impact: low
Show code
easing = {
L401 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
max_weight = max_weight + (outfit and outfit:get_additional_max_weight() or 0)
L404 🟡 potential_nil_access
Potential nil access: 'backpack' from :item_in_slot() used without nil check
Impact: low
Show code
max_weight = max_weight + (backpack and backpack:get_additional_max_weight() or 0)
L572 🟡 unused_local_variable
Local variable 'def_ltx' is assigned but never used
Impact: low
Show code
local def_ltx = def_ini and def_ini:get_sections(true)

utils_catspaw_hudmarks.script

L405 🟢 math_pow_simple
math.pow(dist_prog, 2) -> dist_prog*dist_prog
Impact: high
Show code
dist_coef = math.abs(math.sqrt(math.pow(dist_prog, 2)))
L345 🟢 repeated_se_obj_clsid()
se_obj:clsid() called 3x in get_screen_coords
Impact: low
Show code
Cache se_obj:clsid() result
L465 🟢 repeated_obj_id()
obj:id() called 2x in actor_on_update
Impact: low
Show code
Cache obj:id() result
L281 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[utils_catspaw_hudmarks.fade_by_dist] Fading elements by dist %s:\n"..
L1427 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
local _ = debug_dump and printf("[UIHUDMarker:Update][%s][%s] Killswitch checks passed", self.mark_id, time_global())
L1529 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ ========================================================================")
L1530 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[UIHUDMarker:Update][First update for ID %s]%s", self.mark_id, typedata)
L1531 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
_ = self.custom_argb and printf("Found custom_argb: %s,%s,%s,%s", self.custom_argb.a, self.custom_argb.r, self.custom_argb.g, self.custom_argb.b)
L1532 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("HUD Marker %s (%s) | obj %s - online: %s\n* Level: %s | Dist: %sm%s",
L1535 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ ========================================================================")
L1695 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Loaded %s v%s (rel %s)", script_name, script_version, release_date)
L4 🔴 global_write
Global write: script_name
Impact: low
Show code
script_name = "utils_catspaw_hudmarks"
L5 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "1.3"
L6 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20250717
L54 🔴 global_write
Global write: debug_dump
Impact: low
Show code
debug_dump = false -- flag used to dump one-time detailed info for certain things
L55 🔴 global_write
Global write: debuglogs
Impact: low
Show code
debuglogs = false
L56 🔴 global_write
Global write: verbose
Impact: low
Show code
verbose = false
L57 🔴 global_write
Global write: logprefix
Impact: low
Show code
logprefix = ""
L58 🔴 global_write
Global write: vprefix
Impact: low
Show code
vprefix = ""
L74 🔴 global_write
Global write: debuglogs
Impact: low
Show code
if (debug_en ~= nil) then debuglogs = debug_en end
L75 🔴 global_write
Global write: verbose
Impact: low
Show code
if (verbose_en ~= nil) then verbose = verbose_en end
L76 🔴 global_write
Global write: debug_dump
Impact: low
Show code
if (debug_dump ~= nil) then debug_dump = dump_en end
L118 🔴 global_write
Global write: marker_presets
Impact: low
Show code
marker_presets = {
L465 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
self.current_crosshair = obj and obj:id() or nil
L96 🟡 unused_local_variable
Local variable 'gts' is assigned but never used
Impact: low
Show code
local gts = game.translate_string
L932 🟡 unused_local_variable
Local variable 'preset_args' is assigned but never used
Impact: low
Show code
local preset_args = nil
L1591 🟡 unused_local_variable
Local variable 'szx' is assigned but never used
Impact: low
Show code
local szx, szy = self:ScaleMarkerByDistance()
L1603 🟡 unused_local_variable
Local variable 'd_nhide' is assigned but never used
Impact: low
Show code
local d_nhide = self.d_near_hide_dist or self.near_hide_dist
L1604 🟡 unused_local_variable
Local variable 'd_near' is assigned but never used
Impact: low
Show code
local d_near = self.d_near_fade_dist or self.near_fade_dist
L1605 🟡 unused_local_variable
Local variable 'd_far' is assigned but never used
Impact: low
Show code
local d_far = self.d_far_fade_dist or self.far_fade_dist
L1606 🟡 unused_local_variable
Local variable 'd_fhide' is assigned but never used
Impact: low
Show code
local d_fhide = self.d_far_hide_dist or self.far_hide_dist
L1636 🟡 unused_local_variable
Local variable 'dx' is assigned but never used
Impact: low
Show code
local nx,ny,dx,dy,tw
L1636 🟡 unused_local_variable
Local variable 'dy' is assigned but never used
Impact: low
Show code
local nx,ny,dx,dy,tw

utils_catspaw_mapspots.script

L154 🟢 uncached_globals_summary
Cache 1 globals in get_argb
Impact: medium
Show code
L158: tonumber L159: tonumber
L217 🟢 uncached_globals_summary
Cache 1 globals in get_mapspot_texture_data
Impact: medium
Show code
L267: tonumber L268: tonumber
L279 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Loaded %s v%s (rel %s)", script_name, script_version, release_date)
L4 🔴 global_write
Global write: script_name
Impact: low
Show code
script_name = "utils_catspaw_mapspots"
L5 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "1.1"
L6 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20250406
L35 🔴 global_write
Global write: logprefix
Impact: low
Show code
logprefix = "[Catsy:Mapspots] "
L36 🔴 global_write
Global write: debuglogs
Impact: low
Show code
debuglogs = false
L37 🔴 global_write
Global write: verbose
Impact: low
Show code
verbose = false
L38 🔴 global_write
Global write: vprefix
Impact: low
Show code
vprefix = ""
L54 🔴 global_write
Global write: debuglogs
Impact: low
Show code
if (debug_en ~= nil) then debuglogs = debug_en end
L55 🔴 global_write
Global write: verbose
Impact: low
Show code
if (verbose_en ~= nil) then verbose = verbose_en end
L66 🔴 global_write
Global write: task_mapspot_whitelist
Impact: low
Show code
task_mapspot_whitelist = {
L73 🔴 global_write
Global write: mapspot_data_cache
Impact: low
Show code
mapspot_data_cache = {}
L219 🔴 global_write
Global write: mapspot_data_cache
Impact: low
Show code
mapspot_data_cache = {}

utils_catspaw_taskmonitor.script

L63 🟢 uncached_globals_summary
Cache 1 globals in update_current_task_target
Impact: medium
Show code
L70: tonumber L71: tonumber
L4 🔴 global_write
Global write: script_name
Impact: low
Show code
script_name = "utils_catspaw_taskmonitor"
L5 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "1.0"
L6 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20250324

utils_catspaw_text.script

L221 🟢 uncached_globals_summary
Cache 1 globals in csv_argb_to_tbl
Impact: medium
Show code
L230: tonumber L231: tonumber
L330 🟢 uncached_globals_summary
Cache 2 globals in int_to_rgba
Impact: medium
Show code
L338: bit.band L339: bit.band L338: bit.rshift L339: bit.rshift
L794 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Loaded %s v%s (rel %s)", script_name, script_version, release_date)
L4 🔴 global_write
Global write: script_name
Impact: low
Show code
script_name = "utils_catspaw_text"
L5 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "1.11"
L6 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20250717
L37 🔴 global_write
Global write: debuglogs
Impact: low
Show code
debuglogs = false
L38 🔴 global_write
Global write: verbose
Impact: low
Show code
verbose = false
L39 🔴 global_write
Global write: logprefix
Impact: low
Show code
logprefix = "[CatsyText] "
L40 🔴 global_write
Global write: vprefix
Impact: low
Show code
vprefix = ""
L56 🔴 global_write
Global write: debuglogs
Impact: low
Show code
if (debug_en ~= nil) then debuglogs = debug_en end
L57 🔴 global_write
Global write: verbose
Impact: low
Show code
if (verbose_en ~= nil) then verbose = verbose_en end
L82 🔴 global_write
Global write: tokens_generated
Impact: low
Show code
tokens_generated = false
L296 🔴 global_write
Global write: state_tokens
Impact: low
Show code
state_tokens = {}
L297 🔴 global_write
Global write: state_colors
Impact: low
Show code
state_colors = {
L420 🔴 global_write
Global write: wpo_thresholds
Impact: low
Show code
wpo_thresholds = {
L768 🔴 global_write
Global write: safename
Impact: low
Show code
safename = bestname -- alias for backwards compatibility
L75 🟡 unused_local_variable
Local variable 'sfind' is assigned but never used
Impact: low
Show code
local sfind = string.find
L138 🟡 unused_local_variable
Local variable 'custom_tokens' is assigned but never used
Impact: low
Show code
local custom_tokens = args and args.tokens or {}
L195 🟡 unused_local_variable
Local variable 'nfirst' is assigned but never used
Impact: low
Show code
local nfirst, nlast = get_firstname_lastname(npcname)
L195 🟡 unused_local_variable
Local variable 'nlast' is assigned but never used
Impact: low
Show code
local nfirst, nlast = get_firstname_lastname(npcname)
L686 🟡 unused_local_variable
Local variable 'st_id' is assigned but never used
Impact: low
Show code
local st_id = tostring(id)

z_apm_popup_pickup_dotmarks.script

L29 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
local _ = (DEV_DEBUG or (ui_hud_dotmarks and ui_hud_dotmarks.debuglogs)) and printf("z_apm_popup_pickup_dotmarks is monkeypatching APM to fix duplicate pop-up messages")
L25 🔴 global_write
Global write: timeout
Impact: low
Show code
timeout = 2000
L26 🔴 global_write
Global write: pickups
Impact: low
Show code
pickups = {}

z_fdda_pickup_intercept_dotmarks.script

L19 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
local _ = (DEV_DEBUG or (ui_hud_dotmarks and ui_hud_dotmarks.debuglogs)) and printf("[DotMarks] FDDA Redone detected, patching liz_fdda_redone_item_pickups.actor_on_item_before_pickup")
L31 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
local _ = (DEV_DEBUG or (ui_hud_dotmarks and ui_hud_dotmarks.debuglogs)) and printf("[DotMarks] FDDA detected, patching take_item_anim.actor_on_item_before_pickup")
L13 🔴 global_write
Global write: fddar_oibp
Impact: low
Show code
fddar_oibp = liz_fdda_redone_item_pickup and liz_fdda_redone_item_pickup.actor_on_item_before_pickup
L14 🔴 global_write
Global write: fdda_oibp
Impact: low
Show code
fdda_oibp = take_item_anim and take_item_anim.actor_on_item_before_pickup
L15 🔴 global_write
Global write: patched
Impact: low
Show code
patched = false
L18 🔴 global_write
Global write: patched
Impact: low
Show code
patched = true
L30 🔴 global_write
Global write: patched
Impact: low
Show code
patched = true

z_hf_furniture_types_init_stash_name.script

L44 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
local _ = (DEV_DEBUG or (ui_hud_dotmarks and ui_hud_dotmarks.debuglogs)) and printf("z_hf_furniture_types_init_stash_name is monkeypatching hf_furniture types to give stashes more useful names")

z_ui_inventory_dotmarks.script

L18 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
local _ = log and printf("[%s] Trying to start inventory in %s mode for container %s (%s)", time_global(), mode, obj and obj:name(), obj and obj:id())
L26 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
_ = log and printf("[%s][z_ui_inventory_dotmarks] cfg.block_loot_window is true, blocking access to container %s (%s)", time_global(), obj and obj:name(), obj and obj:id())

zz_autoloot_dotmarks.script

L44 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
local _ = (DEV_DEBUG or (ui_hud_dotmarks and ui_hud_dotmarks.debuglogs)) and printf("zz_autoloot_dotmarks is monkeypatching z_auto_looter")
L39 🔴 global_write
Global write: override_id
Impact: low
Show code
override_id = nil
L40 🔴 global_write
Global write: last_loot_remote
Impact: low
Show code
last_loot_remote = false
L47 🔴 global_write
Global write: last_loot_remote
Impact: low
Show code
last_loot_remote = false
L49 🔴 global_write
Global write: last_loot_remote
Impact: low
Show code
last_loot_remote = true
L51 🔴 global_write
Global write: override_id
Impact: low
Show code
override_id = nil
L69 🔴 global_write
Global write: last_loot_remote
Impact: low
Show code
last_loot_remote = true
L63 🟡 potential_nil_access
Potential nil access: 'target' from level.get_target_obj() used without nil check
Impact: low
Show code
if target and (IsStalker(target) and not target:alive() or IsInvbox(target)) then

zzzz_wounded_heal_anim_dotmarks.script

L26 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
local _ = (DEV_DEBUG or (ui_hud_dotmarks and ui_hud_dotmarks.debuglogs)) and printf("zzzz_wounded_heal_anim_dotmarks is monkeypatching zzz_wounded_heal_anim to allow integration")

Interactive 3D PDA Redux (unofficial update 5)

21 files (🟢37 🟡59 🔴77 🔵7)

pda_inter_gui.script

L934 🟢 table_insert_append
table.insert(small_menu_active, v) -> small_menu_active[#small_menu_active+1] = v
Impact: high
Show code
table.insert(small_menu_active, i)
L1204 🟢 table_insert_append
table.insert(a, v) -> a[#a+1] = v
Impact: high
Show code
table.insert(a, (output == "k" and k) or (output == "v" and v))
L1214 🟢 table_insert_append
table.insert(a, v) -> a[#a+1] = v
Impact: high
Show code
table.insert(a, (by == "k" and k) or (by == "v" and v) or k)
L324 🟢 uncached_globals_summary
Cache 1 globals in on_before_key_press
Impact: medium
Show code
L343: string.sub L347: string.sub
L902 🟡 string_concat_in_loop
String concat in loop: s1 = s1 .. x
Impact: critical
Show code
for i = 1, #t do s1 = s1 .. string.char(t[i]) end
L1232 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L19 🔴 global_write
Global write: xml
Impact: low
Show code
xml = CScriptXmlInit()
L22 🔴 global_write
Global write: actions_to_unbind
Impact: low
Show code
actions_to_unbind = {
L38 🔴 global_write
Global write: keys_ini
Impact: low
Show code
keys_ini = ini_file_ex("plugins\\key_to_DIK.ltx")
L39 🔴 global_write
Global write: last_3d_state
Impact: low
Show code
last_3d_state = false
L40 🔴 global_write
Global write: exc_key_btns
Impact: low
Show code
exc_key_btns = {
L48 🔴 global_write
Global write: pda_max_tasks
Impact: low
Show code
pda_max_tasks = pda_inter_mcm.get_config("task_max_tasks")
L50 🔴 global_write
Global write: pda_open_key
Impact: low
Show code
pda_open_key = pda_inter_mcm.get_config("int_pda_key")
L52 🔴 global_write
Global write: Custom_PDA_debug
Impact: low
Show code
Custom_PDA_debug = pda_inter_mcm.get_config("debugx")
L55 🔴 global_write
Global write: main_menu_btns
Impact: low
Show code
main_menu_btns = 7
L56 🔴 global_write
Global write: task_menu_btns
Impact: low
Show code
task_menu_btns = 10
L97 🔴 global_write
Global write: pda_msg_states
Impact: low
Show code
pda_msg_states = {
L107 🔴 global_write
Global write: pda_notes_t
Impact: low
Show code
pda_notes_t = {}
L110 🔴 global_write
Global write: pdax_level_list
Impact: low
Show code
pdax_level_list = {
L158 🔴 global_write
Global write: pdax_mutant_list
Impact: low
Show code
pdax_mutant_list = {
L180 🔴 global_write
Global write: pdax_artefact_list
Impact: low
Show code
pdax_artefact_list = {
L227 🔴 global_write
Global write: pda_inter_bp
Impact: low
Show code
pda_inter_bp = false
L231 🔴 global_write
Global write: pda_opened
Impact: low
Show code
pda_opened = false -- just in case
L322 🔴 global_write
Global write: M_locked
Impact: low
Show code
M_locked = false
L323 🔴 global_write
Global write: removelet
Impact: low
Show code
removelet = false
L341 🔴 global_write
Global write: removelet
Impact: low
Show code
removelet = false
L361 🔴 global_write
Global write: removelet
Impact: low
Show code
removelet = true
L404 🔴 global_write
Global write: pda_opened
Impact: low
Show code
pda_opened = true
L411 🔴 global_write
Global write: last_3d_state
Impact: low
Show code
last_3d_state = get_console_cmd(1,"g_3d_pda")
L916 🔴 global_write
Global write: pda_inter_bp
Impact: low
Show code
if gt_snake_b1t then pda_inter_bp = true end
L1046 🔴 global_write
Global write: pda_opened
Impact: low
Show code
pda_opened = false
L1244 🔴 global_write
Global write: pda_msg_states
Impact: low
Show code
pda_msg_states = m_data.pda_msg_states or { { state = 0, big_menu = true }, { state = 0, big_menu = true }, { state = 0, big_menu = false }, { state = 0, big_menu = true }, { state = 0, big_menu = false }, { state = 0, big_menu = false }, { state = 0, big_menu = true } }
L1246 🔴 global_write
Global write: pda_notes_t
Impact: low
Show code
pda_notes_t = m_data.pda_notes_t or {}
L1259 🔴 global_write
Global write: pda_opened
Impact: low
Show code
pda_opened = false
L1306 🔴 global_write
Global write: pda_open_key
Impact: low
Show code
pda_open_key = pda_inter_mcm.get_config("int_pda_key")
L1307 🔴 global_write
Global write: pda_max_tasks
Impact: low
Show code
pda_max_tasks = pda_inter_mcm.get_config("task_max_tasks")
L1308 🔴 global_write
Global write: Custom_PDA_debug
Impact: low
Show code
Custom_PDA_debug = pda_inter_mcm.get_config("debugx")
L1312 🔴 global_write
Global write: dik_to_num
Impact: low
Show code
dik_to_num = keys_ini:collect_section(section)
L10 🟡 unused_local_variable
Local variable 'math_random' is assigned but never used
Impact: low
Show code
local math_random = math.random
L11 🟡 unused_local_variable
Local variable 'math_floor' is assigned but never used
Impact: low
Show code
local math_floor = math.floor
L12 🟡 unused_local_variable
Local variable 'math_ceil' is assigned but never used
Impact: low
Show code
local math_ceil = math.ceil
L13 🟡 unused_local_variable
Local variable 'math_min' is assigned but never used
Impact: low
Show code
local math_min = math.min
L14 🟡 unused_local_variable
Local variable 'math_max' is assigned but never used
Impact: low
Show code
local math_max = math.max
L15 🟡 unused_local_variable
Local variable 'string_find' is assigned but never used
Impact: low
Show code
local string_find = string.find
L16 🟡 unused_local_variable
Local variable 'string_format' is assigned but never used
Impact: low
Show code
local string_format = string.format
L17 🟡 unused_local_variable
Local variable 'table_insert' is assigned but never used
Impact: low
Show code
local table_insert = table.insert
L1221 🟡 unused_local_variable
Local variable 'pda_x_upd' is assigned but never used
Impact: low
Show code
local pda_x_upd

pda_inter_gui_a_raid.script

L1 🔴 global_write
Global write: pmain
Impact: low
Show code
pmain = pda_inter_gui

pda_inter_gui_b_info.script

L1 🔴 global_write
Global write: pmain
Impact: low
Show code
pmain = pda_inter_gui
L259 🟡 unused_local_variable
Local variable 'senders_t' is assigned but never used
Impact: low
Show code
local senders_t = pda_inter_x_buyinfo.Find_available_messages

pda_inter_gui_c_games.script

L152 🟢 table_insert_append
table.insert(adj_t, v) -> adj_t[#adj_t+1] = v
Impact: high
Show code
table.insert(adj_t, j)
L969 🟢 uncached_globals_summary
Cache 1 globals in OnPressGamesSudoku
Impact: medium
Show code
L996: tonumber L1003: tonumber
L207 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("slots launch")
L10 🔴 global_write
Global write: pmain
Impact: low
Show code
pmain = pda_inter_gui
L15 🔴 global_write
Global write: games_amount
Impact: low
Show code
games_amount = 5
L17 🔴 global_write
Global write: puzzle_reward
Impact: low
Show code
puzzle_reward = pda_inter_mcm.get_config("puzzle_reward")
L18 🔴 global_write
Global write: slots_bet
Impact: low
Show code
slots_bet = pda_inter_mcm.get_config("slots_bet")
L19 🔴 global_write
Global write: sudoku_reward
Impact: low
Show code
sudoku_reward = pda_inter_mcm.get_config("sudoku_reward")
L20 🔴 global_write
Global write: sudoku_diff
Impact: low
Show code
sudoku_diff = pda_inter_mcm.get_config("sudoku_diff")
L1174 🔴 global_write
Global write: puzzle_reward
Impact: low
Show code
puzzle_reward = pda_inter_mcm.get_config("puzzle_reward")
L1175 🔴 global_write
Global write: slots_bet
Impact: low
Show code
slots_bet = pda_inter_mcm.get_config("slots_bet")
L1176 🔴 global_write
Global write: sudoku_reward
Impact: low
Show code
sudoku_reward = pda_inter_mcm.get_config("sudoku_reward")
L1177 🔴 global_write
Global write: sudoku_diff
Impact: low
Show code
sudoku_diff = pda_inter_mcm.get_config("sudoku_diff")
L6 🟡 unused_local_variable
Local variable 'math_random' is assigned but never used
Impact: low
Show code
local math_random = math.random
L7 🟡 unused_local_variable
Local variable 'math_floor' is assigned but never used
Impact: low
Show code
local math_floor = math.floor
L8 🟡 unused_local_variable
Local variable 'string_find' is assigned but never used
Impact: low
Show code
local string_find = string.find
L476 🟡 unused_local_variable
Local variable 'reward' is assigned but never used
Impact: low
Show code
local reward = db.actor:give_money(self.snake_cur_score)

pda_inter_gui_c_games_rogue.script

L9 🔴 global_write
Global write: pda_rogue_game
Impact: low
Show code
pda_rogue_game = {}
L477 🔴 global_write
Global write: pda_rogue_game
Impact: low
Show code
pda_rogue_game = m_data.pda_rogue_game or {}

pda_inter_gui_c_games_rogue_a_path.script

L75 🟢 table_insert_append
table.insert(result, v) -> result[#result+1] = v
Impact: high
Show code
table.insert( result, { x = px, y = py } )
L93 🟢 table_insert_append
table.insert(open, v) -> open[#open+1] = v
Impact: high
Show code
table.insert(open, start)
L102 🟢 table_insert_append
table.insert(closed, v) -> closed[#closed+1] = v
Impact: high
Show code
table.insert(closed, current)
L118 🟢 table_insert_append
table.insert(open, v) -> open[#open+1] = v
Impact: high
Show code
table.insert(open, adjacent)

pda_inter_gui_c_games_rogue_level_gen.script

L66 🟢 uncached_globals_summary
Cache 1 globals in RogueSetDarkscapeCellTextures
Impact: medium
Show code
L77: math.random L78: math.random
L90 🟢 uncached_globals_summary
Cache 1 globals in RogueSetSwampCellTextures
Impact: medium
Show code
L97: math.random L102: math.random
L164 🟢 uncached_globals_summary
Cache 1 globals in RogueSetRedForestCellTextures
Impact: medium
Show code
L175: math.random L176: math.random
L188 🟢 uncached_globals_summary
Cache 1 globals in RogueSetLabCellTextures
Impact: medium
Show code
L204: math.random L205: math.random
L437 🟢 uncached_globals_summary
Cache 1 globals in LevelMakeRooms
Impact: medium
Show code
L449: math.random L450: math.random
L135 🟡 string_concat_in_loop
String concat in loop: adj_str = adj_str .. x
Impact: critical
Show code
adj_str = adj_str .. "u"
L221 🟡 string_concat_in_loop
String concat in loop: adj_str = adj_str .. x
Impact: critical
Show code
adj_str = adj_str .. "u"
L27 🔴 global_write
Global write: start_cells
Impact: low
Show code
walls_map, start_cells = self:LevelWildGenerate(self.grid_w, self.grid_h, wall_percents)

pda_inter_gui_c_games_rogue_objects.script

L161 🟢 uncached_globals_summary
Cache 1 globals in RogueGenerateNPC
Impact: medium
Show code
L175: math.random L193: math.random
L257 🟢 uncached_globals_summary
Cache 1 globals in RogueGenerateObjectAnomalies
Impact: medium
Show code
L268: math.random L272: math.random
L1 🟡 unused_local_variable
Local variable 'gt' is assigned but never used
Impact: low
Show code
local gt = game.translate_string

pda_inter_gui_c_games_rogue_utils.script

L1 🟡 unused_local_variable
Local variable 'gt' is assigned but never used
Impact: low
Show code
local gt = game.translate_string
L232 🟡 unused_local_variable
Local variable 'str' is assigned but never used
Impact: low
Show code
local str = self.rogue_grid[row][col].rect

pda_inter_gui_d_trade.script

L61 🟢 table_insert_append
table.insert(self.trade_categories[group].item_btns, v) -> self.trade_categories[group].item_btns[#self.trade_categories[group].item_btns+1] = v
Impact: high
Show code
table.insert(self.trade_categories[group].item_btns, {})
L6 🟢 uncached_globals_summary
Cache 1 globals in BuildTradeUpperMenu
Impact: medium
Show code
L18: pairs L54: pairs
L1 🔴 global_write
Global write: pmain
Impact: low
Show code
pmain = pda_inter_gui
L253 🟡 unused_local_variable
Local variable 'traders_t' is assigned but never used
Impact: low
Show code
local traders_t = pda_inter_x_trade.Trade_available_messages

pda_inter_gui_e_notes.script

L166 🟢 table_insert_append
table.insert(pmain.pda_notes_t, v) -> pmain.pda_notes_t[#pmain.pda_notes_t+1] = v
Impact: high
Show code
table.insert(pmain.pda_notes_t, {}) -- new array for each new note
L34 🟡 string_concat_in_loop
String concat in loop: big_str = big_str .. x
Impact: critical
Show code
big_str = big_str .. yel_clr_str .. pmain.pda_notes_t[i][1] .. white_clr_str .. pmain.pda_notes_t[i][2] .. def_clr_str .. pmain.pda_notes_t[i][3]
L336 🟡 string_concat_in_loop
String concat in loop: big_str = big_str .. x
Impact: critical
Show code
big_str = big_str .. yel_clr_str .. pmain.pda_notes_t[i][1] .. white_clr_str .. pmain.pda_notes_t[i][2] .. def_clr_str .. pmain.pda_notes_t[i][3]
L1 🔴 global_write
Global write: pmain
Impact: low
Show code
pmain = pda_inter_gui

pda_inter_gui_f_banter.script

L1 🔴 global_write
Global write: pmain
Impact: low
Show code
pmain = pda_inter_gui
L2 🟡 unused_local_variable
Local variable 'gt' is assigned but never used
Impact: low
Show code
local gt = game.translate_string

pda_inter_gui_g_tasks.script

L182 🟡 string_concat_in_loop
String concat in loop: reward = reward .. x
Impact: critical
Show code
reward = reward .. " " .. gt("pda_task_reward_hour")
L1 🔴 global_write
Global write: pmain
Impact: low
Show code
pmain = pda_inter_gui

pda_inter_inc.script

L13 🟢 uncached_globals_summary
Cache 1 globals in squad_on_npc_death
Impact: medium
Show code
L76: math.random L90: math.random
L140 🟢 uncached_globals_summary
Cache 1 globals in sos_give_reward
Impact: medium
Show code
L147: math.random L149: math.random
L184 🟡 potential_nil_access
Potential nil access: 'npc' from level.object_by_id() used without nil check
Impact: low
Show code
if npc and (type(npc) == "userdata") and npc:alive() then

pda_inter_mcm.script

L339 🟡 string_concat_in_loop
String concat in loop: new_str = new_str .. x
Impact: critical
Show code
new_str = new_str .. t[i][j] .. "\n"
L163 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "pda_inter" ,gr={

pda_inter_utils.script

L13 🔴 global_write
Global write: pda_inter_utils
Impact: low
Show code
pda_inter_utils = {}
L58 🟡 unused_local_variable
Local variable 'string_format' is assigned but never used
Impact: low
Show code
local string_format = string.format

pda_inter_x_banter.script

L527 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L425 🔴 global_write
Global write: npc_name
Impact: low
Show code
npc_name = gt("st_faction_" .. se_npc:community())
L428 🔴 global_write
Global write: npc_name
Impact: low
Show code
npc_name = str and gt(strings[str])
L392 🟡 potential_nil_access
Potential nil access: 'npc' from level.object_by_id() used without nil check
Impact: low
Show code
local npc_pos = npc and npc:position()
L407 🟡 potential_nil_access
Potential nil access: 'npc' from level.object_by_id() used without nil check
Impact: low
Show code
if npc and npc:alive() then
L6 🟡 unused_local_variable
Local variable 'math_random' is assigned but never used
Impact: low
Show code
local math_random = math.random
L7 🟡 unused_local_variable
Local variable 'math_floor' is assigned but never used
Impact: low
Show code
local math_floor = math.floor
L8 🟡 unused_local_variable
Local variable 'string_find' is assigned but never used
Impact: low
Show code
local string_find = string.find

pda_inter_x_buyinfo.script

L246 🟢 table_insert_append
table.insert(Find_available_messages, v) -> Find_available_messages[#Find_available_messages+1] = v
Impact: high
Show code
table.insert(Find_available_messages, {})
L391 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L1 🔴 global_write
Global write: Find_available_messages
Impact: low
Show code
Find_available_messages = {} -- slowly add npcs to this table
L319 🔴 global_write
Global write: Find_available_messages
Impact: low
Show code
Find_available_messages = {}
L340 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local target_lname = sim:level_name(target_lid)
L17 🟡 unused_local_variable
Local variable 'math_random' is assigned but never used
Impact: low
Show code
local math_random = math.random
L18 🟡 unused_local_variable
Local variable 'math_floor' is assigned but never used
Impact: low
Show code
local math_floor = math.floor

pda_inter_x_raid.script

L103 🟢 table_insert_append
table.insert(Raid_available_squads, v) -> Raid_available_squads[#Raid_available_squads+1] = v
Impact: high
Show code
table.insert(Raid_available_squads, {})
L431 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L1 🔴 global_write
Global write: Raid_available_squads
Impact: low
Show code
Raid_available_squads = {}
L2 🔴 global_write
Global write: Hired_squad
Impact: low
Show code
Hired_squad = { id = false, start_time = false, duration = false, danger = false, icon = "default" }
L439 🔴 global_write
Global write: Hired_squad
Impact: low
Show code
Hired_squad = m_data.Hired_squad or { id = false, start_time = false, duration = false, danger = false, icon = "default" }
L140 🟡 potential_nil_access
Potential nil access: 'npc' from level.object_by_id() used without nil check
Impact: low
Show code
if npc and npc:alive() then
L155 🟡 potential_nil_access
Potential nil access: 'commander' from level.object_by_id() used without nil check
Impact: low
Show code
if commander and commander:alive() and commander:character_icon()then
L155 🟡 potential_nil_access
Potential nil access: 'commander' from level.object_by_id() used without nil check
Impact: low
Show code
if commander and commander:alive() and commander:character_icon()then
L333 🟡 potential_nil_access
Potential nil access: 'npc' from level.object_by_id() used without nil check
Impact: low
Show code
if npc and npc:alive() then
L360 🟡 potential_nil_access
Potential nil access: 'commander' from level.object_by_id() used without nil check
Impact: low
Show code
if commander and commander:alive() then
L13 🟡 unused_local_variable
Local variable 'math_random' is assigned but never used
Impact: low
Show code
local math_random = math.random
L14 🟡 unused_local_variable
Local variable 'math_floor' is assigned but never used
Impact: low
Show code
local math_floor = math.floor

pda_inter_x_tasks.script

L816 🟢 table_insert_append
table.insert(str_storage, v) -> str_storage[#str_storage+1] = v
Impact: high
Show code
table.insert(str_storage, route_smart_level_name)
L1015 🟢 table_insert_append
table.insert(Active_pda_tasks[#Active_pda_tasks].route, v) -> Active_pda_tasks[#Active_pda_tasks].route[#Active_pda_tasks[#Active_pda_tasks].route+1] = v
Impact: high
Show code
table.insert(Active_pda_tasks[#Active_pda_tasks].route, route_smart.id)
L511 🟢 repeated_alife
alife called 3x in find_givers
Impact: low
Show code
local sim = alife()
L727 🟢 repeated_alife
alife called 4x in add_giver
Impact: low
Show code
local sim = alife()
L1474 🟢 repeated_item_section()
item:section() called 3x in manage_fetch_items_task
Impact: low
Show code
Cache item:section() result
L1495 🟢 repeated_itm_section()
itm:section() called 3x in release_items
Impact: low
Show code
Cache itm:section() result
L1649 🟢 repeated_item_id()
item:id() called 3x in manage_delivery_item_task
Impact: low
Show code
Cache item:id() result
L824 🟡 string_concat_in_loop
String concat in loop: smart_levels_str = smart_levels_str .. x
Impact: critical
Show code
smart_levels_str = smart_levels_str .. (smart_levels_str == "" and "" or ", ") .. gt(str_storage[i])
L3153 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L44 🔴 global_write
Global write: Tasks_available_givers
Impact: low
Show code
Tasks_available_givers = {} -- clear this (to display in GUI)
L45 🔴 global_write
Global write: Active_pda_tasks
Impact: low
Show code
Active_pda_tasks = {} -- save this (tasks that we took)
L49 🔴 global_write
Global write: all_potential_givers
Impact: low
Show code
all_potential_givers = {} -- first update collects all possible givers (global for banter)
L3143 🔴 global_write
Global write: Active_pda_tasks
Impact: low
Show code
Active_pda_tasks = m_data.Active_pda_tasks or {}
L553 🟡 potential_nil_access
Potential nil access: 'npc' from level.object_by_id() used without nil check
Impact: low
Show code
local squad = npc and npc:alive() and get_object_squad(npc)
L721 🟡 potential_nil_access
Potential nil access: 'game_giver_obj' from level.object_by_id() used without nil check
Impact: low
Show code
if (not game_giver_obj) or (not game_giver_obj:alive()) then return end
L2979 🟡 potential_nil_access
Potential nil access: 'npc' from level.object_by_id() used without nil check
Impact: low
Show code
local npc_pos = npc and npc:position()
L36 🟡 unused_local_variable
Local variable 'math_random' is assigned but never used
Impact: low
Show code
local math_random = math.random
L37 🟡 unused_local_variable
Local variable 'math_floor' is assigned but never used
Impact: low
Show code
local math_floor = math.floor
L38 🟡 unused_local_variable
Local variable 'math_ceil' is assigned but never used
Impact: low
Show code
local math_ceil = math.ceil
L39 🟡 unused_local_variable
Local variable 'math_min' is assigned but never used
Impact: low
Show code
local math_min = math.min
L40 🟡 unused_local_variable
Local variable 'math_max' is assigned but never used
Impact: low
Show code
local math_max = math.max
L42 🟡 unused_local_variable
Local variable 'table_insert' is assigned but never used
Impact: low
Show code
local table_insert = table.insert
L2375 🟡 unused_local_variable
Local variable 'blue_clr' is assigned but never used
Impact: low
Show code
local blue_clr = strformat("%c[%s,%s,%s,%s]", 255, 0, 140, 180)
L2381 🟡 unused_local_variable
Local variable 'cur_d' is assigned but never used
Impact: low
Show code
local cur_d = cur_time:dateToString(game.CTime.DateToDay)
L2382 🟡 unused_local_variable
Local variable 'cur_min' is assigned but never used
Impact: low
Show code
local cur_min = cur_time:timeToString(game.CTime.TimeToMinutes)
L3203 🟡 unused_local_variable
Local variable 'combined_tasks_timer' is assigned but never used
Impact: low
Show code
local combined_tasks_timer

pda_inter_x_trade.script

L197 🟢 table_insert_append
table.insert(Trade_available_messages, v) -> Trade_available_messages[#Trade_available_messages+1] = v
Impact: high
Show code
table.insert(Trade_available_messages, {})
L251 🟢 table_insert_append
table.insert(Ordered_items, v) -> Ordered_items[#Ordered_items+1] = v
Impact: high
Show code
table.insert(Ordered_items, {})
L480 🟢 table_insert_append
table.insert(t, v) -> t[#t+1] = v
Impact: high
Show code
table.insert(t, {sec, name})
L594 🟢 table_insert_append
table.insert(all_level_stashes, v) -> all_level_stashes[#all_level_stashes+1] = v
Impact: high
Show code
table.insert(all_level_stashes, se_stash)
L624 🟢 table_insert_append
table.insert(ltx_stashes, v) -> ltx_stashes[#ltx_stashes+1] = v
Impact: high
Show code
table.insert(ltx_stashes, stash)
L129 🟢 uncached_globals_summary
Cache 1 globals in add_trader
Impact: medium
Show code
L169: math.ceil L181: math.ceil
L716 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L2 🔴 global_write
Global write: Trade_available_messages
Impact: low
Show code
Trade_available_messages = {}
L3 🔴 global_write
Global write: Ordered_items
Impact: low
Show code
Ordered_items = {}
L4 🔴 global_write
Global write: delivered_stashes
Impact: low
Show code
delivered_stashes = {}
L8 🔴 global_write
Global write: categorized_items
Impact: low
Show code
categorized_items = {}
L38 🔴 global_write
Global write: Delivery_blacklisted_levels
Impact: low
Show code
Delivery_blacklisted_levels = { ["l03u_agr_underground"] = true, ["y04_pole"] = true, ["k01_darkscape"] = true, ["l04u_labx18"] = true, ["l08u_brainlab"] = true, ["jupiter_underground"] = true, ["l10u_bunker"] = true, ["labx8"] = true, ["l12u_control_monolith"] = true, ["l12u_sarcofag"] = true, ["l13u_warlab"] = true, ["bunker_a1"] = true, ["collaider"] = true }
L364 🔴 global_write
Global write: result
Impact: low
Show code
result, id, value = trade_ini:r_line_ex(to_collect[i], j, "", "")
L364 🔴 global_write
Global write: id
Impact: low
Show code
result, id, value = trade_ini:r_line_ex(to_collect[i], j, "", "")
L364 🔴 global_write
Global write: value
Impact: low
Show code
result, id, value = trade_ini:r_line_ex(to_collect[i], j, "", "")
L613 🔴 global_write
Global write: result
Impact: low
Show code
result, id, value = stash_ini:r_line_ex(selected_level, i, "", "")
L613 🔴 global_write
Global write: id
Impact: low
Show code
result, id, value = stash_ini:r_line_ex(selected_level, i, "", "")
L613 🔴 global_write
Global write: value
Impact: low
Show code
result, id, value = stash_ini:r_line_ex(selected_level, i, "", "")
L725 🔴 global_write
Global write: Ordered_items
Impact: low
Show code
Ordered_items = m_data.Ordered_items or {}
L726 🔴 global_write
Global write: delivered_stashes
Impact: low
Show code
delivered_stashes = m_data.delivered_stashes or {}
L26 🟡 unused_local_variable
Local variable 'math_floor' is assigned but never used
Impact: low
Show code
local math_floor = math.floor
L28 🟡 unused_local_variable
Local variable 'table_insert' is assigned but never used
Impact: low
Show code
local table_insert = table.insert

IntroScreen

3 files (🟢1 🟡1 🔴4 🔵0)

serious_intro_screen_mcm.script

L6 🔴 global_write
Global write: op
Impact: low
Show code
op = {

stolen_from_catspaws_secret_lab.script

L1 🔴 global_write
Global write: abort_fade
Impact: low
Show code
abort_fade = false
L15 🔴 global_write
Global write: alpha_start
Impact: low
Show code
alpha_start = 255
L16 🔴 global_write
Global write: alpha_end
Impact: low
Show code
alpha_end = 0

ui_intro_screen.script

L150 🟢 math_pow_simple
math.pow(x, 0.5) -> math.sqrt(x)
Impact: high
Show code
return math.pow(x, 0.5)
L99 🟡 unused_local_variable
Local variable 'bind' is assigned but never used
Impact: low
Show code
local bind = dik_to_bind(dik)

IntroScreenAddon

3 files (🟢1 🟡1 🔴4 🔵0)

serious_intro_screen_mcm.script

L6 🔴 global_write
Global write: op
Impact: low
Show code
op = {

stolen_from_catspaws_secret_lab.script

L1 🔴 global_write
Global write: abort_fade
Impact: low
Show code
abort_fade = false
L15 🔴 global_write
Global write: alpha_start
Impact: low
Show code
alpha_start = 255
L16 🔴 global_write
Global write: alpha_end
Impact: low
Show code
alpha_end = 0

ui_intro_screen.script

L182 🟢 math_pow_simple
math.pow(x, 0.5) -> math.sqrt(x)
Impact: high
Show code
return math.pow(x, 0.5)
L123 🟡 unused_local_variable
Local variable 'bind' is assigned but never used
Impact: low
Show code
local bind = dik_to_bind(dik)

Inventory_Weights_Revised

1 file (🟢0 🟡0 🔴3 🔵0)

utils_ui_demonized_inventory_weights.script

L5 🔴 global_write
Global write: ui_cell_item_update
Impact: low
Show code
ui_cell_item_update = utils_ui.UICellItem.Update
L8 🔴 global_write
Global write: obj
Impact: low
Show code
obj = obj or (self.ID and level.object_by_id(self.ID))
L23 🔴 global_write
Global write: ui_cell_item_reset
Impact: low
Show code
ui_cell_item_reset = utils_ui.UICellItem.Reset

Ishmaeel's Kill Tracker

1 file (🟢0 🟡1 🔴0 🔵0)

ish_kill_tracker.script

L30 🟡 potential_nil_access
Potential nil access: 'pda' from :item_in_slot() used without nil check
Impact: low
Show code
if pda and pda:section() == "device_pda_3" then

Kalishs_More_PDA_News

5 files (🟢30 🟡47 🔴20 🔵34)

axr_turn_on_campfire.script

L103 🟢 repeated_npc_id()
npc:id() called 4x in find_valid_target
Impact: low
Show code
Cache npc:id() result
L81 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("RUNNING KALISH CAMPFIRE SCRIPT")
L324 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("xr_corpse_detection: no action id p[%s]",i)
L9 🔴 global_write
Global write: evaid
Impact: low
Show code
evaid = 188114
L10 🔴 global_write
Global write: actid
Impact: low
Show code
actid = 188114
L16 🔴 global_write
Global write: already_selected
Impact: low
Show code
already_selected = {}
L84 🔴 global_write
Global write: se
Impact: low
Show code
se = npc:character_name()
L73 🟡 potential_nil_access
Potential nil access: 'CFZone' from :get_campfire() used without nil check
Impact: low
Show code
if (CFZone:is_on()) then
L77 🟡 potential_nil_access
Potential nil access: 'CFZone' from :get_campfire() used without nil check
Impact: low
Show code
CFZone:turn_on()
L105 🟡 potential_nil_access
Potential nil access: 'camp' from level.object_by_id() used without nil check
Impact: low
Show code
local CFZone = camp and camp:get_campfire()
L320 🟡 potential_nil_access
Potential nil access: 'manager' from :motivation_action_manager() used without nil check
Impact: low
Show code
action = manager:action(p[i])
L344 🟡 potential_nil_access
Potential nil access: 'mgr' from :motivation_action_manager() used without nil check
Impact: low
Show code
if not mgr or not mgr:initialized() then
L348 🟡 potential_nil_access
Potential nil access: 'mgr' from :motivation_action_manager() used without nil check
Impact: low
Show code
return mgr:current_action_id() == actid
L141 🟡 unused_local_variable
Local variable 'is_dx11' is assigned but never used
Impact: low
Show code
local is_dx11 = render_get_dx_level() == 655361
L143 🟡 unused_local_variable
Local variable 'npc_id' is assigned but never used
Impact: low
Show code
local npc_id = npc:id()

dynamic_news_manager.script

L409 🟢 table_insert_append
table.insert(picked_tbl, v) -> picked_tbl[#picked_tbl+1] = v
Impact: high
Show code
table.insert(picked_tbl, entry.func)
L487 🟢 table_insert_append
table.insert(picked_tbl, v) -> picked_tbl[#picked_tbl+1] = v
Impact: high
Show code
table.insert(picked_tbl, i)
L679 🟢 table_insert_append
table.insert(self.loot, v) -> self.loot[#self.loot+1] = v
Impact: high
Show code
table.insert(self.loot,item)
L2852 🟢 table_insert_append
table.insert(sentences, v) -> sentences[#sentences+1] = v
Impact: high
Show code
table.insert(sentences,tr_s)
L29 🟢 uncached_globals_summary
Cache 1 globals in update_settings
Impact: medium
Show code
L65: math.random L66: math.random
L290 🟢 uncached_globals_summary
Cache 1 globals in TickQuick
Impact: medium
Show code
L305: math.random L310: math.random
L1103 🟢 uncached_globals_summary
Cache 1 globals in WelcomeToNetwork
Impact: medium
Show code
L1126: math.random L1127: math.random
L1140 🟢 uncached_globals_summary
Cache 2 globals in ReportDeathBySurge
Impact: medium
Show code
L1149: math.random L1151: math.random L1151: tostring L1161: tostring
L1317 🟢 uncached_globals_summary
Cache 1 globals in SeenDeathOfStalker
Impact: medium
Show code
L1338: math.random L1339: math.random
L1352 🟢 uncached_globals_summary
Cache 1 globals in SeenDeathOfMutant
Impact: medium
Show code
L1369: math.random L1370: math.random
L1383 🟢 uncached_globals_summary
Cache 1 globals in SeenDeathByMutant
Impact: medium
Show code
L1397: math.random L1398: math.random
L1460 🟢 uncached_globals_summary
Cache 1 globals in SOSBattleOffline
Impact: medium
Show code
L1495: math.random L1496: math.random
L1662 🟢 uncached_globals_summary
Cache 1 globals in FoundStash
Impact: medium
Show code
L1668: math.random L1677: math.random
L1724 🟢 uncached_globals_summary
Cache 1 globals in GossipLoot
Impact: medium
Show code
L1744: math.random L1753: math.random
L1772 🟢 uncached_globals_summary
Cache 2 globals in ReportNextEmission
Impact: medium
Show code
L1778: math.random L1800: math.random L1797: math.floor L1809: math.floor
L1867 🟢 uncached_globals_summary
Cache 1 globals in ReportZoneActivity
Impact: medium
Show code
L1898: math.random L1940: math.random
L2019 🟢 uncached_globals_summary
Cache 2 globals in FoundDead
Impact: medium
Show code
L2026: math.random L2027: math.random L2038: tostring L2039: tostring
L2145 🟢 uncached_globals_summary
Cache 1 globals in GossipNearbyActivity
Impact: medium
Show code
L2171: math.random L2173: math.random
L2229 🟢 uncached_globals_summary
Cache 1 globals in RandomFact
Impact: medium
Show code
L2251: math.random L2252: math.random
L2631 🟢 uncached_globals_summary
Cache 1 globals in ResponseOnFoundStash
Impact: medium
Show code
L2642: math.random L2642: math.random
L2763 🟢 uncached_globals_summary
Cache 1 globals in ResponseOnDeathByStalker_Fake
Impact: medium
Show code
L2774: math.random L2774: math.random
L2781 🟢 uncached_globals_summary
Cache 1 globals in ResponseOnDeathByMutant_Fake
Impact: medium
Show code
L2792: math.random L2792: math.random
L2799 🟢 uncached_globals_summary
Cache 1 globals in ResponseOnDeathBySurges_Fake
Impact: medium
Show code
L2810: math.random L2810: math.random
L2821 🟢 uncached_globals_summary
Cache 1 globals in BuildSentenceStalkerEnemy
Impact: medium
Show code
L2862: math.random L2862: math.random
L2868 🟢 uncached_globals_summary
Cache 1 globals in BuildSentenceStalkerEnemy_Offline
Impact: medium
Show code
L2869: math.random L2870: math.random
L1164 🟡 string_concat_in_loop
String concat in loop: msg = msg .. x
Impact: critical
Show code
msg = msg .. strformat("\\n%s-%s %s%s-%s%s%s, %s %s, %s.",clr_1,clr_2,y1,y2,z1,z2,z3,a,b,c)
L396 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Picking random news event")
L668 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("s_type: %s", s_type)
L1987 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ News couldn't be sent because it involves special character [%s], he's missing? \nMessage: %s", fac_profile[k], msg_pick)
L2063 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Gossip failed to get npc")
L2224 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("BANTER PAIR, banter: %s, reply: %s", banter, reply)
L2230 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("KALISH RANDOM FACT CALL")
L2238 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("KALISH RANDOM FACT: unable to find sender")
L2257 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Attempting to REPLY TO RANDOM FACT")
L2260 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("KALISH RANDOM FACT: unable to find sender")
L12 🔴 global_write
Global write: enable_news
Impact: low
Show code
enable_news = true -- useful for pausing news if set to false
L2323 🔴 global_write
Global write: actor_name
Impact: low
Show code
actor_name = se_actor:character_name()
L870 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
se_obj = sim:object(i)
L871 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
clsid = se_obj and se_obj:clsid()
L907 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(i)
L1112 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(i)
L1113 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if (se_obj and IsStalker(nil,se_obj:clsid()) and se_obj:alive() and se_obj:community() ~= "zombied" and se_obj:community() ~= "monolith" and se_obj.group_id ~= 65535) then
L1113 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if (se_obj and IsStalker(nil,se_obj:clsid()) and se_obj:alive() and se_obj:community() ~= "zombied" and se_obj:community() ~= "monolith" and se_obj.group_id ~= 65535) then
L1113 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if (se_obj and IsStalker(nil,se_obj:clsid()) and se_obj:alive() and se_obj:community() ~= "zombied" and se_obj:community() ~= "monolith" and se_obj.group_id ~= 65535) then
L1113 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if (se_obj and IsStalker(nil,se_obj:clsid()) and se_obj:alive() and se_obj:community() ~= "zombied" and se_obj:community() ~= "monolith" and se_obj.group_id ~= 65535) then
L1118 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_actor = sim:actor()
L1210 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_actor = sim:actor()
L1880 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(i)
L1881 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
if se_obj and (lvl_name == sim:level_name(gg:vertex(se_obj.m_game_vertex_id):level_id())) then
L1924 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(stalkers[i])
L2488 🟡 potential_nil_access
Potential nil access: 'alife' from alife() used without nil check
Impact: low
Show code
local se_actor = alife:actor()
L2541 🟡 potential_nil_access
Potential nil access: 'alife' from alife() used without nil check
Impact: low
Show code
local se_actor = alife:actor()
L1774 🟡 unused_local_variable
Local variable 'clr' is assigned but never used
Impact: low
Show code
local SM, SurgeType, last_surge_time, AccuracyTier, comm, Se, clr, msg, a, b, c, d, Tbl_msg
L1915 🟡 unused_local_variable
Local variable 'sender_desc' is assigned but never used
Impact: low
Show code
local sender_desc = game.translate_string("st_dyn_news_comm_" .. sender_comm .. "_" .. tostring(6))
L2822 🟡 unused_local_variable
Local variable 'comm_victim' is assigned but never used
Impact: low
Show code
local comm_victim = victim:character_community()

sim_offline_combat.script

L103 🟢 uncached_globals_summary
Cache 1 globals in smart_terrain_on_update
Impact: medium
Show code
L107: pairs L120: pairs
L235 🟢 uncached_globals_summary
Cache 1 globals in coordinator
Impact: medium
Show code
L291: pairs L301: pairs
L514 🟢 uncached_globals_summary
Cache 1 globals in send_battle_banter
Impact: medium
Show code
L523: math.random L527: math.random
L142 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("% OCS | Battle in smart [%s]", smart:name())
L143 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("------------------------------------------------------------------------")
L154 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("% OCS | Battle in smart [%s]", smart:name())
L155 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("------------------------------------------------------------------------")
L169 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!!! TRYING TO REGISTER NON-SQUAD AS SQUAD")
L208 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("------------------------------------------------------------------------")
L219 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("------------------------------------------------------------------------")
L361 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("- OCS | Combat Distance: %s - Execlude special characters: %s - Mutants included: %s", opt_dist, opt_exclude, can_fight_mutant)
L424 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("% OCS | [%s] is special, [%s] is removed", squad_1:name(), squad_2:name())
L438 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("% OCS | [%s] is special, [%s] is removed", squad_2:name(), squad_1:name())
L509 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("BANTER PAIR, banter: %s, reply: %s", banter, reply)
L515 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Attempting to send battle banter")
L524 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Attempting to send battle banter 1")
L529 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Attempting to send battle banter 2")
L574 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("OFFLINE BATTLE OCCURRED BETWEEN %s and %s", squad_1:name(), squad_2:name())
L582 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/ OCS | %s | Attacker [%s](Power: %s) vs Victim [%s](Power: %s) | Damage: %s",
L593 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! OCS | Squad gone [%s] | Moment: %s sec", squad_2:name(), math_ceil(time_global()/1000))
L612 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ OCS | Squad [%s] lost NPC [%s] | Remaining power: %s | Moment: %s sec", squad_2:name(), se_victim:name(), ocs_power[id_2], math_ceil(time_global()/1000))
L619 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! OCS | Squad gone [%s] | Moment: %s sec", squad_2:name(), math_ceil(time_global()/1000))
L53 🔴 global_write
Global write: task_squads
Impact: low
Show code
task_squads = {}
L55 🔴 global_write
Global write: story_id_communities
Impact: low
Show code
story_id_communities = {}
L56 🔴 global_write
Global write: ignore_list
Impact: low
Show code
ignore_list = {}
L59 🔴 global_write
Global write: ocs_power
Impact: low
Show code
ocs_power = {}
L60 🔴 global_write
Global write: opponents
Impact: low
Show code
opponents = {}
L61 🔴 global_write
Global write: squads_by_level
Impact: low
Show code
squads_by_level = {}
L139 🔴 global_write
Global write: in_combat
Impact: low
Show code
in_combat = validate_enemy(sim, lid_1, squad_1, id_1, id_t, community_1)
L151 🔴 global_write
Global write: in_combat
Impact: low
Show code
in_combat = validate_enemy(sim, lid_1, squad_1, id_1, id_2, community_1)
L530 🔴 global_write
Global write: npc_c
Impact: low
Show code
npc_c = npc_a
L828 🔴 global_write
Global write: task_squads
Impact: low
Show code
task_squads = m_data.offline_task_squads or {}
L121 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local squad_1 = sim:object(id_1)
L123 🟡 potential_nil_access
Potential nil access: 'squad_1' from :object() used without nil check
Impact: low
Show code
if squad_1 and (not squad_1.online) and SIMBOARD.squads[squad_1.id] and (squad_1:npc_count() > 0)
L292 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local squad = sim:object(id)
L303 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_npc = id and sim:object(id)
L304 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local squad = se_npc and se_npc.group_id and se_npc.group_id ~= 65535 and sim:object(se_npc.group_id)
L313 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local squad = sim:object(id)
L314 🟡 potential_nil_access
Potential nil access: 'squad' from :object() used without nil check
Impact: low
Show code
local section = squad and squad:section_name()
L387 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local squad_2 = id_2 and sim:object(id_2)
L731 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = k.id and sim:object(k.id)
L40 🟡 unused_local_variable
Local variable 'MONSTER_MULTI' is assigned but never used
Impact: low
Show code
local MONSTER_MULTI = 1 -- multiplier for mutants rank
L48 🟡 unused_local_variable
Local variable 'smart_battles_only' is assigned but never used
Impact: low
Show code
local smart_battles_only
L50 🟡 unused_local_variable
Local variable 'string_find' is assigned but never used
Impact: low
Show code
local is_enemy, string_find, math_random, math_ceil, math_max, math_pow = game_relations.is_factions_enemies, string.find, math.random, math.ceil, math.max, math.pow
L66 🟡 unused_local_variable
Local variable 'c_cnt' is assigned but never used
Impact: low
Show code
local c_cnt, c_tbl = 0, {} -- enemies collector
L66 🟡 unused_local_variable
Local variable 'c_tbl' is assigned but never used
Impact: low
Show code
local c_cnt, c_tbl = 0, {} -- enemies collector
L815 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_ocs:r_line_ex("ignore_list",i,"","")

tasks_guide.script

L282 🟢 uncached_globals_summary
Cache 1 globals in prepare_follower
Impact: medium
Show code
L329: math.random L339: math.random
L138 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log('! Çàâèñàíèå öèêëà, âûïîëíåí = '..cycle_id..' ðàç!')
L342 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("TRYING TO SEND DYNAMIC REQUEST FOR ESCORT")
L488 🔴 global_write
Global write: action
Impact: low
Show code
then action=""
L508 🔴 global_write
Global write: action
Impact: low
Show code
action=""
L308 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
if (level_name == sim:level_name(gg:vertex(v.m_game_vertex_id):level_id())) and (simulation_objects.available_by_id[v.id] == true) then
L371 🟡 potential_nil_access
Potential nil access: 'npc' from level.object_by_id() used without nil check
Impact: low
Show code
local str = string.format(game.translate_string('st_jg_15'), curr_guid.neustoika, npc and npc:character_name() or '')
L311 🟡 unused_local_variable
Local variable 'count' is assigned but never used
Impact: low
Show code
local count = 0

xr_wounded.script

L162 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("wrong wounded animation %s", self.object:name())
L198 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("wrong wounded animation %s", self.object:name())
L240 🔴 global_write
Global write: hp
Impact: low
Show code
hp = 100*self.npc.health
L241 🔴 global_write
Global write: psy
Impact: low
Show code
psy = 100*self.npc.psy_health
L97 🟡 potential_nil_access
Potential nil access: 'enemy' from db.actor() used without nil check
Impact: low
Show code
local enemy_community = enemy:character_community()
L98 🟡 potential_nil_access
Potential nil access: 'enemy' from db.actor() used without nil check
Impact: low
Show code
if enemy and game_relations.is_factions_enemies(obj_community, enemy_community) and posit:distance_to(enemy:position()) < 1.5 and self.object:see(enemy) then

Kute's Free Zoom Rewrite

2 files (🟢1 🟡2 🔴89 🔵9)

Free_ZoomV2_mcm.script

L3 🔴 global_write
Global write: target_fov
Impact: low
Show code
target_fov = 60
L4 🔴 global_write
Global write: mouse_to_fov
Impact: low
Show code
mouse_to_fov = 0.5
L5 🔴 global_write
Global write: hud_to_fov
Impact: low
Show code
hud_to_fov = 0.5
L7 🔴 global_write
Global write: adsing
Impact: low
Show code
adsing = false
L8 🔴 global_write
Global write: freezooming
Impact: low
Show code
freezooming = false
L9 🔴 global_write
Global write: special_gun
Impact: low
Show code
special_gun = false
L10 🔴 global_write
Global write: is_pistol
Impact: low
Show code
is_pistol = false
L15 🔴 global_write
Global write: GuiOpening
Impact: low
Show code
GuiOpening = {}
L18 🔴 global_write
Global write: special_weapons
Impact: low
Show code
special_weapons={
L60 🔴 global_write
Global write: fov_before
Impact: low
Show code
fov_before = get_console_cmd(2, "fov")
L61 🔴 global_write
Global write: hud_fov_before
Impact: low
Show code
hud_fov_before = get_console_cmd(2, "hud_fov")
L62 🔴 global_write
Global write: mouse_sens_before
Impact: low
Show code
mouse_sens_before = get_console_cmd(2, "mouse_sens")
L63 🔴 global_write
Global write: mouse_to_fov
Impact: low
Show code
mouse_to_fov = mouse_sens_before/fov_before
L64 🔴 global_write
Global write: hud_to_fov
Impact: low
Show code
hud_to_fov = hud_fov_before/fov_before
L66 🔴 global_write
Global write: hud_fov_backup
Impact: low
Show code
hud_fov_backup = get_console_cmd(2, "hud_fov")
L69 🔴 global_write
Global write: hud_fov_backup
Impact: low
Show code
hud_fov_backup=hud_fov_before/pistol_mult
L74 🔴 global_write
Global write: pistol_mult
Impact: low
Show code
pistol_mult = ui_mcm.get("free_zoom/pistol_mult") or 1.15
L75 🔴 global_write
Global write: ads_mult
Impact: low
Show code
ads_mult = ui_mcm.get("free_zoom/ads_mult") or 0.85
L76 🔴 global_write
Global write: free_zoom_mult
Impact: low
Show code
free_zoom_mult = ui_mcm.get("free_zoom/free_zoom_mult") or 0.61
L77 🔴 global_write
Global write: freezoom_toggleable
Impact: low
Show code
freezoom_toggleable = ui_mcm.get("free_zoom/freezoom_toggleable") or false
L79 🔴 global_write
Global write: target_fov
Impact: low
Show code
target_fov = fov_before
L136 🔴 global_write
Global write: fov_before
Impact: low
Show code
fov_before = get_console_cmd(2, "fov")
L137 🔴 global_write
Global write: hud_fov_before
Impact: low
Show code
hud_fov_before = get_console_cmd(2, "hud_fov")
L138 🔴 global_write
Global write: mouse_sens_before
Impact: low
Show code
mouse_sens_before = get_console_cmd(2, "mouse_sens")
L139 🔴 global_write
Global write: mouse_to_fov
Impact: low
Show code
mouse_to_fov = mouse_sens_before/fov_before
L140 🔴 global_write
Global write: hud_to_fov
Impact: low
Show code
hud_to_fov = hud_fov_before/fov_before
L141 🔴 global_write
Global write: target_fov
Impact: low
Show code
target_fov = fov_before
L151 🔴 global_write
Global write: is_pistol
Impact: low
Show code
is_pistol = SYS_GetParam(0, sec, "kind", "") == "w_pistol"
L153 🔴 global_write
Global write: hud_fov_before
Impact: low
Show code
hud_fov_before = hud_fov_backup * pistol_mult
L155 🔴 global_write
Global write: hud_fov_before
Impact: low
Show code
hud_fov_before = hud_fov_backup
L159 🔴 global_write
Global write: special_gun
Impact: low
Show code
special_gun = true
L160 🔴 global_write
Global write: hud_fov_before
Impact: low
Show code
hud_fov_before = special_weapons[sec_p]
L162 🔴 global_write
Global write: special_gun
Impact: low
Show code
special_gun = false
L163 🔴 global_write
Global write: hud_fov_before
Impact: low
Show code
hud_fov_before = hud_fov_backup
L166 🔴 global_write
Global write: hud_to_fov
Impact: low
Show code
hud_to_fov = hud_fov_before/fov_before
L168 🔴 global_write
Global write: target_fov
Impact: low
Show code
target_fov = fov_before * free_zoom_mult
L170 🔴 global_write
Global write: target_fov
Impact: low
Show code
target_fov = fov_before
L194 🔴 global_write
Global write: scoped
Impact: low
Show code
scoped = wpn:cast_Weapon():IsScopeAttached()
L195 🔴 global_write
Global write: zoomed
Impact: low
Show code
zoomed = wpn:cast_Weapon():IsZoomed()
L199 🔴 global_write
Global write: target_fov
Impact: low
Show code
target_fov=target_fov*free_zoom_mult
L201 🔴 global_write
Global write: freezooming
Impact: low
Show code
freezooming = true
L207 🔴 global_write
Global write: hud_to_fov
Impact: low
Show code
hud_to_fov = get_console_cmd(2, "hud_fov")/(fov_before*ads_mult)
L211 🔴 global_write
Global write: hud_to_fov
Impact: low
Show code
hud_to_fov = hud_fov_before/fov_before
L217 🔴 global_write
Global write: scoped
Impact: low
Show code
scoped = wpn:cast_Weapon():IsScopeAttached()
L218 🔴 global_write
Global write: zoomed
Impact: low
Show code
zoomed = wpn:cast_Weapon():IsZoomed()
L222 🔴 global_write
Global write: freezooming
Impact: low
Show code
freezooming = false
L223 🔴 global_write
Global write: target_fov
Impact: low
Show code
target_fov = target_fov / free_zoom_mult
L229 🔴 global_write
Global write: hud_to_fov
Impact: low
Show code
hud_to_fov = (get_console_cmd(2, "hud_fov")/free_zoom_mult)/(fov_before*ads_mult)
L233 🔴 global_write
Global write: hud_to_fov
Impact: low
Show code
hud_to_fov = hud_fov_before/fov_before
L247 🔴 global_write
Global write: scoped
Impact: low
Show code
scoped = wpn:cast_Weapon():IsScopeAttached()
L248 🔴 global_write
Global write: zoomed
Impact: low
Show code
zoomed = wpn:cast_Weapon():IsZoomed()
L252 🔴 global_write
Global write: target_fov
Impact: low
Show code
target_fov=target_fov*free_zoom_mult
L254 🔴 global_write
Global write: freezooming
Impact: low
Show code
freezooming = true
L260 🔴 global_write
Global write: hud_to_fov
Impact: low
Show code
hud_to_fov = get_console_cmd(2, "hud_fov")/(fov_before*ads_mult)
L264 🔴 global_write
Global write: hud_to_fov
Impact: low
Show code
hud_to_fov = hud_fov_before/fov_before
L278 🔴 global_write
Global write: scoped
Impact: low
Show code
scoped = wpn:cast_Weapon():IsScopeAttached()
L279 🔴 global_write
Global write: zoomed
Impact: low
Show code
zoomed = wpn:cast_Weapon():IsZoomed()
L283 🔴 global_write
Global write: freezooming
Impact: low
Show code
freezooming = false
L284 🔴 global_write
Global write: target_fov
Impact: low
Show code
target_fov = target_fov / free_zoom_mult
L290 🔴 global_write
Global write: hud_to_fov
Impact: low
Show code
hud_to_fov = (get_console_cmd(2, "hud_fov")/free_zoom_mult)/(fov_before*ads_mult)
L294 🔴 global_write
Global write: hud_to_fov
Impact: low
Show code
hud_to_fov = hud_fov_before/fov_before
L303 🔴 global_write
Global write: scoped
Impact: low
Show code
scoped = wpn:cast_Weapon():IsScopeAttached()
L304 🔴 global_write
Global write: zoomed
Impact: low
Show code
zoomed = wpn:cast_Weapon():IsZoomed()
L306 🔴 global_write
Global write: freezooming
Impact: low
Show code
freezooming = false
L311 🔴 global_write
Global write: target_fov
Impact: low
Show code
target_fov = target_fov/free_zoom_mult
L318 🔴 global_write
Global write: target_fov
Impact: low
Show code
target_fov = target_fov * ads_mult
L319 🔴 global_write
Global write: adsing
Impact: low
Show code
adsing = true
L329 🔴 global_write
Global write: adsing
Impact: low
Show code
adsing = false
L330 🔴 global_write
Global write: target_fov
Impact: low
Show code
target_fov = target_fov / ads_mult
L338 🔴 global_write
Global write: scoped
Impact: low
Show code
scoped = wpn:cast_Weapon():IsScopeAttached()
L339 🔴 global_write
Global write: zoomed
Impact: low
Show code
zoomed = wpn:cast_Weapon():IsZoomed()
L341 🔴 global_write
Global write: freezooming
Impact: low
Show code
freezooming = false
L342 🔴 global_write
Global write: target_fov
Impact: low
Show code
target_fov = target_fov / free_zoom_mult
L348 🔴 global_write
Global write: hud_to_fov
Impact: low
Show code
hud_to_fov = (get_console_cmd(2, "hud_fov")/free_zoom_mult)/(fov_before*ads_mult)
L352 🔴 global_write
Global write: hud_to_fov
Impact: low
Show code
hud_to_fov = hud_fov_before/fov_before
L361 🔴 global_write
Global write: target_fov
Impact: low
Show code
target_fov = fov_before
L363 🔴 global_write
Global write: freezooming
Impact: low
Show code
freezooming = false
L380 🔴 global_write
Global write: adsing
Impact: low
Show code
adsing = false
L381 🔴 global_write
Global write: freezooming
Impact: low
Show code
freezooming = false
L382 🔴 global_write
Global write: special_gun
Impact: low
Show code
special_gun = false
L383 🔴 global_write
Global write: is_pistol
Impact: low
Show code
is_pistol = false
L387 🔴 global_write
Global write: hud_fov_before
Impact: low
Show code
hud_fov_before = hud_fov_backup
L388 🔴 global_write
Global write: hud_to_fov
Impact: low
Show code
hud_to_fov = hud_fov_before/fov_before
L389 🔴 global_write
Global write: mouse_to_fov
Impact: low
Show code
mouse_to_fov = mouse_sens_before/fov_before
L390 🔴 global_write
Global write: target_fov
Impact: low
Show code
target_fov = fov_before
L392 🔴 global_write
Global write: GuiOpening
Impact: low
Show code
GuiOpening = {}
L400 🔴 global_write
Global write: freezooming
Impact: low
Show code
freezooming = false
L401 🔴 global_write
Global write: target_fov
Impact: low
Show code
target_fov = target_fov / free_zoom_mult
L437 🔴 global_write
Global write: hud_fov_backup
Impact: low
Show code
hud_fov_backup = get_console_cmd(2, "hud_fov")
L270 🟡 unused_local_variable
Local variable 'old_target_fov' is assigned but never used
Impact: low
Show code
local old_target_fov = target_fov

demonized_time_events.script

L23 🟢 uncached_globals_summary
Cache 1 globals in print_table
Impact: medium
Show code
L32: type L34: type
L35 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = function",k)
L38 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s",k,utils_data.vector_to_string(v))
L40 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = userdata", k)
L45 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = true",k)
L47 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = true")
L51 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = false", k)
L53 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = false")
L58 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s", k,v)
L60 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = nil", k,v)
L199 🟡 unused_local_variable
Local variable 'tg_past' is assigned but never used
Impact: low
Show code
local tg_past = 0

Lautaro_SaveGame_Animation_IWP

1 file (🟢0 🟡1 🔴0 🔵0)

zzz_immersive_save_edit.script

L49 🟡 string_concat_in_loop
String concat in loop: argstr = argstr .. x
Impact: critical
Show code
argstr = argstr.." "..v

Lizzardman's Field Strip Colors

1 file (🟢6 🟡0 🔴0 🔵0)

tpa_patch_repairs.script

L34 🟢 table_insert_append
table.insert(context_str, v) -> context_str[#context_str+1] = v
Impact: high
Show code
table.insert(context_str, clr .. remove_name(k) .. " (" .. v .. "%)")
L35 🟢 table_insert_append
table.insert(context_action, v) -> context_action[#context_action+1] = v
Impact: high
Show code
table.insert(context_action, "remove_part")
L36 🟢 table_insert_append
table.insert(context_params, v) -> context_params[#context_params+1] = v
Impact: high
Show code
table.insert(context_params, { obj:id(), k, v })
L42 🟢 table_insert_append
table.insert(context_str, v) -> context_str[#context_str+1] = v
Impact: high
Show code
table.insert(context_str, remove_name(nil))
L43 🟢 table_insert_append
table.insert(context_action, v) -> context_action[#context_action+1] = v
Impact: high
Show code
table.insert(context_action, "remove_part")
L44 🟢 table_insert_append
table.insert(context_params, v) -> context_params[#context_params+1] = v
Impact: high
Show code
table.insert(context_params, { obj:id(), k, v })

Log spam remover

1 file (🟢6 🟡14 🔴18 🔵56)

_g.script

L2304 🟢 table_insert_append
table.insert(t, v) -> t[#t+1] = v
Impact: high
Show code
table.insert(t, se_obj)
L1858 🟢 uncached_globals_summary
Cache 2 globals in store_table
Impact: medium
Show code
L1867: type L1870: type L1868: tostring L1871: tostring
L3312 🟢 uncached_globals_summary
Cache 1 globals in update_best_weapon
Impact: medium
Show code
L3413: tonumber L3414: tonumber
L712 🟢 repeated_get_console
get_console called 4x in get_console_cmd
Impact: low
Show code
local console = get_console()
L2089 🟢 repeated_alife
alife called 3x in alife_create
Impact: low
Show code
local sim = alife()
L3302 🟢 repeated_level_name
level.name called 3x in get_player_level_id
Impact: low
Show code
local level_name = level.name()
L76 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("S.T.A.L.K.E.R. Anomaly version %s",GAME_VERSION)
L79 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("using marshal library")
L594 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: Trying to load scheme that does not exist! %s",filename)
L627 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(fmt,...)
L631 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
if DEV_DEBUG then printf(fmt,...) end
L652 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log(fmt)
L693 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log( "STACK TRACEBACK: " .. str )
L696 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log( "~ ------------------------------------------------------------------------" )
L697 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log( "~ STACK TRACEBACK:" )
L698 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log( str )
L699 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log( "~ ------------------------------------------------------------------------" )
L707 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR exec_console_cmd | missing command")
L724 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR exec_console_cmd | missing command")
L877 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR str_explode | missing parameter str = %s, sep = %s",str,sep)
L1054 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: get_clsid - obj is nil!")
L1059 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: no clsid method for %s",obj:name())
L1127 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!ERROR set_save_marker:%s: WARNING! may be this is problem save point dif=%s",prefix,dif)
L1134 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!ERROR set_save_marker:%s: INCORRECT LOAD dif=%s c_dif=%s", prefix, dif, c_dif)
L1384 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~IsMoveState | state {%s) not found ", state)
L1409 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("# reload_system_ini")
L1411 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! reload_system_ini is not supported in engine")
L1471 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: section [%s] don't exist! Reading from section: %s - value: %s", result, s, k)
L1523 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: section [%s] don't exist! Reading from section: %s - value: %s", result, s, k)
L1678 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR SYS_GetParam(%s, %s, %s) | What's missing?", typ, sec, param)
L1865 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."{")
L1868 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = ", tostring(k))
L1871 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = \"func\",", tostring(k))
L1873 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = \"userdata\",", tostring(k))
L1875 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = \"%s\",", tostring(k), tostring(v))
L1877 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s,", tostring(k), tostring(v))
L1880 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."},")
L2025 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ALIFE OBJECT ID IS %s!",id)
L2069 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: alife_create | invalid usedata type")
L2077 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: alife_create | section [%s] is invalid!",sec)
L2081 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: invalid parameter for alife():create!",sec)
L2099 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: alife_create | failed to create object [%s]!",sec)
L2168 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: alife_release | no server object!")
L2174 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ alife_release [%s] (%s) | %s", se_obj:section_name(), se_obj.id, msg)
L2210 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: alife_release_id | no id passed!")
L2220 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: alife_clone_weapon | no server object passed!")
L2275 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("~WARNING alife ID storage is almost filled: %s", _ALIFE_CNT)
L2369 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR get_object_by_id | id (%s) is invalid", id)
L2379 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR get_object_by_id | no game object recieved from id (%s)", id)
L2534 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!save_var: Warning: no db.storage for %s, db.storage is for online objects only",id)
L2545 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!save_var: not registered type '%s' encountered [name=%s varname=%s ]", tv,obj:name(),varname)
L2551 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!WARNING: save_var ONLY USE LUA DATA TYPES!!! %s",varname)
L2561 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("load_var failed for %s", varname)
L2566 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!load_var: Warning: no db.storage for %s, db.storage is for online objects only", id)
L2580 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!save_ctime: Warning: no db.storage for %s, db.storage is for online objects only",id)
L2599 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!load_var: Warning: no db.storage for %s, db.storage is for online objects only",id)
L2711 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!ERROR SetEvent | no key is passed")
L2718 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~WARNING SetEvent | key: %s has value (%s) that got overwritten with a new table", k, _EVENT[k])
L2724 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!ERROR SetEvent | invalid arguments | k: %s - v: %s", k, v1)
L3291 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('a command named "%s" already exists', name)
L3420 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('%s online object is not available, %s will choose gun from engine', se_gun:name(), npc:name())
L3424 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('%s does not point to a valid gun in npc inventory, %s will choose gun from engine', flags.gun_id, npc:name())
L45 🔴 global_write
Global write: marshal
Impact: low
Show code
marshal = require "marshal"
L50 🔴 global_write
Global write: ini_sys
Impact: low
Show code
ini_sys = system_ini() -- global use for cached system_ini()
L53 🔴 global_write
Global write: mus_vol
Impact: low
Show code
mus_vol = 0 -- Used for temp sound muting
L54 🔴 global_write
Global write: amb_vol
Impact: low
Show code
amb_vol = 0 -- Used for temp sound muting
L55 🔴 global_write
Global write: timer_transparent
Impact: low
Show code
timer_transparent = 0 --ìàñêõàëàò
L501 🔴 global_write
Global write: lvl
Impact: low
Show code
lvl = sim:level_name(cvertex:level_id())
L590 🔴 global_write
Global write: schemes
Impact: low
Show code
schemes = {}
L591 🔴 global_write
Global write: schemes_by_stype
Impact: low
Show code
schemes_by_stype = {}
L737 🔴 global_write
Global write: time_infinite
Impact: low
Show code
time_infinite = 100000000
L1358 🔴 global_write
Global write: actor_move_states
Impact: low
Show code
actor_move_states = {
L1408 🔴 global_write
Global write: ini_sys
Impact: low
Show code
ini_sys = system_ini()
L1932 🔴 global_write
Global write: BoneID
Impact: low
Show code
BoneID = {
L1959 🔴 global_write
Global write: HitTypeID
Impact: low
Show code
HitTypeID = {
L1973 🔴 global_write
Global write: BoosterID
Impact: low
Show code
BoosterID = {
L2322 🔴 global_write
Global write: is_squad_monster
Impact: low
Show code
is_squad_monster = {
L2332 🔴 global_write
Global write: squad_community_by_behaviour
Impact: low
Show code
squad_community_by_behaviour = {
L3098 🔴 global_write
Global write: grenade_classes
Impact: low
Show code
grenade_classes = {
L3289 🔴 global_write
Global write: cmd
Impact: low
Show code
cmd = debug_cmd_list.command_get_list()
L525 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check (auto-fixable)
Impact: low
Show code
sim:teleport_object(squad.id,gvid,lvid,pos)
L531 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
sim:teleport_object(k.id,gvid,lvid,pos)
L554 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local actor_gv = game_graph():vertex( sim:actor().m_game_vertex_id )
L555 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
return actor_gv:level_id() ~= sim:level_id()
L2286 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
se_obj = sim:object(i)
L2298 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
t[#t+1] = sim:create_ammo(section, position, lvi, gvi, pid, num_in_box)
L2302 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:create_ammo(section, position, lvi, gvi, pid, num)
L2423 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = type(object.id) == "function" and sim:object(object:id())
L2424 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
return se_obj and se_obj.group_id ~= 65535 and sim:object(se_obj.group_id) or nil
L60 🟡 unused_local_variable
Local variable 'string_match' is assigned but never used
Impact: low
Show code
local string_match = string.match
L62 🟡 unused_local_variable
Local variable 'string_sub' is assigned but never used
Impact: low
Show code
local string_sub = string.sub
L71 🟡 unused_local_variable
Local variable 'math_ceil' is assigned but never used
Impact: low
Show code
local math_ceil = math.ceil
L923 🟡 unused_local_variable
Local variable 'nam' is assigned but never used
Impact: low
Show code
local key, nam = nil, nil
L1602 🟡 unused_local_variable
Local variable 'res' is assigned but never used
Impact: low
Show code
local res,id,val = self.ini:r_line(section,i,"","")

Looting takes time redux

1 file (🟢7 🟡1 🔴0 🔵7)

zzzz_loot_searching.script

L551 🟢 table_insert_append
table.insert(items, v) -> items[#items+1] = v
Impact: high
Show code
table.insert(items, {
L1151 🟢 table_insert_append
table.insert(new_items, v) -> new_items[#new_items+1] = v
Impact: high
Show code
table.insert(new_items, { id = item_id, obj = obj })
L773 🟢 uncached_globals_summary
Cache 1 globals in calc_search_time
Impact: medium
Show code
L793: math.min L795: math.min
L903 🟢 uncached_globals_summary
Cache 3 globals in update_silhouette_color_cache
Impact: medium
Show code
L908: math.floor L909: math.floor L911: math.max L912: math.max L911: math.min L912: math.min
L929 🟢 uncached_globals_summary
Cache 5 globals in ParseInventory
Impact: medium
Show code
L979: math.min L981: math.min L990: ipairs L1024: ipairs L994: math.random L1091: math.random L1049: pairs L1087: pairs L1297: type L1325: type
L1758 🟢 uncached_globals_summary
Cache 1 globals in hook_magazines_redux
Impact: medium
Show code
L1761: tostring L1762: tostring
L1298 🟢 repeated_obj_id()
obj:id() called 3x in ParseInventory
Impact: low
Show code
Cache obj:id() result
L1625 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str = str .. " ."
L230 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[LootTime] %s", msg)
L1760 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[LootTime] Checking for Magazines Redux: magazines=%s, inventory_refresh=%s",
L1767 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[LootTime] Magazines Redux detected, hooking inventory_refresh (block_sort=%s)", tostring(block_mags_redux_sort))
L1806 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[LootTime] Checking for Sorting Plus: rax_icon_layers=%s, refresh=%s",
L1813 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[LootTime] Sorting Plus detected, hooking rax_icon_layers.refresh")
L1844 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[LootTime] Checking for iTheon Autolooter: z_auto_looter=%s, auto_looter=%s",
L1851 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[LootTime] iTheon Autolooter detected, hooking auto_looter")

Looting_takes_time_

2 files (🟢1 🟡3 🔴1 🔵1)

loot_searching.script

L83 🟢 repeated_obj_id()
obj:id() called 3x in initial_items
Impact: low
Show code
Cache obj:id() result
L294 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str = str .. " ."
L55 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L132 🟡 potential_nil_access
Potential nil access: 'item' from level.object_by_id() used without nil check
Impact: low
Show code
local sec = item:section()
L165 🟡 potential_nil_access
Potential nil access: 'item' from level.object_by_id() used without nil check
Impact: low
Show code
local sec = item and item:section() or nil

loot_searching_mcm.script

L28 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "loot_searching",sh=true ,gr={

Lower_Weapon_Sprint_Optimized

2 files (🟢0 🟡5 🔴1 🔵0)

lower_weapon_sprint.script

L51 🟡 string_concat_in_loop
String concat in loop: blacklist_to_save = blacklist_to_save .. x
Impact: critical
Show code
blacklist_to_save = blacklist_to_save..k..","
L82 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
local sec = wpn:section()
L252 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
CreateTimeEvent("wait_for_animation_end", wpn:id(), 0, wait_for_animation_end, wpn)
L268 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
wpn:switch_state(0)
L297 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
local weaponState = wpn:get_state()

lower_weapon_sprint_mcm.script

L14 🔴 global_write
Global write: opt
Impact: low
Show code
opt = {

Momopate's Anti Savecum

1 file (🟢0 🟡0 🔴0 🔵5)

momopate_savescummer_v2.script

L149 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/// SAVESCUMMER: G.A.M.M.A. is loaded!")
L182 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/// SAVESCUMMER: HarukaSai's skill system is loaded!")
L216 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/// SAVESCUMMER: WPO is loaded!")
L220 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s", wpn:parent():id())
L245 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/// SAVESCUMMER: ZCP is loaded!")

Momopate's Barrel Condition Effects Display

1 file (🟢24 🟡13 🔴25 🔵4)

zzzz_arti_jamming_repairs.script

L256 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details, with_scope:sub(2))
L262 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details, scope)
L266 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details, sil)
L270 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details, gl)
L290 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details,spare_parts[i])
L301 🟢 table_insert_append
table.insert(upgr_tools, v) -> upgr_tools[#upgr_tools+1] = v
Impact: high
Show code
table.insert(upgr_tools,tool)
L306 🟢 table_insert_append
table.insert(result_details, v) -> result_details[#result_details+1] = v
Impact: high
Show code
table.insert(result_details,upgr_tools[i])
L733 🟢 table_insert_append
table.insert(context_str, v) -> context_str[#context_str+1] = v
Impact: high
Show code
table.insert(context_str, clr .. replace_name(k,false))
L734 🟢 table_insert_append
table.insert(context_action, v) -> context_action[#context_action+1] = v
Impact: high
Show code
table.insert(context_action, "replace_part")
L735 🟢 table_insert_append
table.insert(context_params, v) -> context_params[#context_params+1] = v
Impact: high
Show code
table.insert(context_params, {obj:id(), k, repair_kit:section(), false})
L738 🟢 table_insert_append
table.insert(context_str, v) -> context_str[#context_str+1] = v
Impact: high
Show code
table.insert(context_str, clr .. replace_name(k, true))
L739 🟢 table_insert_append
table.insert(context_action, v) -> context_action[#context_action+1] = v
Impact: high
Show code
table.insert(context_action, "clean_part")
L740 🟢 table_insert_append
table.insert(context_params, v) -> context_params[#context_params+1] = v
Impact: high
Show code
table.insert(context_params, {obj:id(), k, clean_kit:section(), true})
L742 🟢 table_insert_append
table.insert(context_str, v) -> context_str[#context_str+1] = v
Impact: high
Show code
table.insert(context_str, clr .. replace_name(k, true))
L743 🟢 table_insert_append
table.insert(context_action, v) -> context_action[#context_action+1] = v
Impact: high
Show code
table.insert(context_action, "replace_part")
L744 🟢 table_insert_append
table.insert(context_params, v) -> context_params[#context_params+1] = v
Impact: high
Show code
table.insert(context_params, {obj:id(), k, repair_kit:section(), true})
L839 🟢 table_insert_append
table.insert(context_str, v) -> context_str[#context_str+1] = v
Impact: high
Show code
table.insert(context_str, remove_name(k))
L840 🟢 table_insert_append
table.insert(context_action, v) -> context_action[#context_action+1] = v
Impact: high
Show code
table.insert(context_action, "remove_part")
L841 🟢 table_insert_append
table.insert(context_params, v) -> context_params[#context_params+1] = v
Impact: high
Show code
table.insert(context_params, {obj:id(), k, v})
L847 🟢 table_insert_append
table.insert(context_str, v) -> context_str[#context_str+1] = v
Impact: high
Show code
table.insert(context_str, remove_name(nil))
L848 🟢 table_insert_append
table.insert(context_action, v) -> context_action[#context_action+1] = v
Impact: high
Show code
table.insert(context_action, "remove_part")
L849 🟢 table_insert_append
table.insert(context_params, v) -> context_params[#context_params+1] = v
Impact: high
Show code
table.insert(context_params, {obj:id(), k, v})
L55 🟢 uncached_globals_summary
Cache 1 globals in weapon_eval_parts
Impact: medium
Show code
L70: math.random L71: math.random
L735 🟢 repeated_obj_id()
obj:id() called 3x in init_maintenance_menu
Impact: low
Show code
Cache obj:id() result
L615 🟡 string_concat_in_loop
String concat in loop: display_str = display_str .. x
Impact: critical
Show code
display_str = display_str .. process_part(k, v)
L878 🟡 string_concat_in_loop
String concat in loop: str_msg = str_msg .. x
Impact: critical
Show code
str_msg = str_msg .. "\\n -" .. ui_item.get_sec_name(k)
L192 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ item_parts timer | no owner found")
L242 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ item_parts | no owner found for [%s]", obj:name())
L451 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR UIWorkshopRepair:Repair() | can't discharge toolkit with id (%s). Object not found!", self.toolkit_pick[i])
L469 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopRepair:Repair() | object with id (%s) is either not found. Or didn't register new condition (%s)!", id, final_con)
L7 🔴 global_write
Global write: gc
Impact: low
Show code
gc = game.translate_string
L8 🔴 global_write
Global write: has_parts
Impact: low
Show code
has_parts = arti_jamming.has_parts
L9 🔴 global_write
Global write: is_part
Impact: low
Show code
is_part = arti_jamming.is_part
L10 🔴 global_write
Global write: print_dbg
Impact: low
Show code
print_dbg = arti_jamming.print_dbg
L11 🔴 global_write
Global write: print_ws
Impact: low
Show code
print_ws = ui_workshop.print_ws
L12 🔴 global_write
Global write: get_config
Impact: low
Show code
get_config = a_arti_jamming_mcm.get_config
L13 🔴 global_write
Global write: math_floor
Impact: low
Show code
math_floor = math.floor
L14 🔴 global_write
Global write: current_id
Impact: low
Show code
current_id = arti_jamming.current_id
L15 🔴 global_write
Global write: reset_cgd
Impact: low
Show code
reset_cgd = arti_jamming.reset_cgd
L16 🔴 global_write
Global write: SetTip
Impact: low
Show code
SetTip = ui_workshop.SetTip
L82 🔴 global_write
Global write: EvaluateParts
Impact: low
Show code
EvaluateParts = item_parts.evaluate_parts
L220 🔴 global_write
Global write: DisassemblyWeapon
Impact: low
Show code
DisassemblyWeapon = item_parts.disassembly_weapon
L330 🔴 global_write
Global write: WorkshopReplacePart
Impact: low
Show code
WorkshopReplacePart = ui_workshop.UIWorkshopRepair.ReplacePart
L399 🔴 global_write
Global write: WorkshopRepair
Impact: low
Show code
WorkshopRepair = ui_workshop.UIWorkshopRepair.Repair
L495 🔴 global_write
Global write: HowMuch
Impact: low
Show code
HowMuch = inventory_upgrades_mp.how_much_repair
L506 🔴 global_write
Global write: quality_map
Impact: low
Show code
quality_map = {
L513 🔴 global_write
Global write: unique_mapping
Impact: low
Show code
unique_mapping = {
L524 🔴 global_write
Global write: name_mapping
Impact: low
Show code
name_mapping = {
L579 🔴 global_write
Global write: jam_prob
Impact: low
Show code
jam_prob = arti_jamming.get_jam_chance(wpn)
L581 🔴 global_write
Global write: clr
Impact: low
Show code
if jam_prob <= 5 then clr = clr_g
L582 🔴 global_write
Global write: clr
Impact: low
Show code
elseif jam_prob <= 10 then clr = clr_y
L583 🔴 global_write
Global write: clr
Impact: low
Show code
elseif jam_prob <= 20 then clr = clr_o
L584 🔴 global_write
Global write: clr
Impact: low
Show code
else clr = clr_r end
L586 🔴 global_write
Global write: jam_prob
Impact: low
Show code
jam_prob = tonumber(string.format("%.0f", jam_prob))
L601 🔴 global_write
Global write: original_build_desc_header
Impact: low
Show code
original_build_desc_header = ui_item.build_desc_header
L326 🟡 potential_nil_access
Potential nil access: 'npc' from :parent() used without nil check
Impact: low
Show code
CreateTimeEvent(0,"delay_disassembly" .. id, delay, timer_disassembly_weapon, npc:id(), result_details, result_conditions, name)
L699 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check (auto-fixable)
Impact: low
Show code
wpn:set_condition( clamp(wpn:condition() + 0.1, 0, 0.999) )
L699 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check (auto-fixable)
Impact: low
Show code
wpn:set_condition( clamp(wpn:condition() + 0.1, 0, 0.999) )
L868 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
wpn:force_unload_magazine(true)
L6 🟡 unused_local_variable
Local variable 'parts_info' is assigned but never used
Impact: low
Show code
local parts_info = {}
L88 🟡 unused_local_variable
Local variable 'm_con' is assigned but never used
Impact: low
Show code
local m_con = math.ceil(obj:condition() * 100) -- default condition of the item
L117 🟡 unused_local_variable
Local variable 'temp_con' is assigned but never used
Impact: low
Show code
local temp_con = {}
L248 🟡 unused_local_variable
Local variable 'get_ammo' is assigned but never used
Impact: low
Show code
local get_ammo = {}
L412 🟡 unused_local_variable
Local variable 'sim' is assigned but never used
Impact: low
Show code
local sim = alife()
L499 🟡 unused_local_variable
Local variable 'class' is assigned but never used
Impact: low
Show code
local class = ini_sys:r_string_ex(item_name, "class")
L534 🟡 unused_local_variable
Local variable 'math_ceil' is assigned but never used
Impact: low
Show code
local math_ceil = math.ceil

Momopate's Detailed Weapon Stats

2 files (🟢2 🟡1 🔴4 🔵1)

ish_item_stats.script

L189 🔴 global_write
Global write: Base_UIInfoItem_Update
Impact: low
Show code
Base_UIInfoItem_Update = nil
L236 🔴 global_write
Global write: Base_UIInfoItem_Update
Impact: low
Show code
Base_UIInfoItem_Update = utils_ui.UIInfoItem.Update
L147 🟡 unused_local_variable
Local variable 'c_arty' is assigned but never used
Impact: low
Show code
local c_arty = artefact and obj:cast_Artefact()

momopate_weaponstats.script

L62 🟢 uncached_globals_summary
Cache 1 globals in get_weapon_recoil
Impact: medium
Show code
L82: tonumber L91: tonumber
L98 🟢 repeated_obj_id()
obj:id() called 4x in get_weapon_recoil
Impact: low
Show code
Cache obj:id() result
L73 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!!! no effects exist for %s", sec_p)
L135 🔴 global_write
Global write: end_recoil
Impact: low
Show code
end_recoil = recoil_b * recoil_s * recoil_e * 100.0
L136 🔴 global_write
Global write: final_recoil
Impact: low
Show code
final_recoil = (450 + end_recoil * 5.0) / end_recoil * 5.0

Momopate's Improved Pulses

1 file (🟢0 🟡0 🔴4 🔵0)

pulse_vortex_consistency_fix.script

L5 🔴 global_write
Global write: sm_power
Impact: low
Show code
sm_power = surge_manager.CSurgeManager.hit_power
L23 🔴 global_write
Global write: baf_pulse
Impact: low
Show code
baf_pulse = bind_anomaly_field.pulse_anomaly_hit
L85 🔴 global_write
Global write: psm_vortex_hit
Impact: low
Show code
psm_vortex_hit = psi_storm_manager.CPsiStormManager.vortex_actor_hit
L132 🔴 global_write
Global write: psm_initialize
Impact: low
Show code
psm_initialize = psi_storm_manager.CPsiStormManager.initialize

Momopate's Loot Stabilizer

1 file (🟢0 🟡6 🔴0 🔵5)

momopate_savescummer_v2.script

L45 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ MASS: Context [%s]", context and context or "Unknown or undefined")
L49 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ MASS: Actor ID was used!")
L54 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ MASS: RNG Seed [%s] is blacklisted!", seed)
L63 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ MASS: RNG Seed [%s] chosen!", seed)
L259 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/// SAVESCUMMER: WPO is loaded!")
L73 🟡 unused_local_variable
Local variable 'make_loot' is assigned but never used
Impact: low
Show code
local make_loot = death_manager.create_release_item -- Main loot function
L80 🟡 unused_local_variable
Local variable 'khajiit_act' is assigned but never used
Impact: low
Show code
local khajiit_act = item_money.actor_on_loot_money -- Money (it)
L81 🟡 unused_local_variable
Local variable 'khajiit_npc' is assigned but never used
Impact: low
Show code
local khajiit_npc = item_money.npc_on_loot_money -- Money (had)
L82 🟡 unused_local_variable
Local variable 'khajiit_get' is assigned but never used
Impact: low
Show code
local khajiit_get = item_money.actor_on_item_use -- Money (tons of RNG)
L83 🟡 unused_local_variable
Local variable 'vigilant' is assigned but never used
Impact: low
Show code
local vigilant = item_parts.disassembly_item -- Vigilant Recycler patch
L84 🟡 unused_local_variable
Local variable 'outfitter' is assigned but never used
Impact: low
Show code
local outfitter = item_parts.evaluate_parts -- Outfit parts, maybe

NPC_Limping_and_Healing

4 files (🟢1 🟡4 🔴20 🔵19)

axr_light_wound.script

L45 🟢 repeated_npc_id()
npc:id() called 8x in npc_on_update
Impact: low
Show code
Cache npc:id() result
L18 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("wrong movement type %s", npc:movement_type())
L22 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("wrong mental state %s", npc:mental_state())
L26 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("wrong body state %s", npc:body_state())
L30 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("wrong state %s", state_mgr.get_state(npc))
L34 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("too much hp")
L37 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("all okay")
L3 🔴 global_write
Global write: limping_npcs
Impact: low
Show code
limping_npcs={}
L4 🔴 global_write
Global write: limp_health_threshold
Impact: low
Show code
limp_health_threshold = 0.65
L12 🔴 global_write
Global write: modenable
Impact: low
Show code
modenable = medkit_bandage_heal_mcm.get_config("enable")
L13 🔴 global_write
Global write: limp_health_threshold
Impact: low
Show code
limp_health_threshold = medkit_bandage_heal_mcm.get_config("limp_health_thres")

axr_otheal.script

L56 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[NPC HEALING] wounded")
L64 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[NPC HEALING] has enemy")
L71 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[NPC HEALING] not free %s", npc:mental_state())
L78 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[NPC HEALING] not standing %s", npc:body_state())
L85 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[NPC HEALING] in danger")
L105 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[NPC HEALING] no bandages")
L121 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[NPC HEALING] no medkit")
L137 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[NPC HEALING] init healing")
L154 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[NPC HEALING] medkit")
L165 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[NPC HEALING] fin")
L178 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[NPC HEALING] bandage")
L189 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[NPC HEALING] fin")
L205 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[NPC HEALING]finalize")
L4 🔴 global_write
Global write: actid
Impact: low
Show code
actid = 188124
L5 🔴 global_write
Global write: evaid
Impact: low
Show code
evaid = 188124
L19 🔴 global_write
Global write: modenable
Impact: low
Show code
modenable = true
L20 🔴 global_write
Global write: allow_bandage
Impact: low
Show code
allow_bandage = true
L21 🔴 global_write
Global write: allow_medkit
Impact: low
Show code
allow_medkit = true
L22 🔴 global_write
Global write: medkit_health_threshold
Impact: low
Show code
medkit_health_threshold = 0.65
L23 🔴 global_write
Global write: enable_cheat
Impact: low
Show code
enable_cheat = false
L24 🔴 global_write
Global write: debug
Impact: low
Show code
debug = false
L27 🔴 global_write
Global write: modenable
Impact: low
Show code
modenable = medkit_bandage_heal_mcm.get_config("enable")
L28 🔴 global_write
Global write: allow_bandage
Impact: low
Show code
allow_bandage = medkit_bandage_heal_mcm.get_config("enablebandage")
L29 🔴 global_write
Global write: allow_medkit
Impact: low
Show code
allow_medkit = medkit_bandage_heal_mcm.get_config("enablemedkit")
L30 🔴 global_write
Global write: medkit_health_threshold
Impact: low
Show code
medkit_health_threshold = medkit_bandage_heal_mcm.get_config("med_health_thres")
L31 🔴 global_write
Global write: enable_cheat
Impact: low
Show code
enable_cheat = medkit_bandage_heal_mcm.get_config("cheatnpc")
L32 🔴 global_write
Global write: debug
Impact: low
Show code
debug = medkit_bandage_heal_mcm.get_config("enabledebug")
L230 🟡 potential_nil_access
Potential nil access: 'manager' from :motivation_action_manager() used without nil check
Impact: low
Show code
manager:add_evaluator(evaid,property_evaluator_const(false))
L232 🟡 potential_nil_access
Potential nil access: 'manager' from :motivation_action_manager() used without nil check
Impact: low
Show code
manager:add_evaluator(evaid,evaluator_npc_otheal(npc,"eva_npc_otheal",storage))
L245 🟡 potential_nil_access
Potential nil access: 'manager' from :motivation_action_manager() used without nil check
Impact: low
Show code
manager:add_action(actid,temp.action)
L261 🟡 potential_nil_access
Potential nil access: 'manager' from :motivation_action_manager() used without nil check
Impact: low
Show code
action = manager:action(p[i])

medkit_bandage_heal_mcm.script

L19 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "healmed",sh=true ,gr={

state_mgr_animation_list.script

L1 🔴 global_write
Global write: animations
Impact: low
Show code
animations = {

NPCs_Die_in_Anomalies_

1 file (🟢0 🟡0 🔴1 🔵0)

z_npc_die_in_anomalies.script

L14 🔴 global_write
Global write: death_chance
Impact: low
Show code
death_chance = rank_to_val[ranks.get_se_obj_rank_name(npc)]

New Tasks - iTheon (fixed by Priler)

2 files (🟢4 🟡7 🔴11 🔵2)

tasks_baba_yaga.script

L285 🔴 global_write
Global write: scared_npcs
Impact: low
Show code
scared_npcs = {}
L91 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local outfit = actor:item_in_slot(7)
L100 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local helm = actor:item_in_slot(12)
L109 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:iterate_belt(function(owner, obj)
L117 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:cast_Actor():conditions():BoosterForEach(function(booster_type, booster_time, booster_value)

ui_pda_taskboard_tab.script

L279 🟢 table_insert_append
table.insert(npc_list, v) -> npc_list[#npc_list+1] = v
Impact: high
Show code
table.insert(npc_list, obj)
L289 🟢 table_insert_append
table.insert(npc_list, v) -> npc_list[#npc_list+1] = v
Impact: high
Show code
table.insert(npc_list, npc)
L342 🟢 table_insert_append
table.insert(result[task_effect], v) -> result[task_effect][#result[task_effect]+1] = v
Impact: high
Show code
table.insert(result[task_effect], {
L539 🟢 table_insert_append
table.insert(result, v) -> result[#result+1] = v
Impact: high
Show code
table.insert(result, key)
L209 🔵 debug_statement
Debug call: print()
Impact: medium
Show code
print("Warning: entry_info is nil for row_index:", row_index)
L214 🔵 debug_statement
Debug call: print()
Impact: medium
Show code
print("Warning: prev_task is nil for row_index:", row_index)
L124 🔴 global_write
Global write: currently_processed_npc_id
Impact: low
Show code
currently_processed_npc_id = nil -- required for fetch quest override
L126 🔴 global_write
Global write: currently_processed_npc_id
Impact: low
Show code
currently_processed_npc_id = task_data.npc_id
L141 🔴 global_write
Global write: currently_processed_npc_id
Impact: low
Show code
currently_processed_npc_id = nil
L164 🔴 global_write
Global write: currently_processed_npc_id
Impact: low
Show code
currently_processed_npc_id = task_details.npc_id
L166 🔴 global_write
Global write: currently_processed_npc_id
Impact: low
Show code
currently_processed_npc_id = nil
L312 🔴 global_write
Global write: currently_processed_npc_id
Impact: low
Show code
currently_processed_npc_id = npc:id()
L318 🔴 global_write
Global write: currently_processed_npc_id
Impact: low
Show code
currently_processed_npc_id = nil
L547 🔴 global_write
Global write: normalizer
Impact: low
Show code
normalizer = {
L569 🔴 global_write
Global write: config
Impact: low
Show code
config = load_defaults()
L572 🔴 global_write
Global write: config
Impact: low
Show code
config = load_defaults()
L384 🟡 potential_nil_access
Potential nil access: 'stalker' from level.object_by_id() used without nil check
Impact: low
Show code
local stalker_comm = stalker:character_community()
L385 🟡 potential_nil_access
Potential nil access: 'stalker' from level.object_by_id() used without nil check
Impact: low
Show code
local stalker_icon = stalker:character_icon()
L386 🟡 potential_nil_access
Potential nil access: 'stalker' from level.object_by_id() used without nil check
Impact: low
Show code
local stalker_name = stalker:character_name()

New_Recoil

2 files (🟢1 🟡4 🔴16 🔵1)

new_recoil_eff.script

L182 🟢 uncached_globals_summary
Cache 3 globals in actor_on_update
Impact: medium
Show code
L203: math.abs L215: math.abs L248: math.cos L249: math.cos L248: math.sin L249: math.sin
L569 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[VodoXleb Recoil] "..msg, ...)
L3 🔴 global_write
Global write: mod_enabled
Impact: low
Show code
mod_enabled = true
L6 🔴 global_write
Global write: r_const
Impact: low
Show code
r_const = {
L12 🔴 global_write
Global write: r_vars
Impact: low
Show code
r_vars = {
L23 🔴 global_write
Global write: r_settings
Impact: low
Show code
r_settings = {
L47 🔴 global_write
Global write: r_bw_params
Impact: low
Show code
r_bw_params = {}
L77 🔴 global_write
Global write: mod_enabled
Impact: low
Show code
mod_enabled = new_recoil_mcm.get_config("enable")
L246 🔴 global_write
Global write: x
Impact: low
Show code
x = new_ori[0]
L247 🔴 global_write
Global write: y
Impact: low
Show code
y = new_ori[1]
L271 🔴 global_write
Global write: cwpn
Impact: low
Show code
cwpn = wpn and wpn:cast_Weapon()
L281 🔴 global_write
Global write: cwpn
Impact: low
Show code
cwpn = wpn and wpn:cast_Weapon()
L303 🔴 global_write
Global write: value1
Impact: low
Show code
value1 = SYS_GetParam(0,hud_sec, "aim_hud_offset_alt_rot_16x9")
L304 🔴 global_write
Global write: value1
Impact: low
Show code
if not value1 then value1 = SYS_GetParam(0,hud_sec, "aim_hud_offset_alt_rot")end
L309 🔴 global_write
Global write: value2
Impact: low
Show code
value2 = SYS_GetParam(0,hud_sec, "gl_hud_offset_rot_16x9")
L310 🔴 global_write
Global write: value2
Impact: low
Show code
if not value2 then value2 = SYS_GetParam(0,hud_sec, "gl_hud_offset_rot")end
L363 🔴 global_write
Global write: r_bw_params
Impact: low
Show code
r_bw_params = {}
L124 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
local sec = wpn:section()
L125 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if wpn:id() ~= r_vars.old_id then
L196 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
local sec = wpn:section()
L197 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if wpn:id() ~= r_vars.old_id then

new_recoil_mcm.script

L35 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "new_recoil",sh=true ,gr={

New_zone_junk

2 files (🟢60 🟡2 🔴0 🔵0)

datas_new_junk.script

L45 🟢 uncached_globals_summary
Cache 1 globals in nj_give_phone
Impact: medium
Show code
L48: math.random L50: math.random
L89 🟢 uncached_globals_summary
Cache 1 globals in nj_give_equip
Impact: medium
Show code
L92: math.random L94: math.random
L157 🟢 uncached_globals_summary
Cache 1 globals in nj_give_junk_gar
Impact: medium
Show code
L160: math.random L162: math.random
L184 🟢 uncached_globals_summary
Cache 1 globals in nj_give_junk_sid
Impact: medium
Show code
L187: math.random L189: math.random
L211 🟢 uncached_globals_summary
Cache 1 globals in nj_give_junk_nov
Impact: medium
Show code
L214: math.random L216: math.random
L238 🟢 uncached_globals_summary
Cache 1 globals in nj_give_junk_nit
Impact: medium
Show code
L241: math.random L243: math.random
L467 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_sid_give_duty
Impact: medium
Show code
L470: math.random L472: math.random
L478 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_sid_give_freedom
Impact: medium
Show code
L481: math.random L483: math.random
L489 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_sid_give_merc
Impact: medium
Show code
L492: math.random L494: math.random
L500 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_sid_give_isg
Impact: medium
Show code
L503: math.random L505: math.random
L511 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_sid_give_maps
Impact: medium
Show code
L514: math.random L516: math.random
L524 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_sid_give_flash
Impact: medium
Show code
L527: math.random L529: math.random
L544 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_voronin_give_duty
Impact: medium
Show code
L547: math.random L549: math.random
L555 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_voronin_give_freedom
Impact: medium
Show code
L558: math.random L560: math.random
L566 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_voronin_give_merc
Impact: medium
Show code
L569: math.random L571: math.random
L577 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_voronin_give_isg
Impact: medium
Show code
L580: math.random L582: math.random
L588 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_voronin_give_maps
Impact: medium
Show code
L591: math.random L593: math.random
L601 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_voronin_give_flash
Impact: medium
Show code
L604: math.random L606: math.random
L621 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_lukash_give_duty
Impact: medium
Show code
L624: math.random L626: math.random
L632 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_lukash_give_freedom
Impact: medium
Show code
L635: math.random L637: math.random
L643 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_lukash_give_merc
Impact: medium
Show code
L646: math.random L648: math.random
L654 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_lukash_give_isg
Impact: medium
Show code
L657: math.random L659: math.random
L665 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_lukash_give_maps
Impact: medium
Show code
L668: math.random L670: math.random
L678 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_lukash_give_flash
Impact: medium
Show code
L681: math.random L683: math.random
L698 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_kuznetsov_give_duty
Impact: medium
Show code
L701: math.random L703: math.random
L709 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_kuznetsov_give_freedom
Impact: medium
Show code
L712: math.random L714: math.random
L720 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_kuznetsov_give_merc
Impact: medium
Show code
L723: math.random L725: math.random
L731 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_kuznetsov_give_isg
Impact: medium
Show code
L734: math.random L736: math.random
L742 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_kuznetsov_give_maps
Impact: medium
Show code
L745: math.random L747: math.random
L755 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_kuznetsov_give_flash
Impact: medium
Show code
L758: math.random L760: math.random
L775 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_snitch_give_duty
Impact: medium
Show code
L778: math.random L780: math.random
L786 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_snitch_give_freedom
Impact: medium
Show code
L789: math.random L791: math.random
L797 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_snitch_give_merc
Impact: medium
Show code
L800: math.random L802: math.random
L808 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_snitch_give_isg
Impact: medium
Show code
L811: math.random L813: math.random
L819 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_snitch_give_maps
Impact: medium
Show code
L822: math.random L824: math.random
L832 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_snitch_give_flash
Impact: medium
Show code
L835: math.random L837: math.random
L853 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_sultan_give_duty
Impact: medium
Show code
L856: math.random L858: math.random
L864 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_sultan_give_freedom
Impact: medium
Show code
L867: math.random L869: math.random
L875 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_sultan_give_merc
Impact: medium
Show code
L878: math.random L880: math.random
L886 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_sultan_give_isg
Impact: medium
Show code
L889: math.random L891: math.random
L897 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_sultan_give_maps
Impact: medium
Show code
L900: math.random L902: math.random
L910 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_sultan_give_flash
Impact: medium
Show code
L913: math.random L915: math.random
L930 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_cold_give_duty
Impact: medium
Show code
L933: math.random L935: math.random
L941 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_cold_give_freedom
Impact: medium
Show code
L944: math.random L946: math.random
L952 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_cold_give_merc
Impact: medium
Show code
L955: math.random L957: math.random
L963 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_cold_give_isg
Impact: medium
Show code
L966: math.random L968: math.random
L974 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_cold_give_maps
Impact: medium
Show code
L977: math.random L979: math.random
L987 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_cold_give_flash
Impact: medium
Show code
L990: math.random L992: math.random
L1008 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_dushman_give_duty
Impact: medium
Show code
L1011: math.random L1013: math.random
L1019 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_dushman_give_freedom
Impact: medium
Show code
L1022: math.random L1024: math.random
L1030 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_dushman_give_merc
Impact: medium
Show code
L1033: math.random L1035: math.random
L1041 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_dushman_give_isg
Impact: medium
Show code
L1044: math.random L1046: math.random
L1052 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_dushman_give_maps
Impact: medium
Show code
L1055: math.random L1057: math.random
L1065 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_dushman_give_flash
Impact: medium
Show code
L1068: math.random L1070: math.random
L1085 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_owl_give_duty
Impact: medium
Show code
L1088: math.random L1090: math.random
L1096 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_owl_give_freedom
Impact: medium
Show code
L1099: math.random L1101: math.random
L1107 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_owl_give_merc
Impact: medium
Show code
L1110: math.random L1112: math.random
L1118 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_owl_give_isg
Impact: medium
Show code
L1121: math.random L1123: math.random
L1129 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_owl_give_maps
Impact: medium
Show code
L1132: math.random L1134: math.random
L1142 🟢 uncached_globals_summary
Cache 1 globals in nj_intel_want_owl_give_flash
Impact: medium
Show code
L1145: math.random L1147: math.random
L1 🟡 unused_local_variable
Local variable 'nj_cache_tbl' is assigned but never used
Impact: low
Show code
local nj_cache_tbl = {}

nj_dialogues.script

L266 🟡 unused_local_variable
Local variable 'res' is assigned but never used
Impact: low
Show code
local res = dialog_list:add("nj_intel_want_owl")

No BNVG FDDA Redone Patch

2 files (🟢3 🟡14 🔴19 🔵2)

item_device.script

L220 🟢 uncached_globals_summary
Cache 1 globals in on_key_release
Impact: medium
Show code
L247: math.floor L247: math.floor
L889 🟢 uncached_globals_summary
Cache 1 globals in process_flicker
Impact: medium
Show code
L901: math.random L902: math.random
L64 🟢 repeated_device
device called 4x in <global>
Impact: low
Show code
local dev = device()
L139 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR item_device | reading from items\\settings\\devices.ltx | section [%s] or power consumption values don't exist", sec)
L154 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("item_device | %s | " .. txt, time_global(), ...)
L18 🔴 global_write
Global write: dev_consumption
Impact: low
Show code
dev_consumption = {} -- [sec] = {...} | Power consumption of device per stage
L19 🔴 global_write
Global write: dev_consumption_act
Impact: low
Show code
dev_consumption_act = {} -- [sec] = {...} | Power consumption of device per action (stage 2)
L20 🔴 global_write
Global write: dev_consumption_tot
Impact: low
Show code
dev_consumption_tot = {} -- [sec] = num | Total power consumption of a device
L21 🔴 global_write
Global write: dev_critical
Impact: low
Show code
dev_critical = {} -- [sec] = num | Power limit, devices go off when their power go below this value
L40 🔴 global_write
Global write: devices
Impact: low
Show code
devices = {}
L41 🔴 global_write
Global write: device_battery
Impact: low
Show code
device_battery = nil
L42 🔴 global_write
Global write: device_geiger
Impact: low
Show code
device_geiger = nil
L43 🔴 global_write
Global write: device_npc_pda
Impact: low
Show code
device_npc_pda = {}
L61 🔴 global_write
Global write: nv_state
Impact: low
Show code
nv_state = false
L78 🔴 global_write
Global write: dosimeter_env_rads_mode
Impact: low
Show code
dosimeter_env_rads_mode = false
L93 🔴 global_write
Global write: device_battery
Impact: low
Show code
device_battery = ini_device:r_sec_ex("settings","battery","batteries_dead")
L94 🔴 global_write
Global write: device_geiger
Impact: low
Show code
device_geiger = ini_device:r_sec_ex("settings","geiger","detector_geiger")
L241 🔴 global_write
Global write: dosimeter_env_rads_mode
Impact: low
Show code
dosimeter_env_rads_mode = not dosimeter_env_rads_mode
L242 🔴 global_write
Global write: dosimeter_mode_string
Impact: low
Show code
dosimeter_mode_string = dosimeter_env_rads_mode and game.translate_string("st_environment_rads") or game.translate_string("st_actor_rads")
L593 🔴 global_write
Global write: nv_state
Impact: low
Show code
nv_state = true
L599 🔴 global_write
Global write: nv_state
Impact: low
Show code
nv_state = false
L233 🟡 potential_nil_access
Potential nil access: 'torch' from :item_in_slot() used without nil check
Impact: low
Show code
set_nightvision(torch and torch:section(), not nv_state)
L287 🟡 potential_nil_access
Potential nil access: 'pda' from :item_in_slot() used without nil check
Impact: low
Show code
if pda and (not temp_con[pda:id()]) then
L293 🟡 potential_nil_access
Potential nil access: 'det' from :item_in_slot() used without nil check
Impact: low
Show code
if det and (not temp_con[det:id()]) then
L299 🟡 potential_nil_access
Potential nil access: 'torch' from :item_in_slot() used without nil check
Impact: low
Show code
if torch and (not temp_con[torch:id()]) then
L310 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if (p and p:id() == AC_ID) then
L360 🟡 potential_nil_access
Potential nil access: 'obj' from :item_in_slot() used without nil check
Impact: low
Show code
if obj and IsItem("device",obj:section()) then
L367 🟡 potential_nil_access
Potential nil access: 'torch' from :item_in_slot() used without nil check
Impact: low
Show code
if torch and torch:torch_enabled() then
L421 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L432 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then
L525 🟡 potential_nil_access
Potential nil access: 'torch' from :item_in_slot() used without nil check
Impact: low
Show code
local id = torch and torch:id()
L569 🟡 potential_nil_access
Potential nil access: 'torch' from :item_in_slot() used without nil check
Impact: low
Show code
local torch_sec = torch and torch:section()
L632 🟡 potential_nil_access
Potential nil access: 'pda' from :item_in_slot() used without nil check
Impact: low
Show code
if actor_only and device_npc_pda[pda:section()] then
L695 🟡 potential_nil_access
Potential nil access: 'parent' from :parent() used without nil check
Impact: low
Show code
if parent and (parent:id() ~= AC_ID) then
L145 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, sec, value = ini_device:r_line_ex("npc_pda",i,"","")

z_vanilla_nvgs.script

L1 🔴 global_write
Global write: play_animation
Impact: low
Show code
play_animation = false
L24 🔴 global_write
Global write: play_animation
Impact: low
Show code
play_animation = false
L188 🔴 global_write
Global write: torch_anm_state
Impact: low
Show code
torch_anm_state = 0

No Inspection on Unjam

1 file (🟢0 🟡0 🔴0 🔵2)

zzz_prilers_no_inspect_on_unjam.script

L61 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("No Inspection Animation: arti_jamming not found, skipping patches")
L71 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("No Inspection Animation: Patches applied successfully")

No logs

1 file (🟢6 🟡14 🔴17 🔵56)

_g.script

L2275 🟢 table_insert_append
table.insert(t, v) -> t[#t+1] = v
Impact: high
Show code
table.insert(t, se_obj)
L1829 🟢 uncached_globals_summary
Cache 2 globals in store_table
Impact: medium
Show code
L1838: type L1841: type L1839: tostring L1842: tostring
L3262 🟢 uncached_globals_summary
Cache 1 globals in update_best_weapon
Impact: medium
Show code
L3363: tonumber L3364: tonumber
L708 🟢 repeated_get_console
get_console called 4x in get_console_cmd
Impact: low
Show code
local console = get_console()
L2060 🟢 repeated_alife
alife called 3x in alife_create
Impact: low
Show code
local sim = alife()
L3252 🟢 repeated_level_name
level.name called 3x in get_player_level_id
Impact: low
Show code
local level_name = level.name()
L76 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("S.T.A.L.K.E.R. Anomaly version %s",GAME_VERSION)
L79 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("using marshal library")
L590 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: Trying to load scheme that does not exist! %s",filename)
L623 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(fmt,...)
L627 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
if DEV_DEBUG then printf(fmt,...) end
L648 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log(fmt)
L689 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log( "STACK TRACEBACK: " .. str )
L692 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log( "~ ------------------------------------------------------------------------" )
L693 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log( "~ STACK TRACEBACK:" )
L694 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log( str )
L695 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log( "~ ------------------------------------------------------------------------" )
L703 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR exec_console_cmd | missing command")
L720 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR exec_console_cmd | missing command")
L876 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR str_explode | missing parameter str = %s, sep = %s",str,sep)
L1053 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: get_clsid - obj is nil!")
L1058 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: no clsid method for %s",obj:name())
L1126 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!ERROR set_save_marker:%s: WARNING! may be this is problem save point dif=%s",prefix,dif)
L1133 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!ERROR set_save_marker:%s: INCORRECT LOAD dif=%s c_dif=%s", prefix, dif, c_dif)
L1360 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~IsMoveState | state {%s) not found ", state)
L1385 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("# reload_system_ini")
L1387 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! reload_system_ini is not supported in engine")
L1447 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: section [%s] don't exist! Reading from section: %s - value: %s", result, s, k)
L1499 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: section [%s] don't exist! Reading from section: %s - value: %s", result, s, k)
L1654 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR SYS_GetParam(%s, %s, %s) | What's missing?", typ, sec, param)
L1836 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."{")
L1839 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = ", tostring(k))
L1842 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = \"func\",", tostring(k))
L1844 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = \"userdata\",", tostring(k))
L1846 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = \"%s\",", tostring(k), tostring(v))
L1848 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s,", tostring(k), tostring(v))
L1851 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."},")
L1996 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ALIFE OBJECT ID IS %s!",id)
L2040 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: alife_create | invalid usedata type")
L2048 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: alife_create | section [%s] is invalid!",sec)
L2052 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: invalid parameter for alife():create!",sec)
L2070 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: alife_create | failed to create object [%s]!",sec)
L2139 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: alife_release | no server object!")
L2145 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ alife_release [%s] (%s) | %s", se_obj:section_name(), se_obj.id, msg)
L2181 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: alife_release_id | no id passed!")
L2191 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: alife_clone_weapon | no server object passed!")
L2246 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("~WARNING alife ID storage is almost filled: %s", _ALIFE_CNT)
L2340 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR get_object_by_id | id (%s) is invalid", id)
L2350 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR get_object_by_id | no game object recieved from id (%s)", id)
L2505 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!save_var: Warning: no db.storage for %s, db.storage is for online objects only",id)
L2516 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!save_var: not registered type '%s' encountered [name=%s varname=%s ]", tv,obj:name(),varname)
L2522 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!WARNING: save_var ONLY USE LUA DATA TYPES!!! %s",varname)
L2532 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("load_var failed for %s", varname)
L2537 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!load_var: Warning: no db.storage for %s, db.storage is for online objects only", id)
L2551 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!save_ctime: Warning: no db.storage for %s, db.storage is for online objects only",id)
L2570 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!load_var: Warning: no db.storage for %s, db.storage is for online objects only",id)
L2682 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!ERROR SetEvent | no key is passed")
L2689 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~WARNING SetEvent | key: %s has value (%s) that got overwritten with a new table", k, _EVENT[k])
L2695 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!ERROR SetEvent | invalid arguments | k: %s - v: %s", k, v1)
L3241 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('a command named "%s" already exists', name)
L3366 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('%s does not point to a valid gun in npc inventory, %s will choose gun from engine', flags.gun_id, npc:name())
L3369 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('%s online object is not available, %s will choose gun from engine', se_gun:name(), npc:name())
L45 🔴 global_write
Global write: marshal
Impact: low
Show code
marshal = require "marshal"
L50 🔴 global_write
Global write: ini_sys
Impact: low
Show code
ini_sys = system_ini() -- global use for cached system_ini()
L53 🔴 global_write
Global write: mus_vol
Impact: low
Show code
mus_vol = 0 -- Used for temp sound muting
L54 🔴 global_write
Global write: amb_vol
Impact: low
Show code
amb_vol = 0 -- Used for temp sound muting
L55 🔴 global_write
Global write: timer_transparent
Impact: low
Show code
timer_transparent = 0 --���������
L497 🔴 global_write
Global write: lvl
Impact: low
Show code
lvl = sim:level_name(cvertex:level_id())
L586 🔴 global_write
Global write: schemes
Impact: low
Show code
schemes = {}
L587 🔴 global_write
Global write: schemes_by_stype
Impact: low
Show code
schemes_by_stype = {}
L733 🔴 global_write
Global write: time_infinite
Impact: low
Show code
time_infinite = 100000000
L1384 🔴 global_write
Global write: ini_sys
Impact: low
Show code
ini_sys = system_ini()
L1903 🔴 global_write
Global write: BoneID
Impact: low
Show code
BoneID = {
L1930 🔴 global_write
Global write: HitTypeID
Impact: low
Show code
HitTypeID = {
L1944 🔴 global_write
Global write: BoosterID
Impact: low
Show code
BoosterID = {
L2293 🔴 global_write
Global write: is_squad_monster
Impact: low
Show code
is_squad_monster = {
L2303 🔴 global_write
Global write: squad_community_by_behaviour
Impact: low
Show code
squad_community_by_behaviour = {
L3045 🔴 global_write
Global write: grenade_classes
Impact: low
Show code
grenade_classes = {
L3239 🔴 global_write
Global write: cmd
Impact: low
Show code
cmd = debug_cmd_list.command_get_list()
L521 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check (auto-fixable)
Impact: low
Show code
sim:teleport_object(squad.id,gvid,lvid,pos)
L527 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
sim:teleport_object(k.id,gvid,lvid,pos)
L550 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local actor_gv = game_graph():vertex( sim:actor().m_game_vertex_id )
L551 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
return actor_gv:level_id() ~= sim:level_id()
L2257 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
se_obj = sim:object(i)
L2269 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
t[#t+1] = sim:create_ammo(section, position, lvi, gvi, pid, num_in_box)
L2273 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:create_ammo(section, position, lvi, gvi, pid, num)
L2394 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = type(object.id) == "function" and sim:object(object:id())
L2395 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
return se_obj and se_obj.group_id ~= 65535 and sim:object(se_obj.group_id) or nil
L60 🟡 unused_local_variable
Local variable 'string_match' is assigned but never used
Impact: low
Show code
local string_match = string.match
L62 🟡 unused_local_variable
Local variable 'string_sub' is assigned but never used
Impact: low
Show code
local string_sub = string.sub
L71 🟡 unused_local_variable
Local variable 'math_ceil' is assigned but never used
Impact: low
Show code
local math_ceil = math.ceil
L922 🟡 unused_local_variable
Local variable 'nam' is assigned but never used
Impact: low
Show code
local key, nam = nil, nil
L1578 🟡 unused_local_variable
Local variable 'res' is assigned but never used
Impact: low
Show code
local res,id,val = self.ini:r_line(section,i,"","")

Oleh's Extended MovementSFX

4 files (🟢0 🟡0 🔴16 🔵2)

eft_jump_sounds.script

L187 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
flags.ret_value = false
L8 🔴 global_write
Global write: available_materials
Impact: low
Show code
available_materials = {
L45 🔴 global_write
Global write: fake_materials
Impact: low
Show code
["materials\\fake_ladders"] = "dirt_", -- невидимая лестница
L53 🔴 global_write
Global write: water_materials
Impact: low
Show code
["materials\\fake_ladders"] = true, -- невидимая лестница
L112 🔴 global_write
Global write: ray_cast_offsets
Impact: low

extended_movement_sounds_mcm.script

L2 🔴 global_write
Global write: op
Impact: low
Show code
op = {

freelook_state.script

L1 🔴 global_write
Global write: FreelookActive
Impact: low
Show code
FreelookActive = false
L7 🔴 global_write
Global write: FreelookActive
Impact: low
Show code
FreelookActive = true
L14 🔴 global_write
Global write: FreelookActive
Impact: low
Show code
FreelookActive = false

move_effects.script

L190 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L9 🔴 global_write
Global write: MovementAllowed
Impact: low
Show code
MovementAllowed = true
L173 🔴 global_write
Global write: MovementAllowed
Impact: low
Show code
RegisterScriptCallback("actor_on_climb_start", function() MovementAllowed = false end)
L174 🔴 global_write
Global write: MovementAllowed
Impact: low
Show code
RegisterScriptCallback("actor_on_climb_end", function() MovementAllowed = true end)
L177 🔴 global_write
Global write: MovementAllowed
Impact: low
Show code
RegisterScriptCallback("actor_on_attach_vehicle", function() MovementAllowed = false end)
L178 🔴 global_write
Global write: MovementAllowed
Impact: low
Show code
RegisterScriptCallback("actor_on_detach_vehicle", function() MovementAllowed = true end)
L179 🔴 global_write
Global write: MovementAllowed
Impact: low
Show code
RegisterScriptCallback("actor_on_before_death", function() MovementAllowed = false end)
L180 🔴 global_write
Global write: MovementAllowed
Impact: low
Show code
RegisterScriptCallback("actor_on_net_destroy", function() MovementAllowed = false end)
L181 🔴 global_write
Global write: MovementAllowed
Impact: low
Show code
RegisterScriptCallback("actor_on_first_update", function() MovementAllowed = true end)

Oleh's Weapons Sounds Tweaks and Fixes

7 files (🟢5 🟡6 🔴44 🔵1)

dryfire_prefire_sounds.script

L44 🟢 repeated_wpn_section()
wpn:section() called 2x in actor_on_weapon_fired
Impact: low
Show code
Cache wpn:section() result
L29 🔴 global_write
Global write: sound_to_play
Impact: low
Show code
sound_to_play = sound_object(dryfire)
L50 🔴 global_write
Global write: sound_to_play
Impact: low
Show code
sound_to_play = sound_object(prefire)
L64 🔴 global_write
Global write: isMisfireWeapon
Impact: low
Show code
isMisfireWeapon = function(wpn, wpn_id)
L76 🔴 global_write
Global write: isMisfireWeapon
Impact: low
Show code
isMisfireWeapon = function(wpn, wpn_id)
L80 🔴 global_write
Global write: isMisfireWeapon
Impact: low
Show code
isMisfireWeapon = function(wpn, wpn_id)
L85 🔴 global_write
Global write: isMisfireWeapon
Impact: low
Show code
isMisfireWeapon = function(wpn, wpn_id)

eft_rattle.script

L39 🔴 global_write
Global write: wpn_kinds
Impact: low
Show code
wpn_kinds = {
L44 🔴 global_write
Global write: limit
Impact: low
Show code
limit = {
L49 🔴 global_write
Global write: count
Impact: low
Show code
count = 1
L55 🔴 global_write
Global write: count
Impact: low
Show code
count = count + 1
L56 🔴 global_write
Global write: count
Impact: low
Show code
if count > limit[class] then count = 1 end
L62 🔴 global_write
Global write: sec
Impact: low
Show code
sec = wpn:section()
L65 🔴 global_write
Global write: class
Impact: low
Show code
class = wpn_kinds[SYS_GetParam(0, sec, "kind")] or "rifle\\rifle_aim"
L66 🔴 global_write
Global write: weight
Impact: low
Show code
weight = ini_sys:r_string_ex(sec, "inv_weight") or 3.3
L67 🔴 global_write
Global write: aim_time
Impact: low
Show code
aim_time = ini_sys:r_string_ex(sec, "zoom_rotate_time") or 0.25
L68 🔴 global_write
Global write: volume
Impact: low
Show code
volume = (0.25 + weight*0.04)
L69 🔴 global_write
Global write: frequency
Impact: low
Show code
frequency = 1.3 - aim_time
L70 🔴 global_write
Global write: frequency
Impact: low
Show code
if frequency < 0.77 then frequency = 0.77 end

grok_casings_sounds.script

L293 🟢 uncached_globals_summary
Cache 1 globals in actor_on_hud_animation_play_mag_drop
Impact: medium
Show code
L303: tonumber L304: tonumber
L349 🟢 uncached_globals_summary
Cache 1 globals in actor_on_first_update
Impact: medium
Show code
L351: pairs L364: pairs
L145 🟢 repeated_wpn_id()
wpn:id() called 2x in actor_on_weapon_fired
Impact: low
Show code
Cache wpn:id() result
L88 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Grok's Casing Falling Sounds are disabled in MCM, unregistering callbacks")
L42 🔴 global_write
Global write: mat_to_sound
Impact: low
Show code
mat_to_sound = {
L63 🔴 global_write
Global write: soft_mats
Impact: low
Show code
soft_mats = {
L99 🔴 global_write
Global write: current_material
Impact: low
Show code
current_material = tostring(material)
L102 🔴 global_write
Global write: found_mat
Impact: low
Show code
found_mat = string.find(current_material, k)
L104 🔴 global_write
Global write: current_material
Impact: low
Show code
current_material = k
L108 🔴 global_write
Global write: current_material_sound
Impact: low
Show code
current_material_sound = mat_to_sound[current_material]
L114 🔴 global_write
Global write: current_material_sound
Impact: low
Show code
current_material_sound = "_mud_"
L147 🔴 global_write
Global write: eject_delay
Impact: low
Show code
eject_delay, fall_delay, offset, casing_class = get_const_params(wpn)
L147 🔴 global_write
Global write: fall_delay
Impact: low
Show code
eject_delay, fall_delay, offset, casing_class = get_const_params(wpn)
L147 🔴 global_write
Global write: offset
Impact: low
Show code
eject_delay, fall_delay, offset, casing_class = get_const_params(wpn)
L147 🔴 global_write
Global write: casing_class
Impact: low
Show code
eject_delay, fall_delay, offset, casing_class = get_const_params(wpn)
L193 🔴 global_write
Global write: sound_to_play
Impact: low
Show code
sound_to_play = sound_object("casings\\" .. casing_class .. material_sound .. math.random(4))
L220 🔴 global_write
Global write: offset_x
Impact: low
Show code
offset_x, offset_z = _offset[1], _offset[2]
L220 🔴 global_write
Global write: offset_z
Impact: low
Show code
offset_x, offset_z = _offset[1], _offset[2]
L285 🔴 global_write
Global write: sound_to_play
Impact: low
Show code
sound_to_play = sound_object("casings\\" .. casing_class .. material_sound .. math.random(4))
L315 🔴 global_write
Global write: pos
Impact: low
Show code
pos, dir = actor:position(), actor:direction()
L315 🔴 global_write
Global write: dir
Impact: low
Show code
pos, dir = actor:position(), actor:direction()
L319 🔴 global_write
Global write: body_st
Impact: low
Show code
body_st = get_body_state()
L321 🔴 global_write
Global write: fall_delay
Impact: low
Show code
fall_delay = 0.15 / velocity
L327 🔴 global_write
Global write: fall_delay
Impact: low
Show code
fall_delay = 0.35 / velocity
L333 🔴 global_write
Global write: fall_delay
Impact: low
Show code
fall_delay = 0.4 / velocity
L339 🔴 global_write
Global write: sound_to_play
Impact: low
Show code
sound_to_play = sound_object("magazines\\" .. class .. "_dirt_" .. 1) --check params
L315 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check (auto-fixable)
Impact: low
Show code
pos, dir = actor:position(), actor:direction()
L315 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check (auto-fixable)
Impact: low
Show code
pos, dir = actor:position(), actor:direction()
L40 🟡 unused_local_variable
Local variable 'mag_params' is assigned but never used
Impact: low
Show code
local wpn_params, ammo_params, gren_params, mag_params = {}, {}, {}, {}

grok_casings_sounds_mcm.script

L2 🔴 global_write
Global write: op
Impact: low
Show code
op = {

reload_hint.script

L40 🟢 repeated_wpn_id()
wpn:id() called 2x in actor_on_weapon_fired
Impact: low
Show code
Cache wpn:id() result
L34 🔴 global_write
Global write: sound_to_play
Impact: low
Show code
sound_to_play = sound_object(sound_path)

weapon_sprint_rattle.script

L31 🔴 global_write
Global write: section
Impact: low
Show code
section = item:section()
L30 🟡 potential_nil_access
Potential nil access: 'active_item' from :active_item() used without nil check
Impact: low
Show code
and item and active_item and item and item:id() == active_item:id() then
L71 🟡 potential_nil_access
Potential nil access: 'active_item' from :active_item() used without nil check
Impact: low
Show code
if not active_item or active_item and active_item:id() ~= cached_id then

z_weapon_cover_tilt_rattle_wstfg.script

L5 🔴 global_write
Global write: play_sound
Impact: low
Show code
play_sound = weapon_cover_tilt_rattle.play_sound
L4 🟡 unused_local_variable
Local variable 'sound_add_start' is assigned but never used
Impact: low
Show code
local sound_add_start = true

PDA_Hacking_v

2 files (🟢2 🟡0 🔴16 🔵3)

pda_hacking_mcm.script

L5 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "pda_hacking",sh=true ,gr={

z_pda_hacking.script

L673 🟢 table_insert_append
table.insert(letters, v) -> letters[#letters+1] = v
Impact: high
Show code
table.insert(letters, {letter = letter, rnd = math.random()})
L885 🟢 repeated_device
device called 4x in get_font
Impact: low
Show code
local dev = device()
L10 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L92 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!PDA Hacking: Unable to get PDA rarity. Section: " .. (pda_sec or "nil"))
L977 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("-PDA Hacking mod: Error modifying locked PDA/stash chance. Please update your Modded Exes")
L3 🔴 global_write
Global write: script_table
Impact: low
Show code
script_table = {}
L14 🔴 global_write
Global write: faction_encyption
Impact: low
Show code
faction_encyption = {
L30 🔴 global_write
Global write: colors_str
Impact: low
Show code
colors_str = {
L42 🔴 global_write
Global write: colors_argb
Impact: low
Show code
colors_argb = {
L53 🔴 global_write
Global write: pda_rarity_encryption_mult
Impact: low
Show code
pda_rarity_encryption_mult = {
L58 🔴 global_write
Global write: base_reset
Impact: low
Show code
base_reset = ui_pda_npc_tab.pda_npc_tab.Reset
L241 🔴 global_write
Global write: script_table
Impact: low
Show code
script_table = {}
L259 🔴 global_write
Global write: base_update
Impact: low
Show code
base_update = ui_pda_npc_tab.pda_npc_tab.Update
L861 🔴 global_write
Global write: fonts
Impact: low
Show code
fonts = {
L874 🔴 global_write
Global write: name_key
Impact: low
Show code
name_key = {
L894 🔴 global_write
Global write: drop_table
Impact: low
Show code
drop_table = {
L941 🔴 global_write
Global write: SpawnCosmetics
Impact: low
Show code
SpawnCosmetics = death_manager.spawn_cosmetics
L956 🔴 global_write
Global write: base_register_pda
Impact: low
Show code
base_register_pda = ui_pda_npc_tab.register_pda
L992 🔴 global_write
Global write: settings
Impact: low
Show code
settings = load_defaults()
L995 🔴 global_write
Global write: settings
Impact: low
Show code
settings = load_defaults()

Persistent weather by Priler

1 file (🟢0 🟡0 🔴0 🔵5)

priler_persistent_weather.script

L101 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ pw: started fallback rain sound [%s]", path)
L106 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ pw: could not find rain sound file")
L131 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ pw: engine rain sound working, stopping fallback")
L136 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ pw: engine rain sound confirmed, stopping monitor")
L145 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ pw: engine rain sound stuck (dens=%s vol=%s), using fallback", tostring(rain_density), tostring(rain_volume))

Persistent_PDA_Radio_v

1 file (🟢0 🟡0 🔴0 🔵2)

persistent_pda_radio.script

L50 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[PPDAR] PDA radio started according to saved data")
L72 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[PPDAR] PDA music player started according to saved data")

Portraits of The Zone - BETA

1 file (🟢12 🟡6 🔴0 🔵1)

ui_mm_faction_select.script

L201 🟢 table_insert_append
table.insert(start_pos, v) -> start_pos[#start_pos+1] = v
Impact: high
Show code
table.insert(start_pos,ini_map:r_float_ex(start_location, "lvid"))
L202 🟢 table_insert_append
table.insert(start_pos, v) -> start_pos[#start_pos+1] = v
Impact: high
Show code
table.insert(start_pos,ini_map:r_float_ex(start_location, "gvid"))
L203 🟢 table_insert_append
table.insert(start_pos, v) -> start_pos[#start_pos+1] = v
Impact: high
Show code
table.insert(start_pos,vector():set(ini_map:r_float_ex(start_location,"x"),ini_map:r_float_ex(start_location,"y"),ini_map:r_float_ex(start_location,"z")))
L1159 🟢 table_insert_append
table.insert(self.table_icon, v) -> self.table_icon[#self.table_icon+1] = v
Impact: high
Show code
table.insert(self.table_icon, def_icon)
L1166 🟢 table_insert_append
table.insert(self.table_icon, v) -> self.table_icon[#self.table_icon+1] = v
Impact: high
Show code
table.insert(self.table_icon, id)
L1180 🟢 table_insert_append
table.insert(self.table_map, v) -> self.table_map[#self.table_map+1] = v
Impact: high
Show code
table.insert(self.table_map, "random_location")
L1190 🟢 table_insert_append
table.insert(self.table_map, v) -> self.table_map[#self.table_map+1] = v
Impact: high
Show code
table.insert(self.table_map, id)
L1193 🟢 table_insert_append
table.insert(self.table_map, v) -> self.table_map[#self.table_map+1] = v
Impact: high
Show code
table.insert(self.table_map, id)
L43 🟢 uncached_globals_summary
Cache 2 globals in on_game_load
Impact: medium
Show code
L57: tostring L57: tostring L57: math.random L57: math.random
L432 🟢 uncached_globals_summary
Cache 2 globals in __init
Impact: medium
Show code
L472: tonumber L483: tonumber L473: tostring L484: tostring
L930 🟢 uncached_globals_summary
Cache 1 globals in PopupIcon_Callbacks
Impact: medium
Show code
L932: tostring L935: tostring
L1209 🟢 uncached_globals_summary
Cache 2 globals in LoadLoadout
Impact: medium
Show code
L1215: tostring L1216: tostring L1227: tonumber L1227: tonumber
L1557 🟡 string_concat_in_loop
String concat in loop: str_stats = str_stats .. x
Impact: critical
Show code
str_stats = str_stats .. "%c[0,150,150,150]• %c[0,50,175,50]" .. game.translate_string("st_faction_" .. k) .. "\\n"
L1717 🟡 string_concat_in_loop
String concat in loop: loadout_str = loadout_str .. x
Impact: critical
Show code
loadout_str = loadout_str .. "," .. ci.section
L1281 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("sec: %s | points: %s | points left: %s", ci.section, points, self.points_left)
L307 🟡 unused_local_variable
Local variable 'sim' is assigned but never used
Impact: low
Show code
local sim = alife()
L388 🟡 unused_local_variable
Local variable 'as' is assigned but never used
Impact: low
Show code
local as
L1224 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, sec, value = ini_itm:r_line(self.selected_faction .. "_loadout" , i , "", "")
L1647 🟡 unused_local_variable
Local variable 'bind' is assigned but never used
Impact: low
Show code
local bind = dik_to_bind(dik)

Pre-0.9.3.1 Saves Fix

18 files (🟢17 🟡24 🔴77 🔵3)

a_the_living_fire_configs.script

L1 🔴 global_write
Global write: garbage_prometheus_location
Impact: low
Show code
garbage_prometheus_location = {
L8 🔴 global_write
Global write: garbage_prometheus_spawn_activation_distance
Impact: low
Show code
garbage_prometheus_spawn_activation_distance = 79.5
L9 🔴 global_write
Global write: garbage_mutant_spawn_activation_distance
Impact: low
Show code
garbage_mutant_spawn_activation_distance = 30
L11 🔴 global_write
Global write: garbage_mutant_location
Impact: low
Show code
garbage_mutant_location = {
L19 🔴 global_write
Global write: garbage_zhar_location
Impact: low
Show code
garbage_zhar_location = {
L26 🔴 global_write
Global write: garbage_zharka_locations
Impact: low
Show code
garbage_zharka_locations = {{
L52 🔴 global_write
Global write: garbage_trash_location
Impact: low
Show code
garbage_trash_location = {
L59 🔴 global_write
Global write: swamp_spawn_activation_distance
Impact: low
Show code
swamp_spawn_activation_distance = 90
L61 🔴 global_write
Global write: swamp_explosion_locations
Impact: low
Show code
swamp_explosion_locations = {{
L93 🔴 global_write
Global write: swamp_mutant_locations
Impact: low
Show code
swamp_mutant_locations = {{
L150 🔴 global_write
Global write: x18_prometheus_location
Impact: low
Show code
x18_prometheus_location = {
L157 🔴 global_write
Global write: x18_prometheus_msg_trigger_distance
Impact: low
Show code
x18_prometheus_msg_trigger_distance = 10
L159 🔴 global_write
Global write: dark_valley_corpses_locations
Impact: low
Show code
dark_valley_corpses_locations = {{
L191 🔴 global_write
Global write: dark_valley_actor_msg_trigger_location
Impact: low
Show code
dark_valley_actor_msg_trigger_location = {
L197 🔴 global_write
Global write: dark_valley_actor_msg_trigger_distance
Impact: low
Show code
dark_valley_actor_msg_trigger_distance = 10
L199 🔴 global_write
Global write: x18_military_locations
Impact: low
Show code
x18_military_locations = {{
L236 🔴 global_write
Global write: x16_greh_locations
Impact: low
Show code
x16_greh_locations = {{
L268 🔴 global_write
Global write: x16_prometheus_location
Impact: low
Show code
x16_prometheus_location = {
L274 🔴 global_write
Global write: x16_prometheus_msg_trigger_distance
Impact: low
Show code
x16_prometheus_msg_trigger_distance = 40
L276 🔴 global_write
Global write: x16_middle
Impact: low
Show code
x16_middle = {
L281 🔴 global_write
Global write: x16_mutant_scanning_range
Impact: low
Show code
x16_mutant_scanning_range = 200
L283 🔴 global_write
Global write: x16_corpse_locations
Impact: low
Show code
x16_corpse_locations = {{
L363 🔴 global_write
Global write: red_forest_greh_locations
Impact: low
Show code
red_forest_greh_locations = {{
L380 🔴 global_write
Global write: red_forest_mutants_trigger
Impact: low
Show code
red_forest_mutants_trigger = {
L386 🔴 global_write
Global write: red_forest_mutants_trigger_range
Impact: low
Show code
red_forest_mutants_trigger_range = 5
L388 🔴 global_write
Global write: red_forest_explosion_locations
Impact: low
Show code
red_forest_explosion_locations = {{
L415 🔴 global_write
Global write: red_forest_mutant_locations
Impact: low
Show code
red_forest_mutant_locations = {{
L487 🔴 global_write
Global write: red_forest_isg_locations
Impact: low
Show code
red_forest_isg_locations = {{
L509 🔴 global_write
Global write: red_forest_actor_msg_trigger
Impact: low
Show code
red_forest_actor_msg_trigger = {
L516 🔴 global_write
Global write: red_forest_actor_msg_trigger_range
Impact: low
Show code
red_forest_actor_msg_trigger_range = 8
L518 🔴 global_write
Global write: outskirts_prometheus_location
Impact: low
Show code
outskirts_prometheus_location = {
L525 🔴 global_write
Global write: outskirts_greh_locations
Impact: low
Show code
outskirts_greh_locations = {{
L567 🔴 global_write
Global write: outskirts_mutant_locations
Impact: low
Show code
outskirts_mutant_locations = {{
L589 🔴 global_write
Global write: outskirts_prometheus_msg_trigger_distance
Impact: low
Show code
outskirts_prometheus_msg_trigger_distance = 28
L592 🔴 global_write
Global write: outskirts_anomaly_xz_data
Impact: low
Show code
outskirts_anomaly_xz_data = {{217.3464, 332.1511},{217.2378700635549, 335.6045785741122},{216.91270857229628, 339.04442784603674},{216.37219879007787, 342.45707230221484},{215.6184738620747, 345.829043794067},{214.65450839623344, 349.1470346906221},{213.4841067238538, 352.39795039765727},{212.11188788563106, 355.568961036079},{210.54326740241248, 358.6475520755943},{208.78443590261082, 361.6215737238448},{206.8423346906221, 364.479288876086},{204.7246283526684, 367.20941943617794},{202.43967450817763, 369.80119082607786},{199.99649082607786, 372.2443745081776},{197.4047194361779, 374.5293283526684},{194.674588876086, 376.6470346906221},{191.8168737238448, 378.5891359026108},{188.84285207559432, 380.3479674024125},{185.76426103607898, 381.9165878856311},{182.59325039765727, 383.28880672385384},{179.3423346906221, 384.4592083962334},{176.024343794067, 385.4231738620747},{172.65237230221484, 386.17689879007787},{169.23972784603671, 386.7174085722963},{165.79987857411223, 387.04257006355493},{162.3464, 387.1511},{158.89292142588775, 387.04257006355493},{155.45307215396326, 386.7174085722963},{152.04042769778513, 386.17689879007787},{148.66845620593298, 385.4231738620747},{145.35046530937788, 384.4592083962334},{142.0995496023427, 383.28880672385384},{138.928538963921, 381.91658788563103},{135.84994792440563, 380.34796740241245},{132.87592627615516, 378.5891359026108},{130.01821112391397, 376.6470346906221},{127.28808056382205, 374.5293283526684},{124.69630917392212, 372.2443745081776},{122.25312549182235, 369.80119082607786},{119.96817164733157, 367.2094194361779},{117.85046530937788, 364.479288876086},{115.90836409738915, 361.6215737238448},{114.1495325975875, 358.6475520755943},{112.58091211436891, 355.568961036079},{111.20869327614616, 352.39795039765727},{110.03829160376654, 349.1470346906221},{109.07432613792528, 345.829043794067},{108.3206012099221, 342.45707230221484},{107.7800914277037, 339.0444278460367},{107.45492993644505, 335.6045785741122},{107.34639999999999, 332.1511},{107.45492993644505, 328.69762142588775},{107.7800914277037, 325.25777215396323},{108.32060120992212, 321.84512769778513},{109.07432613792528, 318.473156205933},{110.03829160376654, 315.1551653093779},{111.20869327614616, 311.9042496023427},{112.58091211436891, 308.733238963921},{114.1495325975875, 305.65464792440565},{115.90836409738917, 302.6806262761552},{117.85046530937788, 299.82291112391397},{119.96817164733159, 297.09278056382203},{122.25312549182235, 294.5010091739221},{124.69630917392212, 292.05782549182237},{127.28808056382206, 289.77287164733156},{130.01821112391394, 287.6551653093779},{132.87592627615518, 285.7130640973891},{135.84994792440565, 283.9542325975875},{138.92853896392103, 282.3856121143689},{142.0995496023427, 281.01339327614613},{145.35046530937788, 279.84299160376656},{148.66845620593298, 278.8790261379253},{152.04042769778513, 278.1253012099221},{155.4530721539633, 277.5847914277037},{158.89292142588775, 277.25962993644504},{162.3464, 277.1511},{165.79987857411226, 277.25962993644504},{169.23972784603671, 277.5847914277037},{172.65237230221487, 278.1253012099221},{176.02434379406702, 278.8790261379253},{179.3423346906221, 279.84299160376656},{182.5932503976573, 281.0133932761462},{185.76426103607898, 282.3856121143689},{188.84285207559435, 283.9542325975875},{191.81687372384482, 285.7130640973892},{194.67458887608603, 287.6551653093779},{197.40471943617794, 289.7728716473316},{199.99649082607786, 292.05782549182237},{202.43967450817763, 294.5010091739221},{204.7246283526684, 297.09278056382203},{206.84233469062212, 299.82291112391397},{208.78443590261082, 302.6806262761552},{210.54326740241248, 305.65464792440565},{212.11188788563106, 308.733238963921},{213.4841067238538, 311.9042496023427},{214.65450839623344, 315.15516530937794},{215.6184738620747, 318.473156205933},{216.37219879007787, 321.84512769778513},{216.91270857229628, 325.2577721539633},{217.2378700635549, 328.69762142588775}}
L594 🔴 global_write
Global write: outskirts_endgame_greh_locations
Impact: low
Show code
outskirts_endgame_greh_locations = {{

baba_yaga_configs.script

L1 🔴 global_write
Global write: art_location
Impact: low
Show code
art_location = {
L7 🔴 global_write
Global write: teleport_to_location
Impact: low
Show code
teleport_to_location = {
L13 🔴 global_write
Global write: karlik_spots
Impact: low
Show code
karlik_spots = {{
L27 🔴 global_write
Global write: hag_spot
Impact: low
Show code
hag_spot = {
L34 🔴 global_write
Global write: art_sections
Impact: low
Show code
art_sections = {

big_game_configs.script

L1 🔴 global_write
Global write: small_giants_spots
Impact: low
Show code
small_giants_spots = {{
L15 🔴 global_write
Global write: big_giant_spot
Impact: low
Show code
big_giant_spot = {

dead_night_configs.script

L9 🔴 global_write
Global write: spawn_configs
Impact: low
Show code
spawn_configs = {{

house_of_horrors_configs.script

L1 🔴 global_write
Global write: house_location
Impact: low
Show code
house_location = {
L7 🔴 global_write
Global write: zombie_location
Impact: low
Show code
zombie_location = {
L14 🔴 global_write
Global write: dog_location
Impact: low
Show code
dog_location = {
L21 🔴 global_write
Global write: board_location
Impact: low
Show code
board_location = {
L29 🔴 global_write
Global write: hanged_man_location
Impact: low
Show code
hanged_man_location = {

mirage_configs.script

L1 🔴 global_write
Global write: teleport_activator_center_point
Impact: low
Show code
teleport_activator_center_point = vector():set(-423.5822,39.9999,-392.2540)
L2 🔴 global_write
Global write: teleport_activation_distance
Impact: low
Show code
teleport_activation_distance = 190
L4 🔴 global_write
Global write: first_spawn_activator
Impact: low
Show code
first_spawn_activator = vector():set(-350.9619,40.0389,-333.7500)
L5 🔴 global_write
Global write: first_spawn_activation_distance
Impact: low
Show code
first_spawn_activation_distance = 15
L6 🔴 global_write
Global write: first_spawn_spots
Impact: low
Show code
first_spawn_spots = {{
L20 🔴 global_write
Global write: second_spawn_activator
Impact: low
Show code
second_spawn_activator = vector():set(-409.0541,40.0467,-379.4803)
L21 🔴 global_write
Global write: second_spawn_activation_distance
Impact: low
Show code
second_spawn_activation_distance = 20
L22 🔴 global_write
Global write: second_spawn_spots
Impact: low
Show code
second_spawn_spots = {{
L36 🔴 global_write
Global write: third_spawn_activator
Impact: low
Show code
third_spawn_activator = vector():set(-407.9597,32.1984,-376.7980)
L37 🔴 global_write
Global write: third_spawn_activation_distance
Impact: low
Show code
third_spawn_activation_distance = 5
L38 🔴 global_write
Global write: third_spawn_spots
Impact: low
Show code
third_spawn_spots = {{
L48 🔴 global_write
Global write: sidor_spawn_activator
Impact: low
Show code
sidor_spawn_activator = vector():set(-404.8524,32.1999,-339.5040)
L49 🔴 global_write
Global write: sidor_spawn_activation_distance
Impact: low
Show code
sidor_spawn_activation_distance = 2
L51 🔴 global_write
Global write: med_table_spawn_config
Impact: low
Show code
med_table_spawn_config = {
L58 🔴 global_write
Global write: sidor_spawn_config
Impact: low
Show code
sidor_spawn_config = {
L66 🔴 global_write
Global write: sidor_controller_1_spawn_config
Impact: low
Show code
sidor_controller_1_spawn_config = {
L73 🔴 global_write
Global write: sidor_controller_2_spawn_config
Impact: low
Show code
sidor_controller_2_spawn_config = {
L80 🔴 global_write
Global write: burer_spawn_config
Impact: low
Show code
burer_spawn_config = {

modxml_nta.script

L38 🟢 uncached_globals_summary
Cache 1 globals in on_xml_read
Impact: medium
Show code
L40: pairs L56: pairs

new_tasks_addon_mcm.script

L2 🔴 global_write
Global write: config
Impact: low
Show code
config = {
L34 🔴 global_write
Global write: op
Impact: low
Show code
op = {

new_tasks_addon_tasks_utils.script

L116 🟢 table_insert_append
table.insert(t, v) -> t[#t+1] = v
Impact: high
Show code
table.insert(t, i)
L234 🟢 table_insert_append
table.insert(sim_stalkers[comm], v) -> sim_stalkers[comm][#sim_stalkers[comm]+1] = v
Impact: high
Show code
table.insert(sim_stalkers[comm], se_obj.id)
L190 🔴 global_write
Global write: southern_maps
Impact: low
Show code
southern_maps = {
L205 🔴 global_write
Global write: nothern_maps
Impact: low
Show code
nothern_maps = {
L217 🔴 global_write
Global write: sim_stalkers
Impact: low
Show code
sim_stalkers = nil
L219 🔴 global_write
Global write: sim_stalkers
Impact: low
Show code
sim_stalkers = {}
L335 🔴 global_write
Global write: levels
Impact: low
Show code
levels = {
L369 🔴 global_write
Global write: mcm_config
Impact: low
Show code
mcm_config = load_defaults()
L372 🔴 global_write
Global write: mcm_config
Impact: low
Show code
mcm_config = load_defaults()
L412 🔴 global_write
Global write: se_id
Impact: low
Show code
se_id = spawn_helicopter(true, vector():set(-178.07975769043,5.3180623054504,-181.78283691406))
L9 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_npc = k.object or k.id and sim:object(k.id)
L131 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check (auto-fixable)
Impact: low
Show code
return item and string.find(item:section(), "axe")
L148 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
local pos = obj:position()
L150 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
obj:force_set_position(pos, false)
L177 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local squad = sim:object(id)
L180 🟡 potential_nil_access
Potential nil access: 'squad' from :object() used without nil check
Impact: low
Show code
for k in squad:squad_members() do
L181 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_npc = k.object or k.id and sim:object(k.id)
L272 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check (auto-fixable)
Impact: low
Show code
return sim:level_name(gg:vertex(se_obj.m_game_vertex_id):level_id())

tasks_big_game.script

L57 🟢 table_insert_append
table.insert(state.small_giants_ids, v) -> state.small_giants_ids[#state.small_giants_ids+1] = v
Impact: high
Show code
table.insert(state.small_giants_ids, nta_utils.spawn_helper(spawn_config, "gigant_weak"))
L36 🟡 potential_nil_access
Potential nil access: 'giant' from level.object_by_id() used without nil check
Impact: low
Show code
if giant and giant:alive() then
L49 🟡 potential_nil_access
Potential nil access: 'giant' from level.object_by_id() used without nil check
Impact: low
Show code
if giant and not giant:alive() then

tasks_dead_night.script

L45 🟢 table_insert_append
table.insert(state, v) -> state[#state+1] = v
Impact: high
Show code
table.insert(state, nta_utils.spawn_helper(spawn_config, spawn_config.section_func()))
L75 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local obj = sim:object(id)
L76 🟡 potential_nil_access
Potential nil access: 'obj' from :object() used without nil check
Impact: low
Show code
if obj and obj:alive() then return id end
L88 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
if sim:object(id) then

tasks_hold_the_ground.script

L41 🟡 potential_nil_access
Potential nil access: 'smart' from level.object_by_id() used without nil check
Impact: low
Show code
and db.actor:position():distance_to(smart:position()) < 15

tasks_intercept_artifact.script

L121 🟢 table_insert_append
table.insert(result, v) -> result[#result+1] = v
Impact: high
Show code
table.insert(result, p[i])

tasks_mirage.script

L199 🟡 potential_nil_access
Potential nil access: 'active_item' from :active_item() used without nil check
Impact: low
Show code
sec = active_item:section()
L215 🟡 potential_nil_access
Potential nil access: 'mirage' from level.object_by_id() used without nil check
Impact: low
Show code
mirage:iterate_inventory(iterate)
L229 🟡 potential_nil_access
Potential nil access: 'mirage' from level.object_by_id() used without nil check
Impact: low
Show code
mirage:set_visual_name(get_actor_visual())

tasks_skyfall.script

L168 🟢 table_insert_append
table.insert(t, v) -> t[#t+1] = v
Impact: high
Show code
table.insert(t, nta_utils.spawn_helper(b, "fake_explosive_barrel"))
L218 🟢 repeated_who_section()
who:section() called 3x in physic_object_on_hit_callback
Impact: low
Show code
Cache who:section() result
L96 🟡 potential_nil_access
Potential nil access: 'heliObj' from :get_helicopter() used without nil check
Impact: low
Show code
if heliObj:GetfHealth() <= 0 then
L97 🟡 potential_nil_access
Potential nil access: 'heliObj' from :get_helicopter() used without nil check
Impact: low
Show code
heliObj:Die()
L98 🟡 potential_nil_access
Potential nil access: 'heliObj' from :get_helicopter() used without nil check
Impact: low
Show code
heliObj:Explode() -- explode immediately to make sure that it does not stay alive under the map

tasks_the_living_fire.script

L366 🟢 table_insert_append
table.insert(state.anomaly_ids, v) -> state.anomaly_ids[#state.anomaly_ids+1] = v
Impact: high
Show code
table.insert(state.anomaly_ids, nta_utils.spawn_helper(configs.garbage_zhar_location))
L368 🟢 table_insert_append
table.insert(state.anomaly_ids, v) -> state.anomaly_ids[#state.anomaly_ids+1] = v
Impact: high
Show code
table.insert(state.anomaly_ids, nta_utils.spawn_helper(spawn_config))
L391 🟢 table_insert_append
table.insert(state.anomaly_ids, v) -> state.anomaly_ids[#state.anomaly_ids+1] = v
Impact: high
Show code
table.insert(state.anomaly_ids, nta_utils.spawn_helper(spawn_config))
L439 🟢 table_insert_append
table.insert(state.mutant_ids, v) -> state.mutant_ids[#state.mutant_ids+1] = v
Impact: high
Show code
table.insert(state.mutant_ids, id)
L463 🟢 table_insert_append
table.insert(state.corpse_ids, v) -> state.corpse_ids[#state.corpse_ids+1] = v
Impact: high
Show code
table.insert(state.corpse_ids, nta_utils.spawn_helper(spawn_config))
L554 🟢 table_insert_append
table.insert(state.x18_military_ids, v) -> state.x18_military_ids[#state.x18_military_ids+1] = v
Impact: high
Show code
table.insert(state.x18_military_ids, id)
L572 🟢 table_insert_append
table.insert(state.greh_ids, v) -> state.greh_ids[#state.greh_ids+1] = v
Impact: high
Show code
table.insert(state.greh_ids, id)
L610 🟢 table_insert_append
table.insert(state.anomaly_ids, v) -> state.anomaly_ids[#state.anomaly_ids+1] = v
Impact: high
Show code
table.insert(state.anomaly_ids, nta_utils.spawn_helper(anomaly_location))
L619 🟢 table_insert_append
table.insert(state.mutant_ids, v) -> state.mutant_ids[#state.mutant_ids+1] = v
Impact: high
Show code
table.insert(state.mutant_ids, id)
L446 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
if obj and obj:alive() then
L455 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
if obj and obj:alive() then
L776 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
local sec = wpn:section()

tasks_urgent_orders.script

L70 🟡 potential_nil_access
Potential nil access: 'smart' from level.object_by_id() used without nil check
Impact: low
Show code
and (db.actor:position():distance_to(smart:position()) < 60)

z_nta_compatibility.script

L4 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('went here')
L6 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('went here 2')
L9 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("removed prometheus from spawn")

Private's Aim Stamina

4 files (🟢0 🟡2 🔴110 🔵4)

aim_stamina.script

L30 🔴 global_write
Global write: AS_op_mode
Impact: low
Show code
AS_op_mode = aim_stamina_mcm.get_config("AS_op_mode") or 1
L31 🔴 global_write
Global write: AS_mode
Impact: low
Show code
AS_mode = aim_stamina_mcm.get_config("AS_mode") or 1
L34 🔴 global_write
Global write: stamina_modifier
Impact: low
Show code
stamina_modifier = aim_stamina_mcm.get_config("aim_stamina") or 60
L35 🔴 global_write
Global write: drain_weight_influence
Impact: low
Show code
drain_weight_influence = aim_stamina_mcm.get_config("drain_weight_influence") or 5
L36 🔴 global_write
Global write: recover_weight_influence
Impact: low
Show code
recover_weight_influence = aim_stamina_mcm.get_config("recover_weight_influence") or 5
L37 🔴 global_write
Global write: rate_range
Impact: low
Show code
rate_range = aim_stamina_mcm.get_config("rate_range") or 10
L40 🔴 global_write
Global write: AS_prone_modifier
Impact: low
Show code
AS_prone_modifier = aim_stamina_mcm.get_config("AS_prone_modifier") or 0.2
L41 🔴 global_write
Global write: AS_satiety_influence
Impact: low
Show code
AS_satiety_influence = aim_stamina_mcm.get_config("AS_satiety_influence") or 1
L42 🔴 global_write
Global write: AS_boost_influence
Impact: low
Show code
AS_boost_influence = aim_stamina_mcm.get_config("AS_boost_influence") or 1
L43 🔴 global_write
Global write: AS_artefact_influence
Impact: low
Show code
AS_artefact_influence = aim_stamina_mcm.get_config("AS_artefact_influence") or 1
L46 🔴 global_write
Global write: AS_wpn_sway_start
Impact: low
Show code
AS_wpn_sway_start = aim_stamina_mcm.get_config("AS_wpn_sway_start") or 20
L47 🔴 global_write
Global write: AS_wpn_sway_power
Impact: low
Show code
AS_wpn_sway_power = aim_stamina_mcm.get_config("AS_wpn_sway_power") or 1
L50 🔴 global_write
Global write: show_AS_counter
Impact: low
Show code
show_AS_counter = aim_stamina_mcm.get_config("show_AS_counter") or true
L51 🔴 global_write
Global write: show_AS_bar
Impact: low
Show code
show_AS_bar = aim_stamina_mcm.get_config("show_AS_bar") or true
L52 🔴 global_write
Global write: AS_hud_x_pos
Impact: low
Show code
AS_hud_x_pos = aim_stamina_mcm.get_config("AS_hud_x_pos") or 462
L53 🔴 global_write
Global write: AS_hud_y_pos
Impact: low
Show code
AS_hud_y_pos = aim_stamina_mcm.get_config("AS_hud_y_pos") or 720
L54 🔴 global_write
Global write: AS_counter_x_pos
Impact: low
Show code
AS_counter_x_pos = aim_stamina_mcm.get_config("AS_counter_x_pos") or 2
L55 🔴 global_write
Global write: AS_counter_y_pos
Impact: low
Show code
AS_counter_y_pos = aim_stamina_mcm.get_config("AS_counter_y_pos") or 1
L56 🔴 global_write
Global write: AS_hud_hide_timer
Impact: low
Show code
AS_hud_hide_timer = aim_stamina_mcm.get_config("AS_hud_hide_timer") or 5
L59 🔴 global_write
Global write: AS_disable
Impact: low
Show code
AS_disable = aim_stamina_mcm.get_config("AS_disable") or false
L60 🔴 global_write
Global write: AS_show_disabled
Impact: low
Show code
AS_show_disabled = aim_stamina_mcm.get_config("AS_show_disabled") or false
L63 🔴 global_write
Global write: AS_boost_end_time
Impact: low
Show code
AS_boost_end_time = 0
L64 🔴 global_write
Global write: AS_boost_weight_modifier
Impact: low
Show code
AS_boost_weight_modifier = 0
L65 🔴 global_write
Global write: boost_wght_buffer
Impact: low
Show code
boost_wght_buffer = 0
L66 🔴 global_write
Global write: boost_infl_buffer
Impact: low
Show code
boost_infl_buffer = 0
L67 🔴 global_write
Global write: AS_artefact_weight_boost
Impact: low
Show code
AS_artefact_weight_boost = 0
L68 🔴 global_write
Global write: art_infl_buffer
Impact: low
Show code
art_infl_buffer = 0
L69 🔴 global_write
Global write: AS_satiety_modifier
Impact: low
Show code
AS_satiety_modifier = 1
L75 🔴 global_write
Global write: AS_op_mode
Impact: low
Show code
AS_op_mode = aim_stamina_mcm.get_config("AS_op_mode")
L76 🔴 global_write
Global write: AS_mode
Impact: low
Show code
AS_mode = aim_stamina_mcm.get_config("AS_mode")
L78 🔴 global_write
Global write: stamina_modifier
Impact: low
Show code
stamina_modifier = aim_stamina_mcm.get_config("aim_stamina")
L79 🔴 global_write
Global write: aim_stamina_round
Impact: low
Show code
aim_stamina_round = stamina_modifier
L80 🔴 global_write
Global write: drain_weight_influence
Impact: low
Show code
drain_weight_influence = aim_stamina_mcm.get_config("drain_weight_influence")
L81 🔴 global_write
Global write: recover_weight_influence
Impact: low
Show code
recover_weight_influence = aim_stamina_mcm.get_config("recover_weight_influence")
L82 🔴 global_write
Global write: rate_range
Impact: low
Show code
rate_range = aim_stamina_mcm.get_config("rate_range")
L84 🔴 global_write
Global write: AS_prone_modifier
Impact: low
Show code
AS_prone_modifier = aim_stamina_mcm.get_config("AS_prone_modifier")
L85 🔴 global_write
Global write: AS_satiety_influence
Impact: low
Show code
AS_satiety_influence = aim_stamina_mcm.get_config("AS_satiety_influence")
L86 🔴 global_write
Global write: AS_boost_influence
Impact: low
Show code
AS_boost_influence = aim_stamina_mcm.get_config("AS_boost_influence")
L87 🔴 global_write
Global write: AS_artefact_influence
Impact: low
Show code
AS_artefact_influence = aim_stamina_mcm.get_config("AS_artefact_influence")
L89 🔴 global_write
Global write: AS_wpn_sway_start
Impact: low
Show code
AS_wpn_sway_start = aim_stamina_mcm.get_config("AS_wpn_sway_start")
L90 🔴 global_write
Global write: AS_wpn_sway_power
Impact: low
Show code
AS_wpn_sway_power = aim_stamina_mcm.get_config("AS_wpn_sway_power")
L92 🔴 global_write
Global write: show_AS_counter
Impact: low
Show code
show_AS_counter = aim_stamina_mcm.get_config("show_AS_counter")
L93 🔴 global_write
Global write: show_AS_bar
Impact: low
Show code
show_AS_bar = aim_stamina_mcm.get_config("show_AS_bar")
L94 🔴 global_write
Global write: AS_hud_x_pos
Impact: low
Show code
AS_hud_x_pos = aim_stamina_mcm.get_config("AS_hud_x_pos")
L95 🔴 global_write
Global write: AS_hud_y_pos
Impact: low
Show code
AS_hud_y_pos = aim_stamina_mcm.get_config("AS_hud_y_pos")
L96 🔴 global_write
Global write: AS_counter_x_pos
Impact: low
Show code
AS_counter_x_pos = aim_stamina_mcm.get_config("AS_counter_x_pos")
L97 🔴 global_write
Global write: AS_counter_y_pos
Impact: low
Show code
AS_counter_y_pos = aim_stamina_mcm.get_config("AS_counter_y_pos")
L98 🔴 global_write
Global write: AS_hud_hide_timer
Impact: low
Show code
AS_hud_hide_timer = aim_stamina_mcm.get_config("AS_hud_hide_timer")
L100 🔴 global_write
Global write: AS_disable
Impact: low
Show code
AS_disable = aim_stamina_mcm.get_config("AS_disable")
L101 🔴 global_write
Global write: AS_show_disabled
Impact: low
Show code
AS_show_disabled = aim_stamina_mcm.get_config("AS_show_disabled")
L106 🔴 global_write
Global write: aim_stamina
Impact: low
Show code
aim_stamina = stamina_modifier or 60 -- exact value
L107 🔴 global_write
Global write: aim_stamina_round
Impact: low
Show code
aim_stamina_round = aim_stamina -- exact value rounded to 1 digit after comma
L114 🔴 global_write
Global write: AS_op_mode
Impact: low
Show code
AS_op_mode = m_data.AS_op_mode or aim_stamina_mcm.get_config("AS_op_mode")
L115 🔴 global_write
Global write: AS_mode
Impact: low
Show code
AS_mode = m_data.AS_mode or aim_stamina_mcm.get_config("AS_mode")
L117 🔴 global_write
Global write: aim_stamina
Impact: low
Show code
aim_stamina = m_data.aim_stamina or aim_stamina_mcm.get_config("aim_stamina")
L118 🔴 global_write
Global write: stamina_modifier
Impact: low
Show code
stamina_modifier = m_data.stamina_modifier or aim_stamina_mcm.get_config("aim_stamina")
L119 🔴 global_write
Global write: drain_weight_influence
Impact: low
Show code
drain_weight_influence = m_data.drain_weight_influence or aim_stamina_mcm.get_config("drain_weight_influence")
L120 🔴 global_write
Global write: recover_weight_influence
Impact: low
Show code
recover_weight_influence = m_data.recover_weight_influence or aim_stamina_mcm.get_config("recover_weight_influence")
L121 🔴 global_write
Global write: rate_range
Impact: low
Show code
rate_range = m_data.rate_range or aim_stamina_mcm.get_config("rate_range")
L123 🔴 global_write
Global write: AS_prone_modifier
Impact: low
Show code
AS_prone_modifier = m_data.AS_prone_modifier or aim_stamina_mcm.get_config("AS_prone_modifier")
L124 🔴 global_write
Global write: AS_satiety_influence
Impact: low
Show code
AS_satiety_influence = m_data.AS_satiety_influence or aim_stamina_mcm.get_config("AS_satiety_influence")
L125 🔴 global_write
Global write: AS_boost_influence
Impact: low
Show code
AS_boost_influence = m_data.AS_boost_influence or aim_stamina_mcm.get_config("AS_boost_influence")
L126 🔴 global_write
Global write: AS_artefact_influence
Impact: low
Show code
AS_artefact_influence = m_data.AS_artefact_influence or aim_stamina_mcm.get_config("AS_artefact_influence")
L128 🔴 global_write
Global write: AS_wpn_sway_start
Impact: low
Show code
AS_wpn_sway_start = m_data.AS_wpn_sway_start or aim_stamina_mcm.get_config("AS_wpn_sway_start")
L129 🔴 global_write
Global write: AS_wpn_sway_power
Impact: low
Show code
AS_wpn_sway_power = m_data.AS_wpn_sway_power or aim_stamina_mcm.get_config("AS_wpn_sway_power")
L131 🔴 global_write
Global write: show_AS_counter
Impact: low
Show code
show_AS_counter = m_data.show_AS_counter or aim_stamina_mcm.get_config("show_AS_counter")
L132 🔴 global_write
Global write: show_AS_bar
Impact: low
Show code
show_AS_bar = m_data.show_AS_bar or aim_stamina_mcm.get_config("show_AS_bar")
L133 🔴 global_write
Global write: AS_hud_x_pos
Impact: low
Show code
AS_hud_x_pos = m_data.AS_hud_x_pos or aim_stamina_mcm.get_config("AS_hud_x_pos")
L134 🔴 global_write
Global write: AS_hud_y_pos
Impact: low
Show code
AS_hud_y_pos = m_data.AS_hud_y_pos or aim_stamina_mcm.get_config("AS_hud_y_pos")
L135 🔴 global_write
Global write: AS_counter_x_pos
Impact: low
Show code
AS_counter_x_pos = m_data.AS_counter_x_pos or aim_stamina_mcm.get_config("AS_counter_x_pos")
L136 🔴 global_write
Global write: AS_counter_y_pos
Impact: low
Show code
AS_counter_y_pos = m_data.AS_counter_y_pos or aim_stamina_mcm.get_config("AS_counter_y_pos")
L137 🔴 global_write
Global write: AS_hud_hide_timer
Impact: low
Show code
AS_hud_hide_timer = m_data.AS_hud_hide_timer or aim_stamina_mcm.get_config("AS_hud_hide_timer")
L139 🔴 global_write
Global write: AS_disable
Impact: low
Show code
AS_disable = m_data.AS_disable or aim_stamina_mcm.get_config("AS_disable")
L140 🔴 global_write
Global write: AS_show_disabled
Impact: low
Show code
AS_show_disabled = m_data.AS_show_disabled or aim_stamina_mcm.get_config("AS_show_disabled")
L187 🔴 global_write
Global write: AS_boost_weight_modifier
Impact: low
Show code
AS_boost_weight_modifier = 4*boost_max_weight*AS_boost_influence
L188 🔴 global_write
Global write: AS_boost_end_time
Impact: low
Show code
AS_boost_end_time = time_global() + boost_time*1000
L191 🔴 global_write
Global write: AS_boost_weight_modifier
Impact: low
Show code
AS_boost_weight_modifier = 0
L193 🔴 global_write
Global write: boost_wght_buffer
Impact: low
Show code
boost_wght_buffer = boost_max_weight
L194 🔴 global_write
Global write: boost_infl_buffer
Impact: low
Show code
boost_infl_buffer = AS_boost_influence
L201 🔴 global_write
Global write: AS_artefact_weight_boost
Impact: low
Show code
AS_artefact_weight_boost = 0
L206 🔴 global_write
Global write: AS_artefact_weight_boost
Impact: low
Show code
AS_artefact_weight_boost = AS_artefact_weight_boost + (c_obj and c_obj:AdditionalInventoryWeight() or 0)
L209 🔴 global_write
Global write: AS_artefact_weight_boost
Impact: low
Show code
AS_artefact_weight_boost = AS_artefact_weight_boost*AS_artefact_influence
L210 🔴 global_write
Global write: art_infl_buffer
Impact: low
Show code
art_infl_buffer = AS_artefact_influence
L233 🔴 global_write
Global write: AS_satiety_modifier
Impact: low
Show code
AS_satiety_modifier = 1+AS_satiety_influence*(1-player_satiety)
L238 🔴 global_write
Global write: AS_boost_weight_modifier
Impact: low
Show code
AS_boost_weight_modifier = 4*boost_wght_buffer*AS_boost_influence
L239 🔴 global_write
Global write: boost_infl_buffer
Impact: low
Show code
boost_infl_buffer = AS_boost_influence
L246 🔴 global_write
Global write: AS_boost_weight_modifier
Impact: low
Show code
AS_boost_weight_modifier = 0
L275 🔴 global_write
Global write: aim_stamina
Impact: low
Show code
aim_stamina = aim_stamina
L280 🔴 global_write
Global write: aim_stamina
Impact: low
Show code
aim_stamina = aim_stamina - (0.05*actor_moving_state_modifier + 0.00065*drain_weight_influence * (1+wpn_weight - AS_boost_weight_modifier - AS_artefact_weight_boost) ^ (rate_range/10)) * AS_satiety_modifier
L285 🔴 global_write
Global write: aim_stamina
Impact: low
Show code
aim_stamina = aim_stamina - (0.1*actor_moving_state_modifier + 0.00065*drain_weight_influence * (1+wpn_weight - AS_boost_weight_modifier - AS_artefact_weight_boost) ^ (rate_range/10)) * AS_satiety_modifier
L306 🔴 global_write
Global write: aim_stamina
Impact: low
Show code
aim_stamina = 0
L313 🔴 global_write
Global write: aim_stamina
Impact: low
Show code
aim_stamina = aim_stamina + (0.1/actor_moving_state_modifier - 0.00065*recover_weight_influence * (1+wpn_weight - AS_boost_weight_modifier - AS_artefact_weight_boost) ^ (rate_range/10)) / AS_satiety_modifier
L317 🔴 global_write
Global write: aim_stamina
Impact: low
Show code
aim_stamina = aim_stamina + (0.1/actor_moving_state_modifier - 0.000325*recover_weight_influence * (1+wpn_weight - AS_boost_weight_modifier - AS_artefact_weight_boost) ^ (rate_range/10)) / AS_satiety_modifier
L324 🔴 global_write
Global write: aim_stamina
Impact: low
Show code
aim_stamina = aim_stamina + (0.1/(actor_moving_state_modifier) - 0.00065*recover_weight_influence * (1+wpn_weight - AS_boost_weight_modifier - AS_artefact_weight_boost) ^ (rate_range/10)) / AS_satiety_modifier
L330 🔴 global_write
Global write: aim_stamina
Impact: low
Show code
aim_stamina = stamina_modifier
L334 🔴 global_write
Global write: aim_stamina_round
Impact: low
Show code
aim_stamina_round = tonumber(string.format("%.1f", aim_stamina))
L342 🔴 global_write
Global write: AS_wpn_sway
Impact: low
Show code
AS_wpn_sway = false
L354 🔴 global_write
Global write: AS_wpn_sway
Impact: low
Show code
AS_wpn_sway = false
L365 🔴 global_write
Global write: AS_wpn_sway
Impact: low
Show code
AS_wpn_sway = false
L368 🔴 global_write
Global write: AS_wpn_sway
Impact: low
Show code
AS_wpn_sway = true
L258 🟡 potential_nil_access
Potential nil access: 'active_item' from :active_item() used without nil check
Impact: low
Show code
local is_wpn = IsWeapon(active_item) and not (SYS_GetParam(0,active_item:section(),"class") == "WP_KNIFE")
L259 🟡 potential_nil_access
Potential nil access: 'active_item' from :active_item() used without nil check
Impact: low
Show code
local wpn_weight = active_item and active_item:weight() or 0

aim_stamina_mcm.script

L6 🔴 global_write
Global write: op
Impact: low
Show code
op = { id = "aim_stamina", gr={

pos_previewer_mcm.script

L173 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(logprefix..logtext,...)
L86 🔴 global_write
Global write: script_version
Impact: low
Show code
script_version = "1.5-b3"
L87 🔴 global_write
Global write: release_date
Impact: low
Show code
release_date = 20240624
L88 🔴 global_write
Global write: debuglogs
Impact: low
Show code
debuglogs = true
L89 🔴 global_write
Global write: verbose
Impact: low
Show code
verbose = true -- does nothing without debuglogs
L90 🔴 global_write
Global write: use_debug_images
Impact: low
Show code
use_debug_images = false
L124 🔴 global_write
Global write: aspects
Impact: low
Show code
aspects = {

zzzzz_monkey_paw_ui_mcm.script

L304 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("ui_mcm.script monkeypatched by zzzzz_monkey_paw_ui_mcm.script")
L306 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("zzzzz_monkey_paw_ui_mcm.script: installed MCM already supports UI functors, aborting monkeypatch")
L308 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("zzzzz_monkey_paw_ui_mcm.script: MCM not found, aborting monkeypatch")
L72 🔴 global_write
Global write: cache_value
Impact: low
Show code
cache_value = ui_mcm.UIMCM.CacheValue
L76 🔴 global_write
Global write: wrapbox
Impact: low
Show code
wrapbox = xml:InitStatic("elements:image", anchor)
L83 🔴 global_write
Global write: pos
Impact: low
Show code
pos = wrapbox:GetWndPos()

REBOUND ENCOUNTERS 2.0.6

6 files (🟢51 🟡25 🔴12 🔵17)

rebound_encounters.script

L150 🟢 table_insert_append
table.insert(spawn_pool, v) -> spawn_pool[#spawn_pool+1] = v
Impact: high
Show code
table.insert(spawn_pool, {sec = mutant, is_night_mutant = not is_daytime, is_boss_mutant = true, threat_level = boss_weight})
L181 🟢 table_insert_append
table.insert(spawn_pool, v) -> spawn_pool[#spawn_pool+1] = v
Impact: high
Show code
table.insert(spawn_pool, {sec = mutant, is_night_mutant = not is_daytime, is_boss_mutant = false, threat_level = threat_level})
L198 🟢 table_insert_append
table.insert(final_spawn_pool, v) -> final_spawn_pool[#final_spawn_pool+1] = v
Impact: high
Show code
table.insert(final_spawn_pool, squad)
L260 🟢 table_insert_append
table.insert(boss_squads, v) -> boss_squads[#boss_squads+1] = v
Impact: high
Show code
table.insert(boss_squads, squad)
L271 🟢 table_insert_append
table.insert(non_boss_squads, v) -> non_boss_squads[#non_boss_squads+1] = v
Impact: high
Show code
table.insert(non_boss_squads, squad)
L293 🟢 table_insert_append
table.insert(active_spawns, v) -> active_spawns[#active_spawns+1] = v
Impact: high
Show code
table.insert(active_spawns, {
L468 🟢 table_insert_append
table.insert(all_eligible_smarts, v) -> all_eligible_smarts[#all_eligible_smarts+1] = v
Impact: high
Show code
table.insert(all_eligible_smarts, smart)
L489 🟢 table_insert_append
table.insert(clustered_smarts, v) -> clustered_smarts[#clustered_smarts+1] = v
Impact: high
Show code
table.insert(clustered_smarts, smart1)
L490 🟢 table_insert_append
table.insert(clustered_ids, v) -> clustered_ids[#clustered_ids+1] = v
Impact: high
Show code
table.insert(clustered_ids, smart1.id)
L496 🟢 table_insert_append
table.insert(clustered_ids, v) -> clustered_ids[#clustered_ids+1] = v
Impact: high
Show code
table.insert(clustered_ids, smart2.id)
L512 🟢 table_insert_append
table.insert(weighted_smarts, v) -> weighted_smarts[#weighted_smarts+1] = v
Impact: high
Show code
table.insert(weighted_smarts, {smart = smart, weight = weight})
L526 🟢 table_insert_append
table.insert(selected_smarts, v) -> selected_smarts[#selected_smarts+1] = v
Impact: high
Show code
table.insert(selected_smarts, weighted_smarts[i].smart.id)
L589 🟢 table_insert_append
table.insert(passives_to_spawn, v) -> passives_to_spawn[#passives_to_spawn+1] = v
Impact: high
Show code
table.insert(passives_to_spawn, {sec = squad_name})
L1317 🟢 table_insert_append
table.insert(mutant_id_attacked, v) -> mutant_id_attacked[#mutant_id_attacked+1] = v
Impact: high
Show code
table.insert(mutant_id_attacked, { npc_id = npc_id, game_time = game_time })
L1536 🟢 table_insert_append
table.insert(available_boss_squads, v) -> available_boss_squads[#available_boss_squads+1] = v
Impact: high
Show code
table.insert(available_boss_squads, squad.sec)
L1623 🟢 table_insert_append
table.insert(phrase_keys, v) -> phrase_keys[#phrase_keys+1] = v
Impact: high
Show code
table.insert(phrase_keys, phrase_key)
L1825 🟢 table_insert_append
table.insert(sorted_smart_ids, v) -> sorted_smart_ids[#sorted_smart_ids+1] = v
Impact: high
Show code
table.insert(sorted_smart_ids, {smart_id = smart_id, distance = distance})
L1855 🟢 table_insert_append
table.insert(sorted_smart_ids, v) -> sorted_smart_ids[#sorted_smart_ids+1] = v
Impact: high
Show code
table.insert(sorted_smart_ids, {smart_id = smart_id, distance = distance})
L1877 🟢 table_insert_append
table.insert(smart_terrain_ids, v) -> smart_terrain_ids[#smart_terrain_ids+1] = v
Impact: high
Show code
table.insert(smart_terrain_ids, smart.id)
L1918 🟢 table_insert_append
table.insert(active_passive_squad, v) -> active_passive_squad[#active_passive_squad+1] = v
Impact: high
Show code
table.insert(active_passive_squad, {
L2090 🟢 table_insert_append
table.insert(sorted_smart_ids, v) -> sorted_smart_ids[#sorted_smart_ids+1] = v
Impact: high
Show code
table.insert(sorted_smart_ids, {smart_id = smart_id, distance = distance})
L125 🟢 uncached_globals_summary
Cache 1 globals in create_spawn_pool
Impact: medium
Show code
L145: ipairs L170: ipairs
L206 🟢 uncached_globals_summary
Cache 2 globals in new_spawn_mutants
Impact: medium
Show code
L232: ipairs L258: ipairs L251: math.random L264: math.random
L448 🟢 uncached_globals_summary
Cache 1 globals in save_respawn_smarts
Impact: medium
Show code
L477: ipairs L479: ipairs
L986 🟢 uncached_globals_summary
Cache 1 globals in actor_on_first_update
Impact: medium
Show code
L1002: tostring L1005: tostring
L1036 🟢 uncached_globals_summary
Cache 1 globals in monster_on_death_callback
Impact: medium
Show code
L1044: tonumber L1070: tonumber
L1135 🟢 uncached_globals_summary
Cache 1 globals in actor_on_update
Impact: medium
Show code
L1153: math.random L1173: math.random
L1472 🟢 uncached_globals_summary
Cache 1 globals in set_vanilla_mutant_squad_target
Impact: medium
Show code
L1473: string.find L1474: string.find
L1526 🟢 uncached_globals_summary
Cache 1 globals in get_report
Impact: medium
Show code
L1561: string.format L1562: string.format
L2108 🟢 uncached_globals_summary
Cache 1 globals in get_dynamic_weights
Impact: medium
Show code
L2120: math.floor L2120: math.floor
L2309 🟢 uncached_globals_summary
Cache 1 globals in game_timer_minutes
Impact: medium
Show code
L2321: math.floor L2359: math.floor
L2394 🟢 uncached_globals_summary
Cache 1 globals in game_timer_hours
Impact: medium
Show code
L2406: math.floor L2444: math.floor
L2522 🟢 uncached_globals_summary
Cache 1 globals in monster_on_before_hit
Impact: medium
Show code
L2533: tonumber L2534: tonumber
L1002 🟢 repeated_level_name
level.name called 2x in actor_on_first_update
Impact: low
Show code
local level_name = level.name()
L1384 🟡 string_concat_in_loop
String concat in loop: squad_sec_to_compare = squad_sec_to_compare .. x
Impact: critical
Show code
squad_sec_to_compare = squad_sec_to_compare .. squad.sec .. " - "
L651 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L2040 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:give_game_news(sender_name, msg, texture, 1000, showtime*1000)
L66 🟡 unused_local_variable
Local variable 'passives_available' is assigned but never used
Impact: low
Show code
local passives_available = {}

rebound_encounters_mcm.script

L84 🟢 table_insert_append
table.insert(gr_elements, v) -> gr_elements[#gr_elements+1] = v
Impact: high
Show code
table.insert(gr_elements, checkbox)
L101 🟢 table_insert_append
table.insert(installed_respawn_mutants, v) -> installed_respawn_mutants[#installed_respawn_mutants+1] = v
Impact: high
Show code
table.insert(installed_respawn_mutants, sec)
L87 🔴 global_write
Global write: op
Impact: low
Show code
op = {

ui_debug_launcher.script

L100 🟢 table_insert_append
table.insert(content[key], v) -> content[key][#content[key]+1] = v
Impact: high
Show code
table.insert(content[key],v)
L908 🟢 table_insert_append
table.insert(p, v) -> p[#p+1] = v
Impact: high
Show code
table.insert(p,s)
L913 🟢 table_insert_append
table.insert(p, v) -> p[#p+1] = v
Impact: high
Show code
table.insert(p,val)
L897 🟢 string_len
string.len(wrd) -> #wrd
Impact: low
Show code
local args = string.sub(txt,string.len(wrd)+1)
L978 🟢 string_len
string.len(out) -> #out
Impact: low
Show code
local out_cut = string.sub(out, 2, string.len(out))
L876 🟢 uncached_globals_summary
Cache 1 globals in OnConsoleInput
Impact: medium
Show code
L900: string.gsub L906: string.gsub
L1503 🟢 uncached_globals_summary
Cache 1 globals in SetMsg
Impact: medium
Show code
L1511: math.random L1511: math.random
L2016 🟢 uncached_globals_summary
Cache 1 globals in Spawn
Impact: medium
Show code
L2026: string.find L2027: string.find
L2156 🟢 uncached_globals_summary
Cache 1 globals in SetMsg
Impact: medium
Show code
L2164: math.random L2164: math.random
L2398 🟢 uncached_globals_summary
Cache 1 globals in SetMsg
Impact: medium
Show code
L2406: math.random L2406: math.random
L123 🟢 repeated_o1_id()
o1:id() called 3x in get_info
Impact: low
Show code
Cache o1:id() result
L2378 🟢 repeated_o1_id()
o1:id() called 3x in Reset
Impact: low
Show code
Cache o1:id() result
L819 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("- Debug Launcher | Execute (%s)", content[tab][index].name)
L987 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Debug Console: %s",out)
L1416 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("UIDebug_ItemSpawn: No spawn table could be created for %s",name)
L1508 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf((mark or "") .. " " .. text)
L1609 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("- Spawned item [%s](%s)", spawntbl[i].sec, se_obj.id)
L1995 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("UIDebug_ObjSpawn: No spawn table could be created for %s",name)
L2161 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf((mark or "") .. " " .. text)
L2203 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~" .. lvl)
L2403 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf((mark or "") .. " " .. text)
L2687 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(txt,...)
L2724 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L13 🔴 global_write
Global write: ini_cc
Impact: low
Show code
ini_cc = nil
L16 🔴 global_write
Global write: content
Impact: low
Show code
content = {}
L18 🔴 global_write
Global write: ini_cc
Impact: low
Show code
ini_cc = ini_file_ex("cache_dbg.ltx",true)
L20 🔴 global_write
Global write: content
Impact: low
Show code
content = {
L350 🔴 global_write
Global write: debug_mode
Impact: low
Show code
debug_mode = false
L1048 🔴 global_write
Global write: itm_to_spawn_table
Impact: low
Show code
itm_to_spawn_table = {
L1635 🔴 global_write
Global write: obj_to_spawn_table
Impact: low
Show code
obj_to_spawn_table = {
L489 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L505 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then
L521 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L537 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then
L553 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L2113 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_npc = k.object or k.id and sim:object(k.id)
L2206 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local smart_level = sim:level_name(gg:vertex(v.m_game_vertex_id):level_id())
L110 🟡 unused_local_variable
Local variable 'm_floor' is assigned but never used
Impact: low
Show code
local clr, m_floor, m_ceil, s_find = utils_xml.get_color, math.floor, math.ceil, string.find
L110 🟡 unused_local_variable
Local variable 'm_ceil' is assigned but never used
Impact: low
Show code
local clr, m_floor, m_ceil, s_find = utils_xml.get_color, math.floor, math.ceil, string.find
L1457 🟡 unused_local_variable
Local variable 'chk_inv' is assigned but never used
Impact: low
Show code
local chk_inv = self.dl4_chk_i:GetCheck()
L2003 🟡 unused_local_variable
Local variable 'xml_itm' is assigned but never used
Impact: low
Show code
local xml_itm, xml_itm_s, xml_itm_tmp
L2003 🟡 unused_local_variable
Local variable 'xml_itm_s' is assigned but never used
Impact: low
Show code
local xml_itm, xml_itm_s, xml_itm_tmp
L2003 🟡 unused_local_variable
Local variable 'xml_itm_tmp' is assigned but never used
Impact: low
Show code
local xml_itm, xml_itm_s, xml_itm_tmp
L2054 🟡 unused_local_variable
Local variable 'chk_nearby' is assigned but never used
Impact: low
Show code
local chk_nearby = self.d15_chk_n:GetCheck()

utility_functions.script

L17 🟢 table_insert_append
table.insert(result, v) -> result[#result+1] = v
Impact: high
Show code
table.insert(result, id)
L112 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L4 🟡 unused_local_variable
Local variable 'marked_times' is assigned but never used
Impact: low
Show code
local marked_times = {} -- table for unified time management

zz_bind_monster_cm.script

L12 🟢 repeated_self_object_id()
self.object:id() called 3x in <global>
Impact: low
Show code
Cache self.object:id() result
L43 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(id)
L59 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local squad = se_obj.group_id and se_obj.group_id ~= 65535 and sim:object(se_obj.group_id)

zzz_rebound_encounters_patches.script

L379 🟢 uncached_globals_summary
Cache 1 globals in SetMutantImageNew
Impact: medium
Show code
L393: tostring L399: tostring
L395 🔵 debug_statement
Debug call: print()
Impact: medium
Show code
print("Error: killed_mutant_tbl[mutant_id].file nil")
L401 🔵 debug_statement
Debug call: print()
Impact: medium
Show code
print("Error: killed_mutant_tbl[mutant_id].x nil")
L407 🔵 debug_statement
Debug call: print()
Impact: medium
Show code
print("Error: killed_mutant_tbl[mutant_id].y nil")
L410 🔵 debug_statement
Debug call: print()
Impact: medium
Show code
print("Error: killed_mutant_tbl[mutant_id] nil")
L11 🔴 global_write
Global write: kind_to_section
Impact: low
Show code
kind_to_section = {
L92 🔴 global_write
Global write: clsid_to_section
Impact: low
Show code
clsid_to_section = {
L114 🔴 global_write
Global write: clsdbg_to_section
Impact: low
Show code
clsdbg_to_section = {
L195 🔴 global_write
Global write: killed_mutant_tbl
Impact: low
Show code
killed_mutant_tbl = { -- ponney68: This table based on "species" of mutants
L316 🟡 unused_local_variable
Local variable 'sim' is assigned but never used
Impact: low
Show code
local sim = alife()
L317 🟡 unused_local_variable
Local variable 'npc_id' is assigned but never used
Impact: low
Show code
local npc_id = npc and npc:id()
L318 🟡 unused_local_variable
Local variable 'npc_pos' is assigned but never used
Impact: low
Show code
local npc_pos = npc and npc:position()
L319 🟡 unused_local_variable
Local variable 'npc_lvl_id' is assigned but never used
Impact: low
Show code
local npc_lvl_id = npc and npc:level_vertex_id()
L320 🟡 unused_local_variable
Local variable 'npc_game_id' is assigned but never used
Impact: low
Show code
local npc_game_id = npc and npc:game_vertex_id()

REPACK MINIMAL COLLECTION 1.0

1 file (🟢0 🟡0 🔴5 🔵0)

alticons.script

L10 🔴 global_write
Global write: size_adjust
Impact: low
Show code
size_adjust = 0.75
L12 🔴 global_write
Global write: basethrst
Impact: low
Show code
basethrst = actor_status_thirst.create
L19 🔴 global_write
Global write: basesleep
Impact: low
Show code
basesleep = actor_status_sleep.create
L46 🔴 global_write
Global write: ratio
Impact: low
Show code
ratio = (device().height / device().width) / (768 / 1024)
L56 🔴 global_write
Global write: pos
Impact: low
Show code
pos = self.dialog:GetWndPos()

REPACK NITPICKER 1.2

3 files (🟢2 🟡5 🔴6 🔵6)

campfire_placeable.script

L49 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("tbl is empty || .level_name is now: %s", prev_level.level_name)
L51 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("tbl is not empty")
L53 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(".level_name is not equal curr_level")
L59 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("- Object deleted (id): %s", se_obj.id)
L217 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s degraded for: %s %", sec, degr_for * 100)
L229 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Time spent on chopping wood: %s Minutes", minutes)
L252 🔴 global_write
Global write: NameCustom
Impact: low
Show code
NameCustom = ui_inventory.UIInventory.Name_Custom
L269 🔴 global_write
Global write: ActionCustom
Impact: low
Show code
ActionCustom = ui_inventory.UIInventory.Action_Custom
L413 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update
L239 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L246 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L256 🟡 potential_nil_access
Potential nil access: 'active_item' from :active_item() used without nil check
Impact: low
Show code
local active_id = active_item and active_item:id()
L272 🟡 potential_nil_access
Potential nil access: 'active_item' from :active_item() used without nil check
Impact: low
Show code
local active_id = active_item and active_item:id()
L272 🟡 unused_local_variable
Local variable 'active_id' is assigned but never used
Impact: low
Show code
local active_id = active_item and active_item:id()

campfire_placeable_mcm.script

L14 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "campfire_placeable",sh=true ,gr={

trader_autoinject.script

L34 🟢 repeated_npc_id()
npc:id() called 3x in trade_manager.update
Impact: low
Show code
Cache npc:id() result
L182 🟢 repeated_item_section()
item:section() called 4x in itr_inv
Impact: low
Show code
Cache item:section() result
L16 🔴 global_write
Global write: find
Impact: low
Show code
find = string.find
L32 🔴 global_write
Global write: TraderUpdate
Impact: low
Show code
TraderUpdate = trade_manager.update

REVISION for Enhanced Visual Awareness and Motion Perception 0.89

3 files (🟢11 🟡12 🔴6 🔵2)

revision_mcm.script

L62 🔴 global_write
Global write: op
Impact: low
Show code
op = {id= "revision", sh=true , gr={

stealth_nvg.script

L131 🟢 repeated_npc_id()
npc:id() called 6x in npc_on_death_callback
Impact: low
Show code
Cache npc:id() result
L154 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L1 🔴 global_write
Global write: stealth_nvg_ps
Impact: low
Show code
stealth_nvg_ps = {}
L71 🔴 global_write
Global write: scuffed_sr_light_patch
Impact: low
Show code
scuffed_sr_light_patch = sr_light.check_light
L149 🔴 global_write
Global write: stealth_nvg_ps
Impact: low
Show code
stealth_nvg_ps = m_data.stealth_nvg_ps or {}
L90 🟡 potential_nil_access
Potential nil access: 'torch' from :object() used without nil check
Impact: low
Show code
if (torch and torch:attachable_item_enabled()) then

visual_memory_manager.script

L244 🟢 table_insert_append
table.insert(keys, v) -> keys[#keys+1] = v
Impact: high
Show code
for k,_ in pairs(profile) do table.insert(keys, k) end
L871 🟢 table_insert_append
table.insert(value_history, v) -> value_history[#value_history+1] = v
Impact: high
Show code
table.insert(value_history, new_value)
L990 🟢 table_insert_append
table.insert(npc_attacked, v) -> npc_attacked[#npc_attacked+1] = v
Impact: high
Show code
table.insert(npc_attacked, npc:id())
L188 🟢 uncached_globals_summary
Cache 1 globals in get_weather_category
Impact: medium
Show code
L197: string.find L197: string.find
L468 🟢 uncached_globals_summary
Cache 1 globals in compute_animation_factor
Impact: medium
Show code
L473: string.find L475: string.find
L371 🟢 repeated_target_entity_id()
target_entity:id() called 3x in compute_luminosity_factors
Impact: low
Show code
Cache target_entity:id() result
L601 🟢 repeated_target_entity_id()
target_entity:id() called 4x in get_visible_value
Impact: low
Show code
Cache target_entity:id() result
L754 🟢 repeated_current_outfit_section()
current_outfit:section() called 3x in on_item_equipped_or_removed
Impact: low
Show code
Cache current_outfit:section() result
L807 🟢 repeated_db_actor_id()
db.actor:id() called 4x in actor_on_weapon_fired
Impact: low
Show code
Cache db.actor:id() result
L820 🟢 repeated_npc_id()
npc:id() called 4x in npc_on_weapon_fired
Impact: low
Show code
Cache npc:id() result
L1055 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L757 🔴 global_write
Global write: jacketmult
Impact: low
Show code
jacketmult = kind and jacket_t[kind] or 1
L1047 🔴 global_write
Global write: stealth_light_ind
Impact: low
Show code
stealth_light_ind = { 0, false }
L546 🟡 potential_nil_access
Potential nil access: 'actor_headlamp' from :item_in_slot() used without nil check
Impact: low
Show code
if actor_headlamp and actor_headlamp:torch_enabled() then
L548 🟡 potential_nil_access
Potential nil access: 'actor_flashlight' from :item_in_slot() used without nil check
Impact: low
Show code
elseif actor_flashlight and (actor_flashlight:section() == "device_flashlight") and db.actor:active_detector() then
L680 🟡 potential_nil_access
Potential nil access: 'observer_enemy' from :best_enemy() used without nil check
Impact: low
Show code
if IsStalker(observer_npc) and observer_enemy and IsStalker(observer_enemy) and observer_enemy:alive() and state_mgr.get_state( observer_enemy ) ~= "sleep" and observer_enemy:id() == target_entity:id() then
L680 🟡 potential_nil_access
Potential nil access: 'observer_enemy' from :best_enemy() used without nil check
Impact: low
Show code
if IsStalker(observer_npc) and observer_enemy and IsStalker(observer_enemy) and observer_enemy:alive() and state_mgr.get_state( observer_enemy ) ~= "sleep" and observer_enemy:id() == target_entity:id() then
L754 🟡 potential_nil_access
Potential nil access: 'current_outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local kind = current_outfit and ini_sys:r_string_ex(current_outfit:section(),"kind")
L755 🟡 potential_nil_access
Potential nil access: 'current_outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local has_camo_line = current_outfit and ini_sys:line_exist(current_outfit:section(), "npc_blindness_koeff")
L756 🟡 potential_nil_access
Potential nil access: 'current_outfit' from :item_in_slot() used without nil check
Impact: low
Show code
outfit_camo_coefficient = has_camo_line and ini_sys:r_float(current_outfit:section(), "npc_blindness_koeff") or 0
L805 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if not (wpn) or not (IsWeapon(wpn)) or IsMelee(wpn) or wpn:weapon_is_silencer() then return end
L840 🟡 potential_nil_access
Potential nil access: 'targeted_object' from level.get_target_obj() used without nil check
Impact: low
Show code
local is_targeted = targeted_object and IsStalker(targeted_object) and targeted_object:alive() and (targeted_object:id() == observer_npc:id())
L840 🟡 potential_nil_access
Potential nil access: 'targeted_object' from level.get_target_obj() used without nil check
Impact: low
Show code
local is_targeted = targeted_object and IsStalker(targeted_object) and targeted_object:alive() and (targeted_object:id() == observer_npc:id())
L127 🟡 unused_local_variable
Local variable 'mid' is assigned but never used
Impact: low
Show code
local mid = min + range / 2

Raven's Tooltips on the Side

2 files (🟢1 🟡5 🔴10 🔵1)

zz_move_tooltip.script

L86 🟢 uncached_globals_summary
Cache 1 globals in Update
Impact: medium
Show code
L225: math.ceil L245: math.ceil
L9 🔴 global_write
Global write: wind_x
Impact: low
Show code
wind_x = 10
L10 🔴 global_write
Global write: wind_y
Impact: low
Show code
wind_y = 10
L11 🔴 global_write
Global write: move_to_bottom
Impact: low
Show code
move_to_bottom = true
L14 🔴 global_write
Global write: curPos
Impact: low
Show code
curPos = GetCursorPosition()
L69 🟡 unused_local_variable
Local variable 'clr_list_hl' is assigned but never used
Impact: low
Show code
local clr_list_hl = {
L76 🟡 unused_local_variable
Local variable 'bar_list' is assigned but never used
Impact: low
Show code
local bar_list = {
L160 🟡 unused_local_variable
Local variable 'cls' is assigned but never used
Impact: low
Show code
local cls = obj:clsid()

zz_parts_in_tooltip.script

L7 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(error_or_result)
L19 🔴 global_write
Global write: wind_x
Impact: low
Show code
wind_x = 10
L20 🔴 global_write
Global write: wind_y
Impact: low
Show code
wind_y = 10
L21 🔴 global_write
Global write: move_to_bottom
Impact: low
Show code
move_to_bottom = true
L24 🔴 global_write
Global write: curPos
Impact: low
Show code
curPos = GetCursorPosition()
L55 🔴 global_write
Global write: og_info_item_init
Impact: low
Show code
og_info_item_init = utils_ui.UIInfoItem.__init
L179 🔴 global_write
Global write: og_info_item_update
Impact: low
Show code
og_info_item_update = utils_ui.UIInfoItem.Update
L117 🟡 unused_local_variable
Local variable 'parts_pos' is assigned but never used
Impact: low
Show code
local parts_pos = self.parts:GetWndPos()
L118 🟡 unused_local_variable
Local variable 'parts_size' is assigned but never used
Impact: low
Show code
local parts_size = {x = self.parts:GetWidth(), y = self.parts:GetHeight()}

ReDone_Collection_NORTH

6 files (🟢18 🟡11 🔴23 🔵39)

gamma_dynamic_radiation_areas_from_arzsi.script

L403 🟢 table_insert_append
table.insert(smarts_of_level, v) -> smarts_of_level[#smarts_of_level+1] = v
Impact: high
Show code
table.insert(smarts_of_level, smart)
L318 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("spawn_radiation_fields_at_new_game()")
L338 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("get blacklisted smarts")
L341 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Iterate through smarts")
L348 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Spawn default radiation zone for smart: "..name_of_smart)
L359 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Smart: "..name_of_smart.." is black listed, skip")
L367 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("create_radiation_field: "..anomaly_type.." Radius: "..radius.. " *****************")
L369 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("spawn anomaly")
L373 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("NO ANOMALY WERE SPAWNED")
L379 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( "Error: Unable to set dynamic anomaly properties" )
L390 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(se_obj.id)
L391 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Radiation field was spawned succesfully")
L396 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("get_smart_terrains_of_level("..level_name..")")
L414 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("INITIALIZE - dosimeter_volume")
L311 🔴 global_write
Global write: environmental_radiation
Impact: low
Show code
environmental_radiation = 0
L321 🔴 global_write
Global write: run_script
Impact: low
Show code
run_script = 1
L325 🔴 global_write
Global write: run_script
Impact: low
Show code
run_script = 0
L397 🔴 global_write
Global write: smarts_of_level
Impact: low
Show code
smarts_of_level = {}
L400 🔴 global_write
Global write: cvertex
Impact: low
Show code
cvertex = smart and game_graph():vertex(smart.m_game_vertex_id)
L255 🟡 unused_local_variable
Local variable 'blacklisted_static_radiation_anomalies' is assigned but never used
Impact: low
Show code
local blacklisted_static_radiation_anomalies = {
L291 🟡 unused_local_variable
Local variable 'underground_maps' is assigned but never used
Impact: low
Show code
local underground_maps = {
L305 🟡 unused_local_variable
Local variable 'radiation_zones' is assigned but never used
Impact: low
Show code
local radiation_zones = {}

redone_extended_bs_psy_field.script

L18 🔴 global_write
Global write: psy_damage
Impact: low
Show code
psy_damage = 0
L25 🔴 global_write
Global write: psy_damage
Impact: low
Show code
psy_damage = 1
L30 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 0
L31 🔴 global_write
Global write: delay
Impact: low
Show code
delay = 8500
L33 🔴 global_write
Global write: tg
Impact: low
Show code
tg = time_global()
L36 🔴 global_write
Global write: redone_delay
Impact: low
Show code
redone_delay = tg + delay
L37 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 1
L41 🔴 global_write
Global write: damage
Impact: low
Show code
damage = 0.08
L47 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 0

redone_extended_da_psy_field.script

L16 🔴 global_write
Global write: psy_damage
Impact: low
Show code
psy_damage = 0
L23 🔴 global_write
Global write: psy_damage
Impact: low
Show code
psy_damage = 1
L28 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 0
L29 🔴 global_write
Global write: delay
Impact: low
Show code
delay = 8500
L31 🔴 global_write
Global write: tg
Impact: low
Show code
tg = time_global()
L34 🔴 global_write
Global write: redone_delay
Impact: low
Show code
redone_delay = tg + delay
L35 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 1
L39 🔴 global_write
Global write: damage
Impact: low
Show code
damage = 0.08
L45 🔴 global_write
Global write: trigger
Impact: low
Show code
trigger = 0

redone_xr_dynamic_object.script

L4 🟢 uncached_globals_summary
Cache 2 globals in dynamic_object
Impact: medium
Show code
L30: tonumber L30: tonumber L31: string.find L37: string.find
L83 🟢 uncached_globals_summary
Cache 2 globals in get_object_config
Impact: medium
Show code
L89: tonumber L90: tonumber L92: math.rad L93: math.rad
L30 🟢 repeated_alife
alife called 4x in dynamic_object
Impact: low
Show code
local sim = alife()
L21 🟡 unused_local_variable
Local variable 'r' is assigned but never used
Impact: low
Show code
local r,i,v = ini:r_line("exclusive",k)

tasks_agent_rescue.script

L79 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L110 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('! join_message: se_obj (%s) is nil!', id)
L121 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('! leave_message: se_obj (%s) is nil!', id)
L195 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('var nil in task %s', task_id)
L201 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('squad_id nil in task %s', task_id)
L207 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('se_squad nil in task %s', task_id)
L280 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('var nil in task %s', task_id)
L289 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('se_squad nil in task %s', task_id)
L295 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('se_spy nil in task %s', task_id)
L300 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('se_spy has died in task %s', task_id)
L349 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('var nil in task %s', task_id)
L358 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('se_squad nil in task %s', task_id)
L477 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | no faction_lookup table", task_id)
L236 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(i)
L323 🟡 potential_nil_access
Potential nil access: 'npc' from level.object_by_id() used without nil check
Impact: low
Show code
npc:set_relation(game_object.friend,db.actor)
L324 🟡 potential_nil_access
Potential nil access: 'npc' from level.object_by_id() used without nil check
Impact: low
Show code
npc:set_character_community(var.giver_comm, 0, 0 )
L365 🟡 potential_nil_access
Potential nil access: 'obj_giver' from level.object_by_id() used without nil check
Impact: low
Show code
local pos_giver = obj_giver and obj_giver:position() or se_giver and se_giver.position
L488 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local lvl = sim:level_name(gg:vertex(squad.m_game_vertex_id):level_id())

xr_logic_ex.script

L85 🟢 uncached_globals_summary
Cache 1 globals in get_waypoint
Impact: medium
Show code
L92: tonumber L92: tonumber
L166 🟢 uncached_globals_summary
Cache 3 globals in xr_effects.animpoint
Impact: medium
Show code
L211: math.random L245: math.random L216: pairs L223: pairs L291: tostring L308: tostring
L411 🟢 uncached_globals_summary
Cache 3 globals in load_animpoint
Impact: medium
Show code
L419: tostring L468: tostring L421: tonumber L425: tonumber L423: string.gmatch L432: string.gmatch
L669 🟢 uncached_globals_summary
Cache 2 globals in mutant_load_path
Impact: medium
Show code
L683: string.gmatch L689: string.gmatch L686: tonumber L695: tonumber
L731 🟢 uncached_globals_summary
Cache 1 globals in vector_angle_diff
Impact: medium
Show code
L735: math.abs L735: math.abs
L898 🟢 uncached_globals_summary
Cache 2 globals in npc_logic_update
Impact: medium
Show code
L911: tostring L919: tostring L912: tonumber L920: tonumber
L1002 🟢 uncached_globals_summary
Cache 1 globals in npc_set_position
Impact: medium
Show code
L1037: tonumber L1037: tonumber
L1083 🟢 uncached_globals_summary
Cache 3 globals in npc_on_before_hit
Impact: medium
Show code
L1090: string.find L1098: string.find L1091: tonumber L1104: tonumber L1101: tostring L1101: tostring
L12 🟢 repeated_npc_id()
npc:id() called 5x in <global>
Impact: low
Show code
Cache npc:id() result
L167 🟢 repeated_npc_id()
npc:id() called 7x in xr_effects.animpoint
Impact: low
Show code
Cache npc:id() result
L617 🟢 repeated_npc_clsid()
npc:clsid() called 3x in xr_effects.mutant_path
Impact: low
Show code
Cache npc:clsid() result
L1294 🟢 repeated_device
device called 3x in execute
Impact: low
Show code
local dev = device()
L185 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: animpoint %s | %s",st.active_section,dt.level_vertex_id)
L224 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: load_campfire_actions [%s] %s is_in_camp %s %s",npc:name(),dt.active_section,is_in_camp,v and v.name)
L236 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: [%s] %s no camp",npc:name(),dt.active_section)
L271 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: animpoint load campfire action %s %s",dt.active_section,v)
L315 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: xr_logic_ex can not find %s %s",dt.active_section,dt.delay_animation)
L714 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: %s [%s] no dt.position",st.ini_filename,st.active_section)
L717 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: %s [%s] no dt.level_vertex_id",st.ini_filename,st.active_section)
L720 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: %s [%s] no dt.look_position",st.ini_filename,st.active_section)
L779 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: xr_logic_ex | load_storage_squad file %s doesn't exist.",ini_name)
L814 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: xr_logic_ex | load_storage_logic file %s doesn't exist.",ini_name)
L889 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: squad_target_update teleport [%s] %s %s",squad:name(),new_target,squad.scripted_target)
L939 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: xr_logic_ex | old logic [%s] %s %s",npc:name(),st.section_logic,st.active_section)
L954 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: xr_logic_ex | new logic [%s] %s %s %s",npc:name(),ini_name,new_logic,new_section)
L861 🟢 dead_code_if_false
Dead code: if false (lines 861-880)
Impact: low
Show code
if (false) then
L1027 🟢 dead_code_if_false
Dead code: if false (lines 1027-1042)
Impact: low
Show code
if (false) then
L1143 🟡 unused_local_variable
Local variable 'r' is assigned but never used
Impact: low
Show code
local r,i,v = smart.ini:r_line("on_changing_level",k)
L824 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result,i,v = ini:r_line("section@logic",k)

ReDone_Collection_SOUTH

4 files (🟢17 🟡10 🔴0 🔵27)

redone_remove_labx16_object.script

L23 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Release [%s]",se:name())
L21 🟡 potential_nil_access
Potential nil access: 'se' from :object() used without nil check
Impact: low
Show code
if (se and section_list[se:section_name()] and simulation_objects.is_on_the_same_level(se,smart) and zone:inside(se.position)) then
L23 🟡 potential_nil_access
Potential nil access: 'se' from :object() used without nil check
Impact: low
Show code
printf("Release [%s]",se:name())

redone_xr_dynamic_object.script

L4 🟢 uncached_globals_summary
Cache 2 globals in dynamic_object
Impact: medium
Show code
L30: tonumber L30: tonumber L31: string.find L37: string.find
L83 🟢 uncached_globals_summary
Cache 2 globals in get_object_config
Impact: medium
Show code
L89: tonumber L90: tonumber L92: math.rad L93: math.rad
L30 🟢 repeated_alife
alife called 4x in dynamic_object
Impact: low
Show code
local sim = alife()
L21 🟡 unused_local_variable
Local variable 'r' is assigned but never used
Impact: low
Show code
local r,i,v = ini:r_line("exclusive",k)

tasks_agent_rescue.script

L79 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L110 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('! join_message: se_obj (%s) is nil!', id)
L121 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('! leave_message: se_obj (%s) is nil!', id)
L195 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('var nil in task %s', task_id)
L201 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('squad_id nil in task %s', task_id)
L207 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('se_squad nil in task %s', task_id)
L280 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('var nil in task %s', task_id)
L289 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('se_squad nil in task %s', task_id)
L295 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('se_spy nil in task %s', task_id)
L300 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('se_spy has died in task %s', task_id)
L349 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('var nil in task %s', task_id)
L358 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('se_squad nil in task %s', task_id)
L477 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | no faction_lookup table", task_id)
L236 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(i)
L323 🟡 potential_nil_access
Potential nil access: 'npc' from level.object_by_id() used without nil check
Impact: low
Show code
npc:set_relation(game_object.friend,db.actor)
L324 🟡 potential_nil_access
Potential nil access: 'npc' from level.object_by_id() used without nil check
Impact: low
Show code
npc:set_character_community(var.giver_comm, 0, 0 )
L365 🟡 potential_nil_access
Potential nil access: 'obj_giver' from level.object_by_id() used without nil check
Impact: low
Show code
local pos_giver = obj_giver and obj_giver:position() or se_giver and se_giver.position
L488 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local lvl = sim:level_name(gg:vertex(squad.m_game_vertex_id):level_id())

xr_logic_ex.script

L85 🟢 uncached_globals_summary
Cache 1 globals in get_waypoint
Impact: medium
Show code
L92: tonumber L92: tonumber
L166 🟢 uncached_globals_summary
Cache 3 globals in xr_effects.animpoint
Impact: medium
Show code
L211: math.random L245: math.random L216: pairs L223: pairs L291: tostring L308: tostring
L411 🟢 uncached_globals_summary
Cache 3 globals in load_animpoint
Impact: medium
Show code
L419: tostring L468: tostring L421: tonumber L425: tonumber L423: string.gmatch L432: string.gmatch
L669 🟢 uncached_globals_summary
Cache 2 globals in mutant_load_path
Impact: medium
Show code
L683: string.gmatch L689: string.gmatch L686: tonumber L695: tonumber
L731 🟢 uncached_globals_summary
Cache 1 globals in vector_angle_diff
Impact: medium
Show code
L735: math.abs L735: math.abs
L898 🟢 uncached_globals_summary
Cache 2 globals in npc_logic_update
Impact: medium
Show code
L911: tostring L919: tostring L912: tonumber L920: tonumber
L1002 🟢 uncached_globals_summary
Cache 1 globals in npc_set_position
Impact: medium
Show code
L1037: tonumber L1037: tonumber
L1083 🟢 uncached_globals_summary
Cache 3 globals in npc_on_before_hit
Impact: medium
Show code
L1090: string.find L1098: string.find L1091: tonumber L1104: tonumber L1101: tostring L1101: tostring
L12 🟢 repeated_npc_id()
npc:id() called 5x in <global>
Impact: low
Show code
Cache npc:id() result
L167 🟢 repeated_npc_id()
npc:id() called 7x in xr_effects.animpoint
Impact: low
Show code
Cache npc:id() result
L617 🟢 repeated_npc_clsid()
npc:clsid() called 3x in xr_effects.mutant_path
Impact: low
Show code
Cache npc:clsid() result
L1294 🟢 repeated_device
device called 3x in execute
Impact: low
Show code
local dev = device()
L185 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: animpoint %s | %s",st.active_section,dt.level_vertex_id)
L224 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: load_campfire_actions [%s] %s is_in_camp %s %s",npc:name(),dt.active_section,is_in_camp,v and v.name)
L236 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: [%s] %s no camp",npc:name(),dt.active_section)
L271 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: animpoint load campfire action %s %s",dt.active_section,v)
L315 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: xr_logic_ex can not find %s %s",dt.active_section,dt.delay_animation)
L714 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: %s [%s] no dt.position",st.ini_filename,st.active_section)
L717 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: %s [%s] no dt.level_vertex_id",st.ini_filename,st.active_section)
L720 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: %s [%s] no dt.look_position",st.ini_filename,st.active_section)
L779 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: xr_logic_ex | load_storage_squad file %s doesn't exist.",ini_name)
L814 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: xr_logic_ex | load_storage_logic file %s doesn't exist.",ini_name)
L889 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: squad_target_update teleport [%s] %s %s",squad:name(),new_target,squad.scripted_target)
L939 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: xr_logic_ex | old logic [%s] %s %s",npc:name(),st.section_logic,st.active_section)
L954 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: xr_logic_ex | new logic [%s] %s %s %s",npc:name(),ini_name,new_logic,new_section)
L861 🟢 dead_code_if_false
Dead code: if false (lines 861-880)
Impact: low
Show code
if (false) then
L1027 🟢 dead_code_if_false
Dead code: if false (lines 1027-1042)
Impact: low
Show code
if (false) then
L1143 🟡 unused_local_variable
Local variable 'r' is assigned but never used
Impact: low
Show code
local r,i,v = smart.ini:r_line("on_changing_level",k)
L824 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result,i,v = ini:r_line("section@logic",k)

ReDone_Combat_AI_v

12 files (🟢34 🟡55 🔴23 🔵47)

axr_beh.script

L539 🟢 uncached_globals_summary
Cache 2 globals in get_current_waypoint
Impact: medium
Show code
L561: string.gmatch L565: string.gmatch L563: tonumber L563: tonumber
L188 🟢 repeated_self_object_id()
self.object:id() called 6x in set_desired_target
Impact: low
Show code
Cache self.object:id() result
L458 🟢 repeated_self_object_id()
self.object:id() called 4x in beh_path
Impact: low
Show code
Cache self.object:id() result
L540 🟢 repeated_self_object_id()
self.object:id() called 3x in get_current_waypoint
Impact: low
Show code
Cache self.object:id() result
L9 🔴 global_write
Global write: beh_evid
Impact: low
Show code
beh_evid = 188111
L10 🔴 global_write
Global write: beh_actid
Impact: low
Show code
beh_actid = 188111
L171 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
t.level_vertex_id = obj:level_vertex_id()
L172 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
t.game_vertex_id = obj:game_vertex_id()
L173 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
t.position = obj:position()
L174 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
t.direction = obj:direction()

axr_fight_from_cover.script

L424 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("axr_fight_from_cover: no action id p[%s]",i)
L9 🔴 global_write
Global write: actid
Impact: low
Show code
actid = 188118
L10 🔴 global_write
Global write: evaid
Impact: low
Show code
evaid = 188118
L103 🟡 potential_nil_access
Potential nil access: 'bd' from :best_danger() used without nil check
Impact: low
Show code
if (bd and bd:type() == danger_object.grenade and st.danger_flag == true) then
L112 🟡 potential_nil_access
Potential nil access: 'be' from :best_enemy() used without nil check
Impact: low
Show code
if (be and be:alive() and not IsWounded(be)) then
L197 🟡 potential_nil_access
Potential nil access: 'enemy' from :best_enemy() used without nil check
Impact: low
Show code
local see_me = enemy:see(npc)
L292 🟡 potential_nil_access
Potential nil access: 'enemy' from :best_enemy() used without nil check
Impact: low
Show code
local dist = npc:position():distance_to_sqr(enemy:position())
L337 🟡 potential_nil_access
Potential nil access: 'enemy' from :best_enemy() used without nil check
Impact: low
Show code
if (self:try_go_cover(npc,ene_pos or enemy:position())) then
L420 🟡 potential_nil_access
Potential nil access: 'manager' from :motivation_action_manager() used without nil check
Impact: low
Show code
action = manager:action(p[i])

redone_ai_schemes.script

L53 🟢 repeated_npc_id()
npc:id() called 3x in npc_on_hit_callback
Impact: low
Show code
Cache npc:id() result
L53 🟢 repeated_who_id()
who:id() called 2x in npc_on_hit_callback
Impact: low
Show code
Cache who:id() result
L288 🟢 repeated_npc_id()
npc:id() called 24x in scheme_cover_coward
Impact: low
Show code
Cache npc:id() result
L354 🟢 repeated_npc_id()
npc:id() called 23x in scheme_camper_coward
Impact: low
Show code
Cache npc:id() result
L424 🟢 repeated_npc_id()
npc:id() called 24x in scheme_cover_dumb
Impact: low
Show code
Cache npc:id() result
L490 🟢 repeated_npc_id()
npc:id() called 23x in scheme_camper_dumb
Impact: low
Show code
Cache npc:id() result
L580 🟢 repeated_npc_id()
npc:id() called 6x in scheme_stupid
Impact: low
Show code
Cache npc:id() result
L83 🔴 global_write
Global write: table_npc
Impact: low
Show code
table_npc = m_data.table_npc
L84 🔴 global_write
Global write: dumb_table
Impact: low
Show code
dumb_table = m_data.dumb_table
L85 🔴 global_write
Global write: coward_table
Impact: low
Show code
coward_table = m_data.coward_table
L86 🔴 global_write
Global write: stupid_table
Impact: low
Show code
stupid_table = m_data.stupid_table
L87 🔴 global_write
Global write: swicth_table
Impact: low
Show code
swicth_table = m_data.swicth_table
L88 🔴 global_write
Global write: swicth_table2
Impact: low
Show code
swicth_table2 = m_data.swicth_table2
L89 🔴 global_write
Global write: swicth_table3
Impact: low
Show code
swicth_table3 = m_data.swicth_table3
L577 🟡 unused_local_variable
Local variable 'is_actor' is assigned but never used
Impact: low
Show code
local is_actor = enemy_id == db.actor:id()
L579 🟡 unused_local_variable
Local variable 'is_friend' is assigned but never used
Impact: low
Show code
local is_friend = character_community(db.actor) == character_community(enemy2)
L585 🟡 unused_local_variable
Local variable 'time_in_memory' is assigned but never used
Impact: low
Show code
local time_in_memory = time_global()

sr_light.script

L84 🟢 repeated_torch_id()
torch:id() called 7x in check_light
Impact: low
Show code
Cache torch:id() result

visual_memory_manager.script

L70 🟢 repeated_who_id()
who:id() called 7x in get_visible_value
Impact: low
Show code
Cache who:id() result
L70 🟢 repeated_db_actor_id()
db.actor:id() called 5x in get_visible_value
Impact: low
Show code
Cache db.actor:id() result
L107 🟢 repeated_npc_id()
npc:id() called 13x in get_visible_value
Impact: low
Show code
Cache npc:id() result
L170 🟢 repeated_obj_id()
obj:id() called 4x in get_visible_value
Impact: low
Show code
Cache obj:id() result
L251 🟢 repeated_outfit_section()
outfit:section() called 3x in slot_in_out
Impact: low
Show code
Cache outfit:section() result
L268 🟢 repeated_npc_id()
npc:id() called 2x in npc_on_before_hit
Impact: low
Show code
Cache npc:id() result
L274 🟢 repeated_member_id()
member:id() called 2x in npc_on_before_hit
Impact: low
Show code
Cache member:id() result
L178 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('---------------------------------------------------------------')
L179 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Weather is: " .. (wthrs))
L180 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("1. Luminocity ---------- %s", Luminocity)
L181 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("1.a) luminocity --------- %s", luminocity)
L182 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("1.b) lights_lum() ------- %s", lights_lum())
L183 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("1.c) who:get_lum() ---- %s", who:get_luminocity())
L184 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("2. Velocity ------------- %s", Velocity)
L185 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("3. dist_original --------- %s", distance)
L186 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("4. weight&outfit ------- %s", weight)
L187 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("5. crouch ------------- %s", crouch)
L188 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("6.a) shot_mult --------- %s", shot_mult)
L189 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("6.b) danger ------------ %s", danger_mult)
L190 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("6.c) camo ------------- %s", camo_x)
L191 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("6.d) ai scheme --------- %s", scheme_mult)
L192 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("6.e) get_camo_k ------ %s", get_camo_k)
L193 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("6.f) jacketmult --------- %s", jacketmult)
L194 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("7. memory ------------- %s", memory_factor)
L195 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("8. Step incr --- %s", step_incr)
L70 🟡 potential_nil_access
Potential nil access: 'torch' from :item_in_slot() used without nil check
Impact: low
Show code
local actor_torch_active = (who and (who:id() == db.actor:id()) and ( (torch and torch:torch_enabled()) or (flash and (flash:section() == "device_flashlight") and db.actor:active_detector()) ))
L70 🟡 potential_nil_access
Potential nil access: 'flash' from :item_in_slot() used without nil check
Impact: low
Show code
local actor_torch_active = (who and (who:id() == db.actor:id()) and ( (torch and torch:torch_enabled()) or (flash and (flash:section() == "device_flashlight") and db.actor:active_detector()) ))
L170 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
if (obj and (obj:alive()) and (who and (who:id() == db.actor:id() or who:id() == obj:id() ) and npc and (npc:id() == db.actor:id() or npc:id() == obj:id() ))) and (not obj:see(db.actor)) then
L170 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
if (obj and (obj:alive()) and (who and (who:id() == db.actor:id() or who:id() == obj:id() ) and npc and (npc:id() == db.actor:id() or npc:id() == obj:id() ))) and (not obj:see(db.actor)) then
L170 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
if (obj and (obj:alive()) and (who and (who:id() == db.actor:id() or who:id() == obj:id() ) and npc and (npc:id() == db.actor:id() or npc:id() == obj:id() ))) and (not obj:see(db.actor)) then
L170 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
if (obj and (obj:alive()) and (who and (who:id() == db.actor:id() or who:id() == obj:id() ) and npc and (npc:id() == db.actor:id() or npc:id() == obj:id() ))) and (not obj:see(db.actor)) then
L172 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
elseif obj and obj:see(db.actor) then
L227 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if not (IsWeapon(wpn)) or IsMelee(wpn) or wpn:weapon_is_silencer() then return end
L251 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local kind = outfit and ini_sys:r_string_ex(outfit:section(),"kind")
L252 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local get_camo_get_line = outfit and ini_sys:line_exist(outfit:section(), "npc_blindness_koeff")
L253 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
get_camo_k = get_camo_get_line and ini_sys:r_float(outfit:section(), "npc_blindness_koeff") or 0
L273 🟡 potential_nil_access
Potential nil access: 'member' from level.object_by_id() used without nil check
Impact: low
Show code
if member and member.alive and member:alive() then

xr_combat_camper.script

L97 🟢 repeated_device
device called 3x in execute
Impact: low
Show code
local dev = device()
L35 🟡 potential_nil_access
Potential nil access: 'be' from :best_enemy() used without nil check
Impact: low
Show code
self.st.last_seen_pos = be:position()

xr_combat_camper_ex.script

L41 🟢 repeated_device
device called 3x in execute
Impact: low
Show code
local dev = device()

xr_combat_ignore.script

L25 🟢 repeated_who_id()
who:id() called 2x in npc_on_hit_callback
Impact: low
Show code
Cache who:id() result
L421 🟢 repeated_obj_id()
obj:id() called 3x in hit_callback
Impact: low
Show code
Cache obj:id() result
L460 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("xr_combat_ignore: reset_generic_scheme storage is nil! npc=%s scheme=%s section=%s",npc and npc:name(),scheme,section)
L7 🔴 global_write
Global write: fighting_with_actor_npcs
Impact: low
Show code
fighting_with_actor_npcs = {}
L8 🔴 global_write
Global write: safe_zone_npcs
Impact: low
Show code
safe_zone_npcs = {}
L183 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(id)
L421 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(obj:id())
L423 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local squad = se_obj.group_id and se_obj.group_id ~= 65535 and sim:object(se_obj.group_id)

xr_conditions.script

L2204 🟢 table_insert_append
table.insert(reachable_theme, v) -> reachable_theme[#reachable_theme+1] = v
Impact: high
Show code
table.insert(reachable_theme,k)
L2444 🟢 table_insert_append
table.insert(hint_table, v) -> hint_table[#hint_table+1] = v
Impact: high
Show code
table.insert(hint_table, "st_upgr_toolkit_1")
L2449 🟢 table_insert_append
table.insert(hint_table, v) -> hint_table[#hint_table+1] = v
Impact: high
Show code
table.insert(hint_table, "st_upgr_toolkit_2")
L2454 🟢 table_insert_append
table.insert(hint_table, v) -> hint_table[#hint_table+1] = v
Impact: high
Show code
table.insert(hint_table, "st_upgr_toolkit_3")
L2464 🟢 table_insert_append
table.insert(hint_table, v) -> hint_table[#hint_table+1] = v
Impact: high
Show code
table.insert(hint_table, "st_upgr_vodka")
L2466 🟢 table_insert_append
table.insert(hint_table, v) -> hint_table[#hint_table+1] = v
Impact: high
Show code
table.insert(hint_table, "st_upgr_vodka")
L2175 🟢 uncached_globals_summary
Cache 1 globals in jup_b221_who_will_start
Impact: medium
Show code
L2203: tostring L2205: tostring
L2672 🟢 uncached_globals_summary
Cache 1 globals in job_on_point
Impact: medium
Show code
L2687: tonumber L2698: tonumber
L1005 🟢 repeated_npc_id()
npc:id() called 3x in deadly_hit
Impact: low
Show code
Cache npc:id() result
L359 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("couldnt find talking npc")
L744 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong parameter in 'dist_to_actor_le' function!!!")
L752 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong parameter in 'dist_to_actor_ge' function!!!")
L928 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong number of params in npc_community")
L948 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong number of params in npc_rank")
L959 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong number of params in npc_profile")
L1394 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Not enough arguments in 'is_squad_enemy_to_actor' funciton!")
L1456 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
if detector_section == nil then printf("Wrong parameters in function 'actor_active_detector'") end
L1583 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Insufficient params in squad_in_zone function. story_id[%s], zone_name[%s]", tostring(story_id), tostring(zone_name))
L1617 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Insufficient params in squad_has_enemy function. story_id [%s]", tostring(story_id))
L1642 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Insufficient params in squad_in_zone_all function. story_id[%s], zone_name[%s]", tostring(story_id), tostring(zone_name))
L1720 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong parameters")
L1742 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong parameters")
L1752 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("Wrong parameter story_id[%s] in squad_exist function", tostring(story_id))
L1770 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("~ERROR squad_name_exist | section [%s] doesn't exist in system_ini", tostring(story_id))
L1779 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~WARNING squad_name_exist | cant' get smart obeject [%s]", smart_name)
L1811 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong parameter squad_id[%s] in 'squad_npc_count_ge' function", tostring(squad_id))
L1850 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Signal rocket name is not set!")
L1855 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("No such signal rocket: [%s] on level", tostring(p[1]))
L1862 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("wrong story id")
L1961 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
if (p and p[1]) == nil then printf("Wrong parameters in function 'check_bloodsucker_state'!!!") end
L2205 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("jup_b221_who_will_start: table reachable_theme ------------------------------> [%s]", tostring(k))
L2209 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("No such parameters in function 'jup_b221_who_will_start'")
L2217 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Wrong parameters in function 'jup_b221_who_will_start'")
L1800 🔴 global_write
Global write: npc_id
Impact: low
Show code
npc_id = npc.id
L1802 🔴 global_write
Global write: npc_id
Impact: low
Show code
npc_id = npc:id()
L1040 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = id and sim:object(id)
L1055 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = id and sim:object(id)
L1090 🟡 potential_nil_access
Potential nil access: 'npc1' from :object() used without nil check
Impact: low
Show code
if npc1 and IsStalker( npc1 ) and npc1:alive( ) then
L1261 🟡 potential_nil_access
Potential nil access: 'be' from :best_enemy() used without nil check (auto-fixable)
Impact: low
Show code
return be and be:alive() or false
L1266 🟡 potential_nil_access
Potential nil access: 'best_enemy' from :best_enemy() used without nil check (auto-fixable)
Impact: low
Show code
return db.actor and best_enemy ~= nil and best_enemy:id() == AC_ID
L1543 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = p[1] and npc and (type(npc.id) == "function" and sim:object(npc:id()) or npc)
L1549 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
if (sim:level_name(gg:vertex(se_obj.m_game_vertex_id):level_id()) == p[1]) then
L1605 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = k.id and sim:object(k.id)
L1656 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = k.object or k.id and sim:object(k.id)
L2242 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = k.object or k.id and sim:object(k.id)
L2275 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = k.object or k.id and sim:object(k.id)
L2579 🟡 potential_nil_access
Potential nil access: 'mgun' from :get_car() used without nil check (auto-fixable)
Impact: low
Show code
return mgun:IsObjectVisible(actor)
L1589 🟡 unused_local_variable
Local variable 'sim_board' is assigned but never used
Impact: low
Show code
local sim_board = SIMBOARD
L1626 🟡 unused_local_variable
Local variable 'obj_by_id' is assigned but never used
Impact: low
Show code
local obj_by_id = level.object_by_id
L1693 🟡 unused_local_variable
Local variable 'al' is assigned but never used
Impact: low
Show code
local al = alife()

xr_cover.script

L20 🟢 uncached_globals_summary
Cache 1 globals in activate_scheme
Impact: medium
Show code
L42: math.random L42: math.random
L177 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("There is no path_center or smart in xr_cover.")

xr_danger.script

L271 🟢 repeated_npc_id()
npc:id() called 3x in is_danger
Impact: low
Show code
Cache npc:id() result
L1052 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("xr_danger: no action id p[%s]",i)
L8 🔴 global_write
Global write: evaid
Impact: low
Show code
evaid = 188113
L9 🔴 global_write
Global write: actid
Impact: low
Show code
actid = 188113
L17 🔴 global_write
Global write: DangerInertion
Impact: low
Show code
DangerInertion = utils_data.collect_section(ini,"danger_inertion",true)
L18 🔴 global_write
Global write: DangerInertionActor
Impact: low
Show code
DangerInertionActor = utils_data.collect_section(ini,"danger_inertion_actor",true)
L19 🔴 global_write
Global write: DangerIgnore
Impact: low
Show code
DangerIgnore = utils_data.collect_section(ini,"danger_object",true)
L20 🔴 global_write
Global write: DangerIgnoreActor
Impact: low
Show code
DangerIgnoreActor = utils_data.collect_section(ini,"danger_object_actor",true)
L86 🟡 potential_nil_access
Potential nil access: 'corpse_object' from :object() used without nil check (auto-fixable)
Impact: low
Show code
return corpse_object and IsStalker(corpse_object) and corpse_object:death_time() or 0
L300 🟡 potential_nil_access
Potential nil access: 'best_danger_object' from :object() used without nil check
Impact: low
Show code
local corpse_st = db.storage[best_danger_object:id()]
L406 🟡 potential_nil_access
Potential nil access: 'danger' from :best_danger() used without nil check
Impact: low
Show code
local from_actor = (danger:object() and (danger:object():id() == db.actor:id()))
L406 🟡 potential_nil_access
Potential nil access: 'danger' from :best_danger() used without nil check
Impact: low
Show code
local from_actor = (danger:object() and (danger:object():id() == db.actor:id()))
L409 🟡 potential_nil_access
Potential nil access: 'danger' from :best_danger() used without nil check
Impact: low
Show code
local bd_type = danger:type()
L851 🟡 potential_nil_access
Potential nil access: 'best_danger' from :best_danger() used without nil check
Impact: low
Show code
local best_danger_object = best_danger:object()
L852 🟡 potential_nil_access
Potential nil access: 'best_danger' from :best_danger() used without nil check
Impact: low
Show code
local bd_type = best_danger:type()
L853 🟡 potential_nil_access
Potential nil access: 'best_danger' from :best_danger() used without nil check
Impact: low
Show code
local dependent_object = best_danger:dependent_object()
L928 🟡 potential_nil_access
Potential nil access: 'bd' from :best_danger() used without nil check
Impact: low
Show code
local bd_type = bd:type()
L1048 🟡 potential_nil_access
Potential nil access: 'manager' from :motivation_action_manager() used without nil check
Impact: low
Show code
action = manager:action(p[i])
L801 🟡 unused_local_variable
Local variable 'dist_to_bdo' is assigned but never used
Impact: low
Show code
local dist_to_bdo = st.last_pos and npc:position():distance_to_sqr(st.last_pos) or 12 --( 30

xr_smartcover.script

L79 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("setting smartcover [gps] [%s] used [%s] for npc[%s]", self.cover_name , tostring(used), object:name())
L129 🔴 global_write
Global write: used
Impact: low
Show code
self.target_path, used = get_param_string(target_path, object)
L308 🔴 global_write
Global write: cover
Impact: low
Show code
cover = se_smart_cover.registered_smartcovers_by_lv_id[level_id][tcover.cover_vertex_id]

Reworked_Anomaly_grass_meshes_

1 file (🟢0 🟡0 🔴1 🔵0)

ssfx_florafixes_mcm.script

L8 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "florafixes", sh=true, text="ui_mcm_ssfx_module_florafixes", gr ={

S2 Ambience Sounds

51 files (🟢2 🟡1 🔴61 🔵0)

amb_defs.script

L6 🔴 global_write
Global write: generic_day_outdoor_sounds
Impact: low
Show code
generic_day_outdoor_sounds = {
L17 🔴 global_write
Global write: generic_night_outdoor_sounds
Impact: low
Show code
generic_night_outdoor_sounds = {
L28 🔴 global_write
Global write: event_list_cover_indoor
Impact: low
Show code
event_list_cover_indoor = {
L33 🔴 global_write
Global write: event_list_underground
Impact: low
Show code
event_list_underground = {
L47 🔴 global_write
Global write: event_list_on_rain_outdoor
Impact: low
Show code
event_list_on_rain_outdoor = {
L56 🔴 global_write
Global write: event_list_on_rain_indoor
Impact: low
Show code
event_list_on_rain_indoor = {
L61 🔴 global_write
Global write: event_list_on_storm_outdoor
Impact: low
Show code
event_list_on_storm_outdoor = {
L71 🔴 global_write
Global write: event_list_on_storm_indoor
Impact: low
Show code
event_list_on_storm_indoor = {
L76 🔴 global_write
Global write: map_specific_outdoor_sounds
Impact: low
Show code
map_specific_outdoor_sounds = {
L326 🔴 global_write
Global write: map_specific_underground_sounds
Impact: low
Show code
map_specific_underground_sounds = {
L356 🔴 global_write
Global write: underground_levels
Impact: low
Show code
underground_levels = {

amb_main.script

L173 🟢 uncached_globals_summary
Cache 1 globals in play_sound
Impact: medium
Show code
L181: math.random L184: math.random
L225 🟢 uncached_globals_summary
Cache 2 globals in actor_on_first_update
Impact: medium
Show code
L247: pairs L253: pairs L259: ipairs L261: ipairs
L441 🟡 potential_nil_access
Potential nil access: 'player' from db.actor() used without nil check
Impact: low
Show code
if not (player and player:alive()) then return end

amb_map_jupiter.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_k00_marsh.script

L1 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_k01_darkscape.script

L1 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_k02_trucks_cemetery.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l01_escape.script

L1 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l02_garbage.script

L1 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l03_agroprom.script

L1 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l04_darkvalley.script

L1 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l05_bar.script

L1 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l06_rostok.script

L1 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l07_military.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l08_yantar.script

L1 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l09_deadcity.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l10_limansk.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l10_radar.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l10_red_forest.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l11_hospital.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l11_pripyat.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l12_stancia.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l12_stancia_2.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_pripyat.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_y04_pole.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_zaton.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_mcm.script

L38 🔴 global_write
Global write: sound_categories
Impact: low
Show code
sound_categories = {

amb_static.script

L8 🔴 global_write
Global write: static_sound_emitters
Impact: low
Show code
static_sound_emitters = {} -- Sonidos Globales (Siempre activos)
L9 🔴 global_write
Global write: rain_sound_emitters
Impact: low
Show code
rain_sound_emitters = {} -- Sonidos de Lluvia (Solo activos con lluvia)

rain_amb_map_jupiter.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_k00_marsh.script

L5 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_k01_darkscape.script

L6 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_k02_trucks_cemetery.script

L6 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l01_escape.script

L6 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l02_garbage.script

L6 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l03_agroprom.script

L5 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l04_darkvalley.script

L6 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l05_bar.script

L5 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l06_rostok.script

L6 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l07_military.script

L6 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l08_yantar.script

L5 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l09_deadcity.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l10_limansk.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l10_radar.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l10_red_forest.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l11_hospital.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l11_pripyat.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l12_stancia.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l12_stancia_2.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l13_generators.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_pripyat.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_y04_pole.script

L5 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_zaton.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

S2 Ambience Sounds MCM

2 files (🟢3 🟡1 🔴1 🔵24)

amb_main.script

L180 🟢 uncached_globals_summary
Cache 1 globals in play_sound
Impact: medium
Show code
L194: math.random L197: math.random
L240 🟢 uncached_globals_summary
Cache 2 globals in actor_on_first_update
Impact: medium
Show code
L269: pairs L275: pairs L281: ipairs L283: ipairs
L477 🟢 uncached_globals_summary
Cache 2 globals in actor_on_update
Impact: medium
Show code
L521: string.format L533: string.format L522: tostring L523: tostring
L54 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[S2_AMB] " .. tostring(msg))
L182 🔵 debug_statement
Debug call: debug_log()
Impact: medium
Show code
debug_log("play_sound: No player position!")
L188 🔵 debug_statement
Debug call: debug_log()
Impact: medium
Show code
debug_log("play_sound: " .. sound_name .. " BLOCKED by MCM")
L216 🔵 debug_statement
Debug call: debug_log()
Impact: medium
Show code
debug_log("play_sound: Failed to load " .. sound_path)
L241 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[S2_AMB] actor_on_first_update called")
L245 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[S2_AMB] ERROR: amb_defs is nil! Sounds will not work!")
L310 🔵 debug_statement
Debug call: debug_log()
Impact: medium
Show code
debug_log("process_sound_list: sound_list is nil!")
L326 🔵 debug_statement
Debug call: debug_log()
Impact: medium
Show code
debug_log("Played: " .. event.name .. sound_index)
L418 🔵 debug_statement
Debug call: debug_log()
Impact: medium
Show code
debug_log(string.format("Rain cache rebuilt: %d nearby emitters (of %d total)", #rain_nearby_cache, #emitters))
L480 🔵 debug_statement
Debug call: debug_log()
Impact: medium
Show code
debug_log("Mod is DISABLED")
L511 🔵 debug_statement
Debug call: debug_log()
Impact: medium
Show code
debug_log("ERROR: amb_defs is nil!")
L521 🔵 debug_statement
Debug call: debug_log()
Impact: medium
Show code
debug_log(string.format("Level: %s | Hour: %d | Night: %s | Rain: %.2f | Underground: %s | Cover: %s",
L533 🔵 debug_statement
Debug call: debug_log()
Impact: medium
Show code
debug_log(string.format("Rain check: is_raining=%s, is_storming=%s, rain_enabled=%s",
L543 🔵 debug_statement
Debug call: debug_log()
Impact: medium
Show code
debug_log("Mode: UNDERGROUND")
L554 🔵 debug_statement
Debug call: debug_log()
Impact: medium
Show code
debug_log("Mode: INDOOR (safe cover)")
L568 🔵 debug_statement
Debug call: debug_log()
Impact: medium
Show code
debug_log("Mode: OUTDOOR STORM")
L571 🔵 debug_statement
Debug call: debug_log()
Impact: medium
Show code
debug_log("Mode: OUTDOOR RAIN - processing event_list_on_rain_outdoor")
L576 🔵 debug_statement
Debug call: debug_log()
Impact: medium
Show code
debug_log("Mode: OUTDOOR NIGHT")
L580 🔵 debug_statement
Debug call: debug_log()
Impact: medium
Show code
debug_log("Night sounds DISABLED in MCM")
L583 🔵 debug_statement
Debug call: debug_log()
Impact: medium
Show code
debug_log("Mode: OUTDOOR DAY")
L585 🔵 debug_statement
Debug call: debug_log()
Impact: medium
Show code
debug_log("Processing generic_day_outdoor_sounds: " .. tostring(D.generic_day_outdoor_sounds and #D.generic_day_outdoor_sounds or "nil"))
L588 🔵 debug_statement
Debug call: debug_log()
Impact: medium
Show code
debug_log("Day sounds DISABLED in MCM")
L611 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[S2_AMB] amb_main.script loaded. MCM available: %s", tostring(amb_mcm ~= nil))
L496 🟡 potential_nil_access
Potential nil access: 'player' from db.actor() used without nil check
Impact: low
Show code
if not (player and player:alive()) then return end

amb_mcm.script

L88 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[S2_AMB] is_context_enabled(%s) key=%s result=%s", context, key, tostring(result))
L38 🔴 global_write
Global write: sound_categories
Impact: low
Show code
sound_categories = {

S2 Ambience Sounds PATCHED new version

51 files (🟢3 🟡1 🔴62 🔵24)

amb_defs.script

L6 🔴 global_write
Global write: generic_day_outdoor_sounds
Impact: low
Show code
generic_day_outdoor_sounds = {
L17 🔴 global_write
Global write: generic_night_outdoor_sounds
Impact: low
Show code
generic_night_outdoor_sounds = {
L28 🔴 global_write
Global write: event_list_cover_indoor
Impact: low
Show code
event_list_cover_indoor = {
L33 🔴 global_write
Global write: event_list_underground
Impact: low
Show code
event_list_underground = {
L47 🔴 global_write
Global write: event_list_on_rain_outdoor
Impact: low
Show code
event_list_on_rain_outdoor = {
L56 🔴 global_write
Global write: event_list_on_rain_indoor
Impact: low
Show code
event_list_on_rain_indoor = {
L61 🔴 global_write
Global write: event_list_on_storm_outdoor
Impact: low
Show code
event_list_on_storm_outdoor = {
L71 🔴 global_write
Global write: event_list_on_storm_indoor
Impact: low
Show code
event_list_on_storm_indoor = {
L76 🔴 global_write
Global write: map_specific_outdoor_sounds
Impact: low
Show code
map_specific_outdoor_sounds = {
L332 🔴 global_write
Global write: map_specific_underground_sounds
Impact: low
Show code
map_specific_underground_sounds = {
L362 🔴 global_write
Global write: underground_levels
Impact: low
Show code
underground_levels = {
L378 🔴 global_write
Global write: rain_loop_settings
Impact: low
Show code
rain_loop_settings = {

amb_main.script

L157 🟢 uncached_globals_summary
Cache 1 globals in play_sound
Impact: medium
Show code
L170: math.random L172: math.random
L210 🟢 uncached_globals_summary
Cache 2 globals in actor_on_first_update
Impact: medium
Show code
L237: pairs L242: pairs L247: ipairs L249: ipairs
L423 🟢 uncached_globals_summary
Cache 2 globals in actor_on_update
Impact: medium
Show code
L459: string.format L469: string.format L460: tostring L461: tostring
L52 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[S2_AMB] " .. tostring(msg))
L159 🔵 debug_statement
Debug call: debug_log()
Impact: medium
Show code
debug_log("play_sound: No player position!")
L164 🔵 debug_statement
Debug call: debug_log()
Impact: medium
Show code
debug_log("play_sound: " .. sound_name .. " BLOCKED by MCM")
L190 🔵 debug_statement
Debug call: debug_log()
Impact: medium
Show code
debug_log("play_sound: Failed to load " .. sound_path)
L211 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[S2_AMB] actor_on_first_update called")
L215 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[S2_AMB] ERROR: amb_defs is nil! Sounds will not work!")
L272 🔵 debug_statement
Debug call: debug_log()
Impact: medium
Show code
debug_log("process_sound_list: sound_list is nil!")
L287 🔵 debug_statement
Debug call: debug_log()
Impact: medium
Show code
debug_log("Played: " .. event.name .. sound_index)
L368 🔵 debug_statement
Debug call: debug_log()
Impact: medium
Show code
debug_log(string.format("Rain cache rebuilt: %d nearby emitters (of %d total)", #rain_nearby_cache, #emitters))
L425 🔵 debug_statement
Debug call: debug_log()
Impact: medium
Show code
debug_log("Mod is DISABLED")
L450 🔵 debug_statement
Debug call: debug_log()
Impact: medium
Show code
debug_log("ERROR: amb_defs is nil!")
L459 🔵 debug_statement
Debug call: debug_log()
Impact: medium
Show code
debug_log(string.format("Level: %s | Hour: %d | Night: %s | Rain: %.2f | Underground: %s | Cover: %s",
L469 🔵 debug_statement
Debug call: debug_log()
Impact: medium
Show code
debug_log(string.format("Rain check: is_raining=%s, is_storming=%s, rain_enabled=%s",
L479 🔵 debug_statement
Debug call: debug_log()
Impact: medium
Show code
debug_log("Mode: UNDERGROUND")
L490 🔵 debug_statement
Debug call: debug_log()
Impact: medium
Show code
debug_log("Mode: INDOOR (safe cover)")
L504 🔵 debug_statement
Debug call: debug_log()
Impact: medium
Show code
debug_log("Mode: OUTDOOR STORM")
L507 🔵 debug_statement
Debug call: debug_log()
Impact: medium
Show code
debug_log("Mode: OUTDOOR RAIN - processing event_list_on_rain_outdoor")
L511 🔵 debug_statement
Debug call: debug_log()
Impact: medium
Show code
debug_log("Mode: OUTDOOR NIGHT")
L515 🔵 debug_statement
Debug call: debug_log()
Impact: medium
Show code
debug_log("Night sounds DISABLED in MCM")
L518 🔵 debug_statement
Debug call: debug_log()
Impact: medium
Show code
debug_log("Mode: OUTDOOR DAY")
L520 🔵 debug_statement
Debug call: debug_log()
Impact: medium
Show code
debug_log("Processing generic_day_outdoor_sounds: " .. tostring(D.generic_day_outdoor_sounds and #D.generic_day_outdoor_sounds or "nil"))
L523 🔵 debug_statement
Debug call: debug_log()
Impact: medium
Show code
debug_log("Day sounds DISABLED in MCM")
L542 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[S2_AMB] amb_main.script loaded. MCM available: %s", tostring(amb_mcm ~= nil))
L438 🟡 potential_nil_access
Potential nil access: 'player' from db.actor() used without nil check
Impact: low
Show code
if not (player and player:alive()) then return end

amb_map_jupiter.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_k00_marsh.script

L1 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_k01_darkscape.script

L1 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_k02_trucks_cemetery.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l01_escape.script

L1 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l02_garbage.script

L1 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l03_agroprom.script

L1 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l04_darkvalley.script

L1 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l05_bar.script

L1 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l06_rostok.script

L1 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l07_military.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l08_yantar.script

L1 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l09_deadcity.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l10_limansk.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l10_radar.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l10_red_forest.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l11_hospital.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l11_pripyat.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l12_stancia.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l12_stancia_2.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_pripyat.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_y04_pole.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_zaton.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_mcm.script

L89 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[S2_AMB] is_context_enabled(%s) key=%s result=%s", context, key, tostring(result))
L39 🔴 global_write
Global write: sound_categories
Impact: low
Show code
sound_categories = {

amb_static.script

L8 🔴 global_write
Global write: static_sound_emitters
Impact: low
Show code
static_sound_emitters = {} -- Sonidos Globales (Siempre activos)
L9 🔴 global_write
Global write: rain_sound_emitters
Impact: low
Show code
rain_sound_emitters = {} -- Sonidos de Lluvia (Solo activos con lluvia)

rain_amb_map_jupiter.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_k00_marsh.script

L5 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_k01_darkscape.script

L6 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_k02_trucks_cemetery.script

L6 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l01_escape.script

L6 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l02_garbage.script

L6 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l03_agroprom.script

L5 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l04_darkvalley.script

L6 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l05_bar.script

L5 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l06_rostok.script

L6 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l07_military.script

L6 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l08_yantar.script

L5 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l09_deadcity.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l10_limansk.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l10_radar.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l10_red_forest.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l11_hospital.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l11_pripyat.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l12_stancia.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l12_stancia_2.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l13_generators.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_pripyat.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_y04_pole.script

L5 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_zaton.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

S2 Ambience Sounds PATCHED new version (Rainy update)

51 files (🟢3 🟡2 🔴62 🔵3)

amb_defs.script

L6 🔴 global_write
Global write: generic_day_outdoor_sounds
Impact: low
Show code
generic_day_outdoor_sounds = {
L17 🔴 global_write
Global write: generic_night_outdoor_sounds
Impact: low
Show code
generic_night_outdoor_sounds = {
L28 🔴 global_write
Global write: event_list_cover_indoor
Impact: low
Show code
event_list_cover_indoor = {
L33 🔴 global_write
Global write: event_list_underground
Impact: low
Show code
event_list_underground = {
L47 🔴 global_write
Global write: event_list_on_rain_outdoor
Impact: low
Show code
event_list_on_rain_outdoor = {
L56 🔴 global_write
Global write: event_list_on_rain_indoor
Impact: low
Show code
event_list_on_rain_indoor = {
L61 🔴 global_write
Global write: event_list_on_storm_outdoor
Impact: low
Show code
event_list_on_storm_outdoor = {
L71 🔴 global_write
Global write: event_list_on_storm_indoor
Impact: low
Show code
event_list_on_storm_indoor = {
L76 🔴 global_write
Global write: map_specific_outdoor_sounds
Impact: low
Show code
map_specific_outdoor_sounds = {
L332 🔴 global_write
Global write: map_specific_underground_sounds
Impact: low
Show code
map_specific_underground_sounds = {
L362 🔴 global_write
Global write: underground_levels
Impact: low
Show code
underground_levels = {
L378 🔴 global_write
Global write: rain_loop_settings
Impact: low
Show code
rain_loop_settings = {

amb_main.script

L172 🟢 uncached_globals_summary
Cache 1 globals in play_sound
Impact: medium
Show code
L178: math.random L180: math.random
L216 🟢 uncached_globals_summary
Cache 2 globals in actor_on_first_update
Impact: medium
Show code
L238: pairs L243: pairs L248: ipairs L250: ipairs
L474 🟢 uncached_globals_summary
Cache 1 globals in actor_on_update
Impact: medium
Show code
L504: string.find L504: string.find
L47 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[S2_AMB] " .. tostring(msg))
L514 🔵 debug_statement
Debug call: debug_log()
Impact: medium
Show code
debug_log(string_format("RainLogic: Factor=%.2f | Effective=%.2f | Weather=%s", rain_factor, effective_rain, current_weather))
L487 🟡 potential_nil_access
Potential nil access: 'player' from db.actor() used without nil check
Impact: low
Show code
if not (player and player:alive()) then return end
L476 🟡 unused_local_variable
Local variable 'g_tostring' is assigned but never used
Impact: low
Show code
local g_tostring = tostring

amb_map_jupiter.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_k00_marsh.script

L1 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_k01_darkscape.script

L1 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_k02_trucks_cemetery.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l01_escape.script

L1 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l02_garbage.script

L1 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l03_agroprom.script

L1 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l04_darkvalley.script

L1 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l05_bar.script

L1 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l06_rostok.script

L1 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l07_military.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l08_yantar.script

L1 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l09_deadcity.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l10_limansk.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l10_radar.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l10_red_forest.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l11_hospital.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l11_pripyat.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l12_stancia.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_l12_stancia_2.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_pripyat.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_y04_pole.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_map_zaton.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

amb_mcm.script

L91 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[S2_AMB] is_context_enabled(%s) key=%s result=%s", context, key, tostring(result))
L38 🔴 global_write
Global write: sound_categories
Impact: low
Show code
sound_categories = {

amb_static.script

L8 🔴 global_write
Global write: static_sound_emitters
Impact: low
Show code
static_sound_emitters = {} -- Sonidos Globales (Siempre activos)
L9 🔴 global_write
Global write: rain_sound_emitters
Impact: low
Show code
rain_sound_emitters = {} -- Sonidos de Lluvia (Solo activos con lluvia)

rain_amb_map_jupiter.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_k00_marsh.script

L5 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_k01_darkscape.script

L6 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_k02_trucks_cemetery.script

L6 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l01_escape.script

L6 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l02_garbage.script

L6 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l03_agroprom.script

L5 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l04_darkvalley.script

L6 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l05_bar.script

L5 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l06_rostok.script

L6 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l07_military.script

L6 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l08_yantar.script

L5 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l09_deadcity.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l10_limansk.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l10_radar.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l10_red_forest.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l11_hospital.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l11_pripyat.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l12_stancia.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l12_stancia_2.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_l13_generators.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_pripyat.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_y04_pole.script

L5 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

rain_amb_map_zaton.script

L3 🔴 global_write
Global write: emitters
Impact: low
Show code
emitters = {

SaloEater's Voiced Actor Gamma Patch

1 file (🟢1 🟡0 🔴0 🔵0)

axr_companions_va_gamma_patch.script

L33 🟢 uncached_globals_summary
Cache 1 globals in playVoiceOver
Impact: medium
Show code
L40: math.random L42: math.random

Serious Tasks QoL Pack

26 files (🟢20 🟡61 🔴44 🔵62)

blacklist_helper.script

L2 🔴 global_write
Global write: TaskBlacklist
Impact: low
Show code
TaskBlacklist = {} --If a task failed to find a target I'll put it's Id here so I can later prevent the task from entering the task pool.

monkey_axr_task_manager.script

L7 🟢 repeated_npc_id()
npc:id() called 7x in axr_task_manager.get_first_available_task
Impact: low
Show code
Cache npc:id() result
L1 🔴 global_write
Global write: OldAxrTaskManagerGetFirstAvailableTask
Impact: low
Show code
OldAxrTaskManagerGetFirstAvailableTask = axr_task_manager.get_first_available_task

monkey_news_manager.script

L1 🔴 global_write
Global write: OldSendTask
Impact: low
Show code
OldSendTask = news_manager.send_task

monkey_rioc.script

L1 🔴 global_write
Global write: OldRiocOnDescr
Impact: low
Show code
OldRiocOnDescr = tasks_recover_item_on_corpse.on_descr

monkey_tasks_multifetch.script

L1 🔴 global_write
Global write: OldTasksMultifetchOnDescrNews
Impact: low
Show code
OldTasksMultifetchOnDescrNews = tasks_multifetch.on_descr_news

monkey_tasks_recover_mutant_data.script

L1 🔴 global_write
Global write: OldXrEffectsRecoverMutantDataLocation
Impact: low
Show code
OldXrEffectsRecoverMutantDataLocation = xr_effects.recover_mutant_data_location

monkey_tasks_smart_control.script

L1 🔴 global_write
Global write: OldSmartControlPFNF
Impact: low
Show code
OldSmartControlPFNF = tasks_smart_control.postpone_for_next_frame

new_tasks_addon_tasks_utils.script

L116 🟢 table_insert_append
table.insert(t, v) -> t[#t+1] = v
Impact: high
Show code
table.insert(t, i)
L234 🟢 table_insert_append
table.insert(sim_stalkers[comm], v) -> sim_stalkers[comm][#sim_stalkers[comm]+1] = v
Impact: high
Show code
table.insert(sim_stalkers[comm], se_obj.id)
L190 🔴 global_write
Global write: southern_maps
Impact: low
Show code
southern_maps = {
L205 🔴 global_write
Global write: nothern_maps
Impact: low
Show code
nothern_maps = {
L217 🔴 global_write
Global write: sim_stalkers
Impact: low
Show code
sim_stalkers = nil
L219 🔴 global_write
Global write: sim_stalkers
Impact: low
Show code
sim_stalkers = {}
L335 🔴 global_write
Global write: levels
Impact: low
Show code
levels = {
L369 🔴 global_write
Global write: mcm_config
Impact: low
Show code
mcm_config = load_defaults()
L372 🔴 global_write
Global write: mcm_config
Impact: low
Show code
mcm_config = load_defaults()
L412 🔴 global_write
Global write: se_id
Impact: low
Show code
se_id = spawn_helicopter(true, vector():set(-178.07975769043,5.3180623054504,-181.78283691406))
L9 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_npc = k.object or k.id and sim:object(k.id)
L131 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check (auto-fixable)
Impact: low
Show code
return item and string.find(item:section(), "axe")
L148 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
local pos = obj:position()
L150 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
obj:force_set_position(pos, false)
L177 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local squad = sim:object(id)
L180 🟡 potential_nil_access
Potential nil access: 'squad' from :object() used without nil check
Impact: low
Show code
for k in squad:squad_members() do
L181 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_npc = k.object or k.id and sim:object(k.id)
L272 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check (auto-fixable)
Impact: low
Show code
return sim:level_name(gg:vertex(se_obj.m_game_vertex_id):level_id())

nta_utils.script

L61 🟢 table_insert_append
table.insert(tab_with_ids, v) -> tab_with_ids[#tab_with_ids+1] = v
Impact: high
Show code
table.insert(tab_with_ids, id)
L225 🟢 table_insert_append
table.insert(sim_stalkers[comm], v) -> sim_stalkers[comm][#sim_stalkers[comm]+1] = v
Impact: high
Show code
table.insert(sim_stalkers[comm], se_obj.id)
L411 🟢 table_insert_append
table.insert(particle_tab, v) -> particle_tab[#particle_tab+1] = v
Impact: high
Show code
table.insert(particle_tab, part)
L422 🟢 table_insert_append
table.insert(sound_tab, v) -> sound_tab[#sound_tab+1] = v
Impact: high
Show code
table.insert(sound_tab, snd)
L181 🔴 global_write
Global write: southern_maps
Impact: low
Show code
southern_maps = {
L196 🔴 global_write
Global write: northern_maps
Impact: low
Show code
northern_maps = {
L208 🔴 global_write
Global write: sim_stalkers
Impact: low
Show code
sim_stalkers = nil
L210 🔴 global_write
Global write: sim_stalkers
Impact: low
Show code
sim_stalkers = {}
L435 🔴 global_write
Global write: levels
Impact: low
Show code
levels = {
L539 🔴 global_write
Global write: story_ids
Impact: low
Show code
story_ids = {
L563 🔴 global_write
Global write: mcm_config
Impact: low
Show code
mcm_config = load_defaults()
L566 🔴 global_write
Global write: mcm_config
Impact: low
Show code
mcm_config = load_defaults()
L9 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_npc = k.object or k.id and sim:object(k.id)
L135 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check (auto-fixable)
Impact: low
Show code
return item and string.find(item:section(), "axe")
L153 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
local pos = obj:position()
L155 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
obj:force_set_position(pos, false)
L263 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check (auto-fixable)
Impact: low
Show code
return sim:level_name(gg:vertex(se_obj.m_game_vertex_id):level_id())

serious_the_job_can_wait_mcm.script

L6 🔴 global_write
Global write: op
Impact: low
Show code
op = {

tasks_agent_rescue.script

L79 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L110 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('! join_message: se_obj (%s) is nil!', id)
L121 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('! leave_message: se_obj (%s) is nil!', id)
L195 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('var nil in task %s', task_id)
L201 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('squad_id nil in task %s', task_id)
L207 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('se_squad nil in task %s', task_id)
L280 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('var nil in task %s', task_id)
L289 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('se_squad nil in task %s', task_id)
L295 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('se_spy nil in task %s', task_id)
L300 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('se_spy has died in task %s', task_id)
L349 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('var nil in task %s', task_id)
L358 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('se_squad nil in task %s', task_id)
L477 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | no faction_lookup table", task_id)
L236 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(i)
L323 🟡 potential_nil_access
Potential nil access: 'npc' from level.object_by_id() used without nil check
Impact: low
Show code
npc:set_relation(game_object.friend,db.actor)
L324 🟡 potential_nil_access
Potential nil access: 'npc' from level.object_by_id() used without nil check
Impact: low
Show code
npc:set_character_community(var.giver_comm, 0, 0 )
L365 🟡 potential_nil_access
Potential nil access: 'obj_giver' from level.object_by_id() used without nil check
Impact: low
Show code
local pos_giver = obj_giver and obj_giver:position() or se_giver and se_giver.position
L510 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local lvl = sim:level_name(gg:vertex(squad.m_game_vertex_id):level_id())

tasks_assault.script

L211 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | assault_task_target_functor - var is nil", task_id)
L217 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | assault_task_target_functor - smart is nil", task_id)
L267 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | task failed because smart no longer available", task_id)
L280 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/ %s | Faction [%s] is re-added to cache_assault_func table", task_id, params[i])
L295 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/ %s | Faction [%s] is re-added to cache_assault_func table", task_id, fac)
L300 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | no enemy factions found",task_id)
L357 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | not enough parameters", task_id)
L381 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | status functor parameters are mising!", task_id)
L420 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | no enemy factions found", task_id)
L375 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local actor_comm = sim:actor():community()
L461 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local smart_level = sim:level_name(gg:vertex(v.m_game_vertex_id):level_id())
L375 🟡 unused_local_variable
Local variable 'actor_comm' is assigned but never used
Impact: low
Show code
local actor_comm = sim:actor():community()

tasks_bounty.script

L151 🟢 table_insert_append
table.insert(other_targets[rela], v) -> other_targets[rela][#other_targets[rela]+1] = v
Impact: high
Show code
table.insert(other_targets[rela],id)
L178 🟢 table_insert_append
table.insert(bounty_cache[p[1]], v) -> bounty_cache[p[1]][#bounty_cache[p[1]]+1] = v
Impact: high
Show code
table.insert(bounty_cache[p[1]],target_id)
L184 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! %s - no target found for task",p[1])
L194 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s - no server object could be retrieved for (%s)",p[1],target_id)
L111 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(id)
L140 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(id)
L142 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local map = t and sim:level_name(gg:vertex(se_obj.m_game_vertex_id):level_id())
L146 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
if simulation_objects.is_on_the_nearby_level(sim:actor(), se_obj) then
L205 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local level_target = sim:level_name(game_graph():vertex(se_target.m_game_vertex_id):level_id())
L105 🟡 unused_local_variable
Local variable 'r' is assigned but never used
Impact: low
Show code
local r

tasks_chimera_scan.script

L214 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('%s -> %s',_m[task_id].scan_time, _m[task_id].previous_time)
L5 🟡 unused_local_variable
Local variable 'TASK_ID' is assigned but never used
Impact: low
Show code
local TASK_ID = 'yan_stalker_sakharov_task_chimera_scan'
L13 🟡 unused_local_variable
Local variable 'parse_ini' is assigned but never used
Impact: low
Show code
local parse_ini = utils_data.parse_ini_section_to_array

tasks_delivery.script

L55 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s TASK ERROR: xr_effects.create_delivery_quest - can't find item section [%s]", var, tostring(item_1_sec))
L127 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! %s TASK ERROR: xr_effects.create_delivery_quest - no target found!", var)
L336 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! remove_delivery_item - no var found")
L104 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(i)
L106 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if (se_obj and IsStalker(nil,se_obj:clsid()) and se_obj:alive() and sfind(se_obj:section_name(),"sim_default") and get_object_story_id(i) == nil) then
L106 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if (se_obj and IsStalker(nil,se_obj:clsid()) and se_obj:alive() and sfind(se_obj:section_name(),"sim_default") and get_object_story_id(i) == nil) then
L106 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if (se_obj and IsStalker(nil,se_obj:clsid()) and se_obj:alive() and sfind(se_obj:section_name(),"sim_default") and get_object_story_id(i) == nil) then
L114 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local lvl_name = sim:level_name( gg:vertex(se_obj.m_game_vertex_id):level_id())
L115 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
if not blacklisted_maps[lvl_name] and not additionalBlacklist[lvl_name] and not simulation_objects.is_on_the_same_level(sim:actor(), se_obj) then
L116 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
if far_location and (not simulation_objects.is_on_the_linked_level(sim:actor(), se_obj)) then
L147 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local level_target = sim:level_name(game_graph():vertex(se_target.m_game_vertex_id):level_id())
L345 🟡 potential_nil_access
Potential nil access: 'item' from :object() used without nil check
Impact: low
Show code
local se_item = item and alife_object(item:id())

tasks_dominance.script

L181 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/ %s | Faction [%s] is re-added to cache_func table", task_id, params[i])
L186 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | no enemy factions found",task_id)
L212 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | no smarts found for level",task_id, cache_level[task_id])
L257 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | not enough parameters", task_id)
L268 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! %s | reused cache", task_id)
L279 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | status functor parameters are mising!", task_id)
L290 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | status_functor_level is mising!", task_id)
L306 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! %s | no enemy factions found", task_id)
L329 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("- %s | %s squads has been found in level (%s)", task_id, size_table(targets), def.level)
L343 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | missing info in setup_dominance_task", task_id)
L350 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | missing cache in setup_dominance_task", task_id)
L203 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local lvl = sim:level_name(gg:vertex(v.m_game_vertex_id):level_id())
L318 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local lvl = sim:level_name(gg:vertex(v.m_game_vertex_id):level_id())
L64 🟡 unused_local_variable
Local variable 'smrt_name' is assigned but never used
Impact: low
Show code
local smrt_name = smart:name()

tasks_fate.script

L153 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! TASK ERROR: %s | xr_effects.create_fate_quest - can't find item section!",var)
L158 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR on_init_fate_task | actor is not talking")
L24 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
and simulation_objects.is_on_the_same_level(sim:actor(), smart)
L4 🟡 unused_local_variable
Local variable 'is_item_2_created' is assigned but never used
Impact: low
Show code
local is_item_2_created = {} -- make sure that quest pda spawned once

tasks_fetch.script

L344 🟢 repeated_npc_id()
npc:id() called 3x in <global>
Impact: low
Show code
Cache npc:id() result
L208 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR: fetch_reward_and_remove | no fetch item found!")
L213 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Warning: fetch_reward_and_remove | total_cost is below 50")
L285 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR xr_effects.remove_artefact_item | no var found for %s", p[1])
L464 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR: %s | fetch list [%s] is invalid", p[1], p[2])
L571 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: xr_effects:setup_generic_fetch_task - invalid section %s",sec)
L759 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! WARNING: fetch_list.ltx | wrong section name [%s]", id)
L653 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local item = section and actor:object(section)
L676 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
if actor:object(section .. "_af_aam")
L677 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
or actor:object(section .. "_af_iam")
L678 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
or actor:object(section .. "_af_aac")
L679 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
or actor:object(section .. "_lead_box")
L124 🟡 unused_local_variable
Local variable 'sim' is assigned but never used
Impact: low
Show code
local sim = alife()

tasks_guide.script

L323 🟢 uncached_globals_summary
Cache 1 globals in prepare_follower
Impact: medium
Show code
L370: math.random L380: math.random
L160 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log('! Cracnricl oceer, audieili = '..cycle_id..' drc!')
L559 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("RAX WTF timer over write!")
L580 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Timer %s, at %s | gametime at %s", value['name'], value['delay'],time)
L14 🔴 global_write
Global write: tbl_way
Impact: low
Show code
tbl_way = {
L528 🔴 global_write
Global write: action
Impact: low
Show code
then action=""
L548 🔴 global_write
Global write: action
Impact: low
Show code
action=""
L349 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
if (level_name == sim:level_name(gg:vertex(v.m_game_vertex_id):level_id())) and (simulation_objects.available_by_id[v.id] == true) then
L411 🟡 potential_nil_access
Potential nil access: 'npc' from level.object_by_id() used without nil check
Impact: low
Show code
local str = string.format(game.translate_string('st_jg_15'), curr_guid.neustoika, npc and npc:character_name() or '')
L352 🟡 unused_local_variable
Local variable 'count' is assigned but never used
Impact: low
Show code
local count = 0

tasks_intercept_artifact.script

L120 🟢 table_insert_append
table.insert(result, v) -> result[#result+1] = v
Impact: high
Show code
table.insert(result, p[i])

tasks_measure.script

L240 🟢 repeated_level_name
level.name called 3x in <global>
Impact: low
Show code
local level_name = level.name()
L181 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR - %s | not enough parameters for on_init_measure_task!",p[1])
L187 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR validate_measure_task | actor is not talking")
L203 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR - %s | can't find item section!",task_id)
L275 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! %s | No anomaly found!",task_id)
L283 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | cant get server object of anomaly (%s)!",task_id,target_id)
L305 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR setup_measure_task missing task_id")
L314 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | can't get cached result", task_id)
L320 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! %s | cant get server object of anomaly (%s)!", task_id, tbl.target_id)
L254 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(i)
L255 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if se_obj and ano_tbl[se_obj:section_name()] then
L256 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local lvl_name = sim:level_name( gg:vertex(se_obj.m_game_vertex_id):level_id())
L485 🟡 potential_nil_access
Potential nil access: 'active_detector' from :active_detector() used without nil check
Impact: low
Show code
if tsk.stage == 2 and active_detector and (active_detector:id() == var.item_1_id) then
L212 🟡 unused_local_variable
Local variable 'task_giver_name' is assigned but never used
Impact: low
Show code
local task_giver_name = task_giver:character_name()
L530 🟡 unused_local_variable
Local variable 'det_anomaly_state2' is assigned but never used
Impact: low
Show code
local det_anomaly_state2 = false

tasks_nta_stash.script

L58 🟢 table_insert_append
table.insert(result, v) -> result[#result+1] = v
Impact: high
Show code
table.insert(result, p[i])

tasks_stash.script

L60 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( "! %s - Unable to get quest stash %s id !!", p[1], typ )
L69 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( "! %s - Unable to get quest stash %s object !!", p[1], typ )

ui_pda_taskboard_tab.script

L279 🟢 table_insert_append
table.insert(npc_list, v) -> npc_list[#npc_list+1] = v
Impact: high
Show code
table.insert(npc_list, obj)
L289 🟢 table_insert_append
table.insert(npc_list, v) -> npc_list[#npc_list+1] = v
Impact: high
Show code
table.insert(npc_list, npc)
L342 🟢 table_insert_append
table.insert(result[task_effect], v) -> result[task_effect][#result[task_effect]+1] = v
Impact: high
Show code
table.insert(result[task_effect], {
L539 🟢 table_insert_append
table.insert(result, v) -> result[#result+1] = v
Impact: high
Show code
table.insert(result, key)
L209 🔵 debug_statement
Debug call: print()
Impact: medium
Show code
print("Warning: entry_info is nil for row_index:", row_index)
L214 🔵 debug_statement
Debug call: print()
Impact: medium
Show code
print("Warning: prev_task is nil for row_index:", row_index)
L124 🔴 global_write
Global write: currently_processed_npc_id
Impact: low
Show code
currently_processed_npc_id = nil -- required for fetch quest override
L126 🔴 global_write
Global write: currently_processed_npc_id
Impact: low
Show code
currently_processed_npc_id = task_data.npc_id
L141 🔴 global_write
Global write: currently_processed_npc_id
Impact: low
Show code
currently_processed_npc_id = nil
L164 🔴 global_write
Global write: currently_processed_npc_id
Impact: low
Show code
currently_processed_npc_id = task_details.npc_id
L166 🔴 global_write
Global write: currently_processed_npc_id
Impact: low
Show code
currently_processed_npc_id = nil
L312 🔴 global_write
Global write: currently_processed_npc_id
Impact: low
Show code
currently_processed_npc_id = npc:id()
L318 🔴 global_write
Global write: currently_processed_npc_id
Impact: low
Show code
currently_processed_npc_id = nil
L547 🔴 global_write
Global write: normalizer
Impact: low
Show code
normalizer = {
L569 🔴 global_write
Global write: config
Impact: low
Show code
config = load_defaults()
L572 🔴 global_write
Global write: config
Impact: low
Show code
config = load_defaults()
L384 🟡 potential_nil_access
Potential nil access: 'stalker' from level.object_by_id() used without nil check
Impact: low
Show code
local stalker_comm = stalker:character_community()
L385 🟡 potential_nil_access
Potential nil access: 'stalker' from level.object_by_id() used without nil check
Impact: low
Show code
local stalker_icon = stalker:character_icon()
L386 🟡 potential_nil_access
Potential nil access: 'stalker' from level.object_by_id() used without nil check
Impact: low
Show code
local stalker_name = stalker:character_name()

z_taskboard_overrides.script

L22 🟢 table_insert_append
table.insert(original_tasks_info, v) -> original_tasks_info[#original_tasks_info+1] = v
Impact: high
Show code
table.insert(original_tasks_info, {
L76 🟢 table_insert_append
table.insert(tasks_info, v) -> tasks_info[#tasks_info+1] = v
Impact: high
Show code
table.insert(tasks_info, task_info)
L1 🔴 global_write
Global write: tasks_info
Impact: low
Show code
tasks_info = {}
L2 🔴 global_write
Global write: fallback_tasks_info
Impact: low
Show code
fallback_tasks_info = {}
L3 🔴 global_write
Global write: original_tasks_info
Impact: low
Show code
original_tasks_info = {}
L72 🔴 global_write
Global write: tasks_info
Impact: low
Show code
tasks_info = {}

zz_monkey_z_fetch_shows_count.script

L5 🔴 global_write
Global write: OldTaskFetchPostponeForNextFrame
Impact: low
Show code
OldTaskFetchPostponeForNextFrame = tasks_fetch.postpone_fetch_for_next_frame
L12 🔴 global_write
Global write: task_id
Impact: low
Show code
task_id = string.sub(task_id,1,-7) or "" -- because it ends with fetch
L13 🔴 global_write
Global write: amount
Impact: low
Show code
amount = amount or 1

Serious Workshop optimization

10 files (🟢10 🟡6 🔴14 🔵12)

craft_use_low_cond.script

L6 🔴 global_write
Global write: base_craft
Impact: low
Show code
base_craft = ui_workshop.UIWorkshopCraft.Craft

serious_workshop_utils.script

L16 🟢 repeated_obj_id()
obj:id() called 4x in itr
Impact: low
Show code
Cache obj:id() result

ui_furniture_workshop.script

L68 🟢 table_insert_append
table.insert(items, v) -> items[#items+1] = v
Impact: high
Show code
table.insert(items, obj:id())
L79 🔴 global_write
Global write: workshop_ui_ref
Impact: low
Show code
workshop_ui_ref = ui_workshop.get_workshop_ui(nil, nil, {false,false,false,false,false}, false, stashId)
L175 🟡 unused_local_variable
Local variable 'bind' is assigned but never used
Impact: low
Show code
local bind = dik_to_bind(dik)

ui_workshop.script

L241 🟢 uncached_globals_summary
Cache 1 globals in InitControls
Impact: medium
Show code
L256: tostring L257: tostring
L270 🟢 uncached_globals_summary
Cache 1 globals in Reset
Impact: medium
Show code
L281: tostring L284: tostring
L370 🟢 uncached_globals_summary
Cache 1 globals in InitControls
Impact: medium
Show code
L402: tostring L403: tostring
L1250 🟢 uncached_globals_summary
Cache 1 globals in EvaluateUpgrades
Impact: medium
Show code
L1253: pairs L1254: pairs
L1584 🟢 uncached_globals_summary
Cache 1 globals in InitControls
Impact: medium
Show code
L1616: tostring L1617: tostring
L1726 🟢 uncached_globals_summary
Cache 2 globals in LoadRecipes
Impact: medium
Show code
L1735: tostring L1736: tostring L1751: tonumber L1755: tonumber
L1803 🟢 uncached_globals_summary
Cache 1 globals in ListRecipes
Impact: medium
Show code
L1808: pairs L1816: pairs
L1070 🟡 string_concat_in_loop
String concat in loop: prereq = prereq .. x
Impact: critical
Show code
prereq = prereq .. "\\n - " .. str
L853 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopRepair:UpdateToolkits(%s) | no proper repair toolkit is found for item [%s], make sure it is supported by repair tools sections", num, main_sec)
L1134 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! Workshop UI | no proper repair toolkit is found for item [%s], make sure it is supported by repair tools sections", obj:section())
L1758 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! Workshop UI craft | componenet section [%s] not found for [%s] recipe!", tostring(t[3]), id)
L1766 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopCraft:LoadRecipes() | componenet section [%s] not found for [%s] recipe!", tostring(t[5]), id)
L1774 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopCraft:LoadRecipes() | componenet section [%s] not found for [%s] recipe!", tostring(t[7]), id)
L1782 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopCraft:LoadRecipes() | componenet section [%s] not found for [%s] recipe!", tostring(t[9]), id)
L1787 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopCraft:LoadRecipes() | section [%s] not found!",id)
L2045 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
if enable_debug then printf(fmt,...) end
L19 🔴 global_write
Global write: workshop_toolkits
Impact: low
Show code
workshop_toolkits = {
L1993 🟡 unused_local_variable
Local variable 'bind' is assigned but never used
Impact: low
Show code
local bind = dik_to_bind(dik)

z_monkey_toolkit_workshop.script

L5 🔴 global_write
Global write: base_workshop
Impact: low
Show code
base_workshop = ui_workshop.UIWorkshop.Reset
L6 🔴 global_write
Global write: workshop_toolkits
Impact: low
Show code
workshop_toolkits = ui_workshop.workshop_toolkits

z_serious_monkey_ui_debug_launcher.script

L1 🔴 global_write
Global write: original_start_workshop
Impact: low
Show code
original_start_workshop = ui_debug_launcher.start_workshop
L14 🔴 global_write
Global write: workshop_ui_ref
Impact: low
Show code
workshop_ui_ref = ui_workshop.get_workshop_ui(GUI, nil, {true,true,true,true,true,true}, true)

zz_ui_workshop_keep_crafting_window_open.script

L256 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR UIWorkshopRepair:Repair() | can't discharge toolkit with id (%s). Object not found!", self.toolkit_pick[i])
L271 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopRepair:Repair() | object with id (%s) is either not found. Or didn't register new condition (%s)!", id, final_con)
L141 🔴 global_write
Global write: kind
Impact: low
Show code
kind = SYS_GetParam(0, self.craft_item_r[1], "kind")
L225 🟡 unused_local_variable
Local variable 'sim' is assigned but never used
Impact: low
Show code
local sim = alife()

zzz_workshop_return_items.script

L5 🔴 global_write
Global write: item_ids
Impact: low
Show code
item_ids = {}
L6 🔴 global_write
Global write: stash_id
Impact: low
Show code
stash_id = nil
L8 🔴 global_write
Global write: ui_workshop_UIWorkshop_Close
Impact: low
Show code
ui_workshop_UIWorkshop_Close = ui_workshop.UIWorkshop.Close

zzzz_serious_ui_workshop.script

L8 🟢 uncached_globals_summary
Cache 2 globals in UpdateItem
Impact: medium
Show code
L57: pairs L101: pairs L143: tostring L143: tostring
L5 🔴 global_write
Global write: UpdateItem
Impact: low
Show code
UpdateItem = ui_workshop.UIWorkshopCraft.UpdateItem
L6 🔴 global_write
Global write: SetTip
Impact: low
Show code
SetTip = ui_workshop.SetTip
L20 🟡 unused_local_variable
Local variable 'counter' is assigned but never used
Impact: low
Show code
local counter = 0

zzzzz_ui_workshop_repair_patch.script

L57 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR UIWorkshopRepair:Repair() | can't discharge toolkit with id (%s). Object not found!", self.toolkit_pick[i])
L75 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! UIWorkshopRepair:Repair() | object with id (%s) is either not found. Or didn't register new condition (%s)!", id, final_con)
L1 🔴 global_write
Global write: WorkshopRepair
Impact: low
Show code
WorkshopRepair = ui_workshop.UIWorkshopRepair.Repair
L18 🟡 unused_local_variable
Local variable 'sim' is assigned but never used
Impact: low
Show code
local sim = alife()

Shaders cumulative pack for GAMMA

8 files (🟢11 🟡35 🔴39 🔵6)

item_device.script

L237 🟢 uncached_globals_summary
Cache 1 globals in on_key_release
Impact: medium
Show code
L270: math.floor L270: math.floor
L942 🟢 uncached_globals_summary
Cache 1 globals in process_flicker
Impact: medium
Show code
L954: math.random L955: math.random
L63 🟢 repeated_device
device called 4x in <global>
Impact: low
Show code
local dev = device()
L139 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR item_device | reading from items\\settings\\devices.ltx | section [%s] or power consumption values don't exist", sec)
L154 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("item_device | %s | " .. txt, time_global(), ...)
L226 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("beef - key on-press")
L231 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("beef - time event fired for nvg turn-on")
L248 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("beef - key on-release")
L252 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("beef - brightness adjust")
L18 🔴 global_write
Global write: dev_consumption
Impact: low
Show code
dev_consumption = {} -- [sec] = {...} | Power consumption of device per stage
L19 🔴 global_write
Global write: dev_consumption_act
Impact: low
Show code
dev_consumption_act = {} -- [sec] = {...} | Power consumption of device per action (stage 2)
L20 🔴 global_write
Global write: dev_consumption_tot
Impact: low
Show code
dev_consumption_tot = {} -- [sec] = num | Total power consumption of a device
L21 🔴 global_write
Global write: dev_critical
Impact: low
Show code
dev_critical = {} -- [sec] = num | Power limit, devices go off when their power go below this value
L40 🔴 global_write
Global write: devices
Impact: low
Show code
devices = {}
L41 🔴 global_write
Global write: device_battery
Impact: low
Show code
device_battery = nil
L42 🔴 global_write
Global write: device_geiger
Impact: low
Show code
device_geiger = nil
L43 🔴 global_write
Global write: device_npc_pda
Impact: low
Show code
device_npc_pda = {}
L61 🔴 global_write
Global write: nv_state
Impact: low
Show code
nv_state = false -- make nv_state a global variable so we can access it from beefs_nvgs
L78 🔴 global_write
Global write: dosimeter_env_rads_mode
Impact: low
Show code
dosimeter_env_rads_mode = false
L93 🔴 global_write
Global write: device_battery
Impact: low
Show code
device_battery = ini_device:r_sec_ex("settings","battery","batteries_dead")
L94 🔴 global_write
Global write: device_geiger
Impact: low
Show code
device_geiger = ini_device:r_sec_ex("settings","geiger","detector_geiger")
L264 🔴 global_write
Global write: dosimeter_env_rads_mode
Impact: low
Show code
dosimeter_env_rads_mode = not dosimeter_env_rads_mode
L265 🔴 global_write
Global write: dosimeter_mode_string
Impact: low
Show code
dosimeter_mode_string = dosimeter_env_rads_mode and game.translate_string("st_environment_rads") or game.translate_string("st_actor_rads")
L618 🔴 global_write
Global write: nv_state
Impact: low
Show code
nv_state = true
L624 🔴 global_write
Global write: nv_state
Impact: low
Show code
nv_state = false
L230 🟡 potential_nil_access
Potential nil access: 'torch' from :item_in_slot() used without nil check
Impact: low
Show code
set_nightvision(torch and torch:section(), not nv_state)
L310 🟡 potential_nil_access
Potential nil access: 'pda' from :item_in_slot() used without nil check
Impact: low
Show code
if pda and (not temp_con[pda:id()]) then
L316 🟡 potential_nil_access
Potential nil access: 'det' from :item_in_slot() used without nil check
Impact: low
Show code
if det and (not temp_con[det:id()]) then
L322 🟡 potential_nil_access
Potential nil access: 'torch' from :item_in_slot() used without nil check
Impact: low
Show code
if torch and (not temp_con[torch:id()]) then
L333 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if (p and p:id() == AC_ID) then
L383 🟡 potential_nil_access
Potential nil access: 'obj' from :item_in_slot() used without nil check
Impact: low
Show code
if obj and IsItem("device",obj:section()) then
L390 🟡 potential_nil_access
Potential nil access: 'torch' from :item_in_slot() used without nil check
Impact: low
Show code
if torch and torch:torch_enabled() then
L446 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L457 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then
L550 🟡 potential_nil_access
Potential nil access: 'torch' from :item_in_slot() used without nil check
Impact: low
Show code
local id = torch and torch:id()
L594 🟡 potential_nil_access
Potential nil access: 'torch' from :item_in_slot() used without nil check
Impact: low
Show code
local torch_sec = torch and torch:section()
L657 🟡 potential_nil_access
Potential nil access: 'pda' from :item_in_slot() used without nil check
Impact: low
Show code
if actor_only and device_npc_pda[pda:section()] then
L722 🟡 potential_nil_access
Potential nil access: 'parent' from :parent() used without nil check
Impact: low
Show code
if parent and (parent:id() ~= AC_ID) then
L145 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, sec, value = ini_device:r_line_ex("npc_pda",i,"","")

ssfx_001_mcm.script

L8 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "general", sh=true, text="ui_mcm_ssfx_module_general", gr ={

ssfx_001_settings.script

L7 🔴 global_write
Global write: ssfx_default_settings
Impact: low
Show code
ssfx_default_settings = {

ssfx_dof_mcm.script

L8 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "wpn_dof", sh=true, text="ui_mcm_ssfx_module_wpn_dof", gr ={

ssfx_weapons_dof.script

L284 🟢 repeated_itm_section()
itm:section() called 2x in actor_on_update
Impact: low
Show code
Cache itm:section() result
L452 🟢 repeated_get_console
get_console called 4x in on_option_change
Impact: low
Show code
local console = get_console()
L166 🔴 global_write
Global write: itm
Impact: low
Show code
itm = db.actor:active_item()
L232 🔴 global_write
Global write: anim_tm
Impact: low
Show code
anim_tm = tm * 0.001
L236 🔴 global_write
Global write: anim_tm
Impact: low
Show code
anim_tm = anim_tm * ssfx_weapons_dof_settings.items_time[ssfx_itm_in_use]
L238 🔴 global_write
Global write: anim_tm
Impact: low
Show code
anim_tm = anim_tm * 0.7
L264 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
local itm_state = itm:get_state()
L282 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
if itm:get_state() == 7 then -- Reload start
L284 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
sec = itm:section()
L329 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
sec = itm:section()
L332 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
if itm:get_ammo_in_magazine() == ini_sys:r_u32(sec, "ammo_mag_size") then
L347 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
if itm:get_state() ~= 7 and ssfx_reloading > 0 then

ssfx_weapons_dof_settings.script

L7 🔴 global_write
Global write: ssfx_default_settings
Impact: low
Show code
ssfx_default_settings = {
L31 🔴 global_write
Global write: wpn_nodof
Impact: low
Show code
wpn_nodof = {
L57 🔴 global_write
Global write: items_time
Impact: low
Show code
items_time = {
L103 🔴 global_write
Global write: wpn_reloadtime
Impact: low
Show code
wpn_reloadtime = {

z_beefs_nvgs.script

L84 🟢 uncached_globals_summary
Cache 2 globals in pack_nvg_data
Impact: medium
Show code
L86: tostring L87: tostring L88: math.floor L89: math.floor
L98 🟢 uncached_globals_summary
Cache 1 globals in pack_nvg_data_2
Impact: medium
Show code
L100: tostring L101: tostring
L113 🟢 repeated_get_console
get_console called 3x in update_nvgs
Impact: low
Show code
local console = get_console()
L194 🟢 repeated_itm_section()
itm:section() called 3x in item_device.set_nightvision
Impact: low
Show code
Cache itm:section() result
L208 🟢 repeated_get_console
get_console called 4x in item_device.set_nightvision
Impact: low
Show code
local console = get_console()
L432 🟢 repeated_get_console
get_console called 4x in actor_on_weapon_zoom_in
Impact: low
Show code
local console = get_console()
L69 🔴 global_write
Global write: nvg_num_tubes_gen1
Impact: low
Show code
nvg_num_tubes_gen1 = z_beefs_nvgs_mcm.get_config("nvg_gen1_tubes_mcm")
L73 🔴 global_write
Global write: nvg_mode_gen2
Impact: low
Show code
nvg_mode_gen2 = z_beefs_nvgs_mcm.get_config("nvg_gen2_mode_mcm")
L74 🔴 global_write
Global write: nvg_mode_gen3
Impact: low
Show code
nvg_mode_gen3 = z_beefs_nvgs_mcm.get_config("nvg_gen3_mode_mcm")
L428 🔴 global_write
Global write: zoom_type
Impact: low
Show code
zoom_type = wpn:cast_Weapon():GetZoomType()
L468 🔴 global_write
Global write: zoom_type
Impact: low
Show code
zoom_type = nil
L527 🔴 global_write
Global write: tg
Impact: low
Show code
tg = time_global()
L563 🔴 global_write
Global write: zoom_type
Impact: low
Show code
zoom_type = wpn:cast_Weapon():GetZoomType()
L564 🔴 global_write
Global write: zoomed
Impact: low
Show code
zoomed = wpn:cast_Weapon():IsZoomed()
L565 🔴 global_write
Global write: scoped
Impact: low
Show code
scoped = wpn:cast_Weapon():IsScopeAttached()
L612 🔴 global_write
Global write: zoom_type
Impact: low
Show code
zoom_type = wpn:cast_Weapon():GetZoomType()
L613 🔴 global_write
Global write: scoped_weapon_is_zoomed
Impact: low
Show code
scoped_weapon_is_zoomed = wpn and IsWeapon(wpn) and wpn:weapon_is_scope()
L194 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
local hud = ini_sys:r_string_ex(itm:section(),"hud") or "hud_base"
L199 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
local kind = ini_sys:r_string_ex(itm:section(),"kind") or nil
L200 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
local class = ini_sys:r_string_ex(itm:section(),"class") or nil
L428 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check (auto-fixable)
Impact: low
Show code
zoom_type = wpn:cast_Weapon():GetZoomType()
L437 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if wpn:weapon_scope_status() == 2 then
L438 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if wpn:weapon_is_scope() then
L440 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
scopeName = utils_item.get_param(scope, wpn:id(), "scope_texture", "string")
L443 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
scopeName = utils_item.get_param(wpn:section(), wpn:id(), "scope_texture", "string")
L443 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
scopeName = utils_item.get_param(wpn:section(), wpn:id(), "scope_texture", "string")
L563 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
zoom_type = wpn:cast_Weapon():GetZoomType()
L564 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
zoomed = wpn:cast_Weapon():IsZoomed()
L565 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
scoped = wpn:cast_Weapon():IsScopeAttached()
L612 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check (auto-fixable)
Impact: low
Show code
zoom_type = wpn:cast_Weapon():GetZoomType()
L613 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
scoped_weapon_is_zoomed = wpn and IsWeapon(wpn) and wpn:weapon_is_scope()
L43 🟡 unused_local_variable
Local variable 'snd_headlamp' is assigned but never used
Impact: low
Show code
local snd_headlamp = sound_object('interface\\inv_torch')

z_beefs_nvgs_mcm.script

L23 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "beef_nvg",sh=true ,gr={

SixSloth's & Veerserif's Hideout Furnitures 2.2.1 GAMMA patch

2 files (🟢1 🟡1 🔴6 🔵0)

ui_furniture_workshop.script

L69 🟢 table_insert_append
table.insert(items, v) -> items[#items+1] = v
Impact: high
Show code
table.insert(items, obj:id())
L80 🔴 global_write
Global write: workshop_ui_ref
Impact: low
Show code
workshop_ui_ref = ui_workshop.get_workshop_ui(nil, nil, {false,false,false,false,false}, false)
L171 🟡 unused_local_variable
Local variable 'bind' is assigned but never used
Impact: low
Show code
local bind = dik_to_bind(dik)

zzz_workshop_return_items.script

L1 🔴 global_write
Global write: item_ids
Impact: low
Show code
item_ids = {}
L2 🔴 global_write
Global write: stash_id
Impact: low
Show code
stash_id = nil
L15 🔴 global_write
Global write: item_ids
Impact: low
Show code
item_ids = {}
L16 🔴 global_write
Global write: stash_id
Impact: low
Show code
stash_id = nil
L19 🔴 global_write
Global write: ui_workshop_UIWorkshop_Close
Impact: low
Show code
ui_workshop_UIWorkshop_Close = ui_workshop.UIWorkshop.Close

Stealth_2.31

5 files (🟢9 🟡18 🔴7 🔵11)

light_gem.script

L106 🟡 potential_nil_access
Potential nil access: 'torch' from :item_in_slot() used without nil check
Impact: low
Show code
if (torch and torch:torch_enabled()) then
L108 🟡 potential_nil_access
Potential nil access: 'flash' from :item_in_slot() used without nil check
Impact: low
Show code
elseif (flash and (flash:section() == "device_flashlight") and db.actor:active_detector()) then

stealth_mcm.script

L24 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "stealth",sh=true ,gr={

stealth_nvg.script

L130 🟢 repeated_npc_id()
npc:id() called 6x in npc_on_death_callback
Impact: low
Show code
Cache npc:id() result
L153 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L1 🔴 global_write
Global write: stealth_nvg_ps
Impact: low
Show code
stealth_nvg_ps = {}
L70 🔴 global_write
Global write: scuffed_sr_light_patch
Impact: low
Show code
scuffed_sr_light_patch = sr_light.check_light
L148 🔴 global_write
Global write: stealth_nvg_ps
Impact: low
Show code
stealth_nvg_ps = m_data.stealth_nvg_ps or {}
L89 🟡 potential_nil_access
Potential nil access: 'torch' from :object() used without nil check
Impact: low
Show code
if (torch and torch:attachable_item_enabled()) then

visual_memory_manager.script

L188 🟢 repeated_npc_id()
npc:id() called 22x in stealth_icon_alt
Impact: low
Show code
Cache npc:id() result
L246 🟢 repeated_outfit_section()
outfit:section() called 3x in slot_in_out
Impact: low
Show code
Cache outfit:section() result
L336 🟢 repeated_npc_id()
npc:id() called 4x in get_memory_val
Impact: low
Show code
Cache npc:id() result
L378 🟢 repeated_db_actor_id()
db.actor:id() called 4x in actor_on_weapon_fired
Impact: low
Show code
Cache db.actor:id() result
L400 🟢 repeated_npc_id()
npc:id() called 4x in npc_on_weapon_fired
Impact: low
Show code
Cache npc:id() result
L421 🟢 repeated_who_id()
who:id() called 3x in stealth_dbg
Impact: low
Show code
Cache who:id() result
L435 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(..., var)
L440 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('---------------------------------------------------------------')
L441 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Weather is: " .. (wthrs))
L442 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("1. Luminocity ---------- %s", Luminocity)
L443 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("1.a) luminocity --------- %s", luminocity)
L444 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("1.b) lights_lum() ------- %s", lights_lum())
L445 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("1.c) who:get_lum() ---- %s", who:get_luminocity())
L447 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("3. dist_original --------- %s", distance)
L458 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("8. Step incr --- %s", step_incr)
L24 🔴 global_write
Global write: stealth_light_ind
Impact: low
Show code
stealth_light_ind = { 0, false }
L138 🟡 potential_nil_access
Potential nil access: 'torch' from :item_in_slot() used without nil check
Impact: low
Show code
local actor_torch_active = (who:id() == db.actor:id()) and ( (torch and torch:torch_enabled()) or (flash and (flash:section() == "device_flashlight") and db.actor:active_detector()) )
L138 🟡 potential_nil_access
Potential nil access: 'flash' from :item_in_slot() used without nil check
Impact: low
Show code
local actor_torch_active = (who:id() == db.actor:id()) and ( (torch and torch:torch_enabled()) or (flash and (flash:section() == "device_flashlight") and db.actor:active_detector()) )
L246 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local kind = outfit and ini_sys:r_string_ex(outfit:section(),"kind")
L247 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local get_camo_get_line = outfit and ini_sys:line_exist(outfit:section(), "npc_blindness_koeff")
L248 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
get_camo_k = get_camo_get_line and ini_sys:r_float(outfit:section(), "npc_blindness_koeff") or 0
L376 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
if not (IsWeapon(wpn)) or IsMelee(wpn) or wpn:weapon_is_silencer() then return end
L418 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
local obj_fits = obj and (IsStalker(obj) or IsMonster(obj)) and obj.alive and obj:alive()
L421 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
if (npc and npc:id() == obj:id()) and (who and who:id() == 0) and (not obj:see(db.actor)) then
L421 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
if (npc and npc:id() == obj:id()) and (who and who:id() == 0) and (not obj:see(db.actor)) then
L423 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
elseif obj:see(db.actor) then
L439 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
if obj_fits and (npc and npc:id() == obj:id()) and (who and who:id() == 0) then
L459 🟡 potential_nil_access
Potential nil access: 'obj' from level.get_target_obj() used without nil check
Impact: low
Show code
actor_menu.set_msg(1, strformat("Threshold: %s/%s || (Lumin: %s | Veloc: %s | Dist: %s | Weight: %s | Memory: %s || Total per update: %s)", r(summ), obj:visibility_threshold(), r(Luminocity), r(Velocity), r(eq_dist), r(weight), r(memory_factor), r(step_incr) ))

xr_combat_ignore.script

L25 🟢 repeated_who_id()
who:id() called 2x in npc_on_hit_callback
Impact: low
Show code
Cache who:id() result
L397 🟢 repeated_obj_id()
obj:id() called 3x in hit_callback
Impact: low
Show code
Cache obj:id() result
L436 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("xr_combat_ignore: reset_generic_scheme storage is nil! npc=%s scheme=%s section=%s",npc and npc:name(),scheme,section)
L7 🔴 global_write
Global write: fighting_with_actor_npcs
Impact: low
Show code
fighting_with_actor_npcs = {}
L8 🔴 global_write
Global write: safe_zone_npcs
Impact: low
Show code
safe_zone_npcs = {}
L182 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(id)
L397 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(obj:id())
L399 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local squad = se_obj.group_id and se_obj.group_id ~= 65535 and sim:object(se_obj.group_id)

Suppressors do not Increase Jam Probability

1 file (🟢0 🟡0 🔴1 🔵0)

z_arti_jamming_no_silencer_jam.script

L1 🔴 global_write
Global write: get_silencer_jam_chance
Impact: low
Show code
get_silencer_jam_chance = arti_jamming.get_silencer_jam_chance

Tactical Compass

4 files (🟢0 🟡4 🔴15 🔵7)

axr_main.script

L245 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![axr_main callback_add] callback %s already exists!",name)
L252 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![axr_main callback_set] trying to set callback %s to nil function!",name)
L259 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![axr_main callback_set] callback %s doesn't exist!",name)
L268 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![axr_main callback_unset] callback %s doesn't exist!",name)
L283 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![axr_main make_callback] can't make callback to non existing intercept %s!",name)
L15 🔴 global_write
Global write: config
Impact: low
Show code
config = ini_file_ex("axr_options.ltx",true)
L347 🔴 global_write
Global write: scoped_weapon_is_zoomed
Impact: low
Show code
scoped_weapon_is_zoomed = wpn and IsWeapon(wpn) and wpn:weapon_is_scope()
L348 🔴 global_write
Global write: binoc_is_zoomed
Impact: low
Show code
binoc_is_zoomed = wpn and (wpn:section() == "wpn_binoc_inv")
L349 🔴 global_write
Global write: weapon_is_zoomed
Impact: low
Show code
weapon_is_zoomed = true
L355 🔴 global_write
Global write: scoped_weapon_is_zoomed
Impact: low
Show code
scoped_weapon_is_zoomed = false
L356 🔴 global_write
Global write: binoc_is_zoomed
Impact: low
Show code
binoc_is_zoomed = false
L357 🔴 global_write
Global write: weapon_is_zoomed
Impact: low
Show code
weapon_is_zoomed = false
L347 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
scoped_weapon_is_zoomed = wpn and IsWeapon(wpn) and wpn:weapon_is_scope()
L348 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
binoc_is_zoomed = wpn and (wpn:section() == "wpn_binoc_inv")

bind_stalker.script

L248 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("collectgarbage before=%sKb",collectgarbage("count")*1024)
L251 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("collectgarbage after=%sKb",collectgarbage("count")*1024)
L278 🔴 global_write
Global write: weapon_lowered_before_dialog
Impact: low
Show code
weapon_lowered_before_dialog = false
L280 🔴 global_write
Global write: weapon_lowered_before_dialog
Impact: low
Show code
weapon_lowered_before_dialog = true
L300 🔴 global_write
Global write: weapon_lowered_before_dialog
Impact: low
Show code
weapon_lowered_before_dialog = false
L271 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
local can_be_lowered = wpn and IsWeapon(wpn) and ini_sys:r_bool_ex(wpn:section(), "can_be_lowered", false) or false
L272 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
local state = wpn:get_state()

compass_mcm.script

L52 🔴 global_write
Global write: op
Impact: low
Show code
op = {

markers_definitions.script

L1 🔴 global_write
Global write: marker_categories
Impact: low
Show code
marker_categories = {
L59 🔴 global_write
Global write: transition_types
Impact: low
Show code
transition_types = {
L70 🔴 global_write
Global write: blacklisted_categories
Impact: low
Show code
blacklisted_categories = {
L84 🔴 global_write
Global write: marker_configs
Impact: low
Show code
marker_configs = {

Task_Manager

1 file (🟢0 🟡1 🔴3 🔵1)

task_manager_imgui.script

L63 🟡 string_concat_in_loop
String concat in loop: result = result .. x
Impact: critical
Show code
result = result .. (utf8_char or "?")
L70 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Warning: win1251_to_utf8 encountered unmapped characters: %s", str)
L2 🔴 global_write
Global write: task_manager_window_visible
Impact: low
Show code
task_manager_window_visible = false
L88 🔴 global_write
Global write: task_manager_window_visible
Impact: low
Show code
clicked, task_manager_window_visible = ImGui.MenuItem(TASK_MANAGER_MENU, nil, task_manager_window_visible, true)
L95 🔴 global_write
Global write: task_manager_window_visible
Impact: low
Show code
task_manager_window_visible = status

Teivaz Gunslinger Knives Quick Melee

1 file (🟢0 🟡8 🔴10 🔵0)

quickdraw.script

L71 🔴 global_write
Global write: knife_to_degrade
Impact: low
Show code
knife_to_degrade = db.actor:object(knifesm[1])
L76 🔴 global_write
Global write: knife_to_degrade
Impact: low
Show code
knife_to_degrade = db.actor:object(knifesm[2])
L81 🔴 global_write
Global write: knife_to_degrade
Impact: low
Show code
knife_to_degrade = db.actor:object(knifesm[3])
L86 🔴 global_write
Global write: knife_to_degrade
Impact: low
Show code
knife_to_degrade = db.actor:object(knifesm[4])
L91 🔴 global_write
Global write: knife_to_degrade
Impact: low
Show code
knife_to_degrade = db.actor:object(knifesm[5])
L97 🔴 global_write
Global write: knife_to_degrade
Impact: low
Show code
knife_to_degrade = db.actor:object(knifesm[6])
L103 🔴 global_write
Global write: knife_to_degrade
Impact: low
Show code
knife_to_degrade = db.actor:object(knifesm[7])
L109 🔴 global_write
Global write: knife_to_degrade
Impact: low
Show code
knife_to_degrade = db.actor:object(knifesm[8])
L117 🔴 global_write
Global write: cond
Impact: low
Show code
cond = knife_to_degrade:condition()
L133 🔴 global_write
Global write: last_slot
Impact: low
Show code
last_slot = db.actor:active_slot() or 0
L117 🟡 potential_nil_access
Potential nil access: 'knife_to_degrade' from :object() used without nil check
Impact: low
Show code
cond = knife_to_degrade:condition()
L119 🟡 potential_nil_access
Potential nil access: 'knife_to_degrade' from :object() used without nil check
Impact: low
Show code
knife_to_degrade:set_condition(cond - 0.0025)
L121 🟡 potential_nil_access
Potential nil access: 'knife_to_degrade' from :object() used without nil check
Impact: low
Show code
knife_to_degrade:set_condition(0.01)
L128 🟡 potential_nil_access
Potential nil access: 'anm' from :item_in_slot() used without nil check
Impact: low
Show code
alife():release(alife_object(anm:id()))
L136 🟡 potential_nil_access
Potential nil access: 'wpn' from :item_in_slot() used without nil check
Impact: low
Show code
if (wpn) then wpn:switch_state(3) end
L153 🟡 potential_nil_access
Potential nil access: 'wpn' from :item_in_slot() used without nil check
Impact: low
Show code
if (wpn) then wpn:switch_state(3) end
L162 🟡 potential_nil_access
Potential nil access: 'anm' from :item_in_slot() used without nil check
Impact: low
Show code
anm:switch_state(5)
L166 🟡 potential_nil_access
Potential nil access: 'anm' from :item_in_slot() used without nil check
Impact: low
Show code
if (anm) then alife():release(alife_object(anm:id())) end

Teivaz's Gunslinger Exo Animations Port

1 file (🟢0 🟡0 🔴26 🔵9)

enhanced_animations.script

L133 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
if ea_debug then printf("speed is = "..speed) end
L178 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
if ea_debug then printf("update = "..failure_timer) end
L183 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("hide weapons for anim failed")
L184 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(used_item or (used_monster and used_monster:section()) or "anim find ERROR")
L185 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(anim_section or "NO ANIM SECTION FOUND")
L235 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("hud section is %s", hud)
L240 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("hud section %s is exo but no animation %s, revert back", hud, item)
L243 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("hud section %s is exo and found animation %s", hud, item)
L246 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("hud section %s is not exo", hud)
L30 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = true
L31 🔴 global_write
Global write: mutant_loot_mod
Impact: low
Show code
mutant_loot_mod = false
L35 🔴 global_write
Global write: active_slot
Impact: low
Show code
active_slot,used_item,ea_flag,fake_monster,det_active,anim_section = nil
L35 🔴 global_write
Global write: used_item
Impact: low
Show code
active_slot,used_item,ea_flag,fake_monster,det_active,anim_section = nil
L35 🔴 global_write
Global write: ea_flag
Impact: low
Show code
active_slot,used_item,ea_flag,fake_monster,det_active,anim_section = nil
L35 🔴 global_write
Global write: fake_monster
Impact: low
Show code
active_slot,used_item,ea_flag,fake_monster,det_active,anim_section = nil
L35 🔴 global_write
Global write: det_active
Impact: low
Show code
active_slot,used_item,ea_flag,fake_monster,det_active,anim_section = nil
L35 🔴 global_write
Global write: anim_section
Impact: low
Show code
active_slot,used_item,ea_flag,fake_monster,det_active,anim_section = nil
L54 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = not enable_animations
L60 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = ui_mcm.get("EA_settings/enable_animations")
L61 🔴 global_write
Global write: mutant_loot_mod
Impact: low
Show code
mutant_loot_mod = false -- ui_mcm.get("EA_settings/mutant_loot")
L64 🔴 global_write
Global write: mutant_loot_mod
Impact: low
Show code
mutant_loot_mod = false
L68 🔴 global_write
Global write: mutant_loot_mod
Impact: low
Show code
mutant_loot_mod = false --ini_eff:r_bool_ex("anim_settings", "mutant_loot_mod")
L69 🔴 global_write
Global write: enable_animations
Impact: low
Show code
enable_animations = ui_options.get("video/player/animations")
L84 🔴 global_write
Global write: active_slot
Impact: low
Show code
active_slot = db.actor:active_slot()
L104 🔴 global_write
Global write: used_item
Impact: low
Show code
used_item = item
L106 🔴 global_write
Global write: anim_section
Impact: low
Show code
anim_section = ini_eff:r_string_ex(item, "anm")
L146 🔴 global_write
Global write: tmr
Impact: low
Show code
tmr = ini_eff:r_float_ex(used_item, "tm")
L164 🔴 global_write
Global write: tmr
Impact: low
Show code
tmr = ini_eff:r_float_ex("item_ea_harv_wpn_knife", "anim_length")
L200 🔴 global_write
Global write: anim_section
Impact: low
Show code
anim_section = nil
L316 🔴 global_write
Global write: used_item
Impact: low
Show code
used_item = nil
L327 🔴 global_write
Global write: fake_monster
Impact: low
Show code
fake_monster = used_monster
L329 🔴 global_write
Global write: ea_flag
Impact: low
Show code
ea_flag = true
L331 🔴 global_write
Global write: ea_flag
Impact: low
Show code
ea_flag = nil
L333 🔴 global_write
Global write: fake_monster
Impact: low
Show code
fake_monster = nil
L360 🔴 global_write
Global write: det_active
Impact: low
Show code
det_active = db.actor:active_detector() or nil

Terrain Textures Redone

1 file (🟢2 🟡0 🔴0 🔵0)

ssfx_terrain_parallax.script

L46 🟢 repeated_level_name
level.name called 2x in actor_on_first_update
Impact: low
Show code
local level_name = level.name()
L48 🟢 repeated_get_console
get_console called 2x in actor_on_first_update
Impact: low
Show code
local console = get_console()

The_Anomalous_Stash_v

3 files (🟢2 🟡2 🔴20 🔵1)

anom_stash_trade.script

L139 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update

anomalous_stash.script

L23 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("AnomStash - " .. ...)
L1 🔴 global_write
Global write: hidden_stash
Impact: low
Show code
hidden_stash = nil
L2 🔴 global_write
Global write: anom_stashes
Impact: low
Show code
anom_stashes = {}
L3 🔴 global_write
Global write: stash_particles
Impact: low
Show code
stash_particles = {}
L5 🔴 global_write
Global write: is_teleporting
Impact: low
Show code
is_teleporting = false
L6 🔴 global_write
Global write: last_interacted_anom_stash_id
Impact: low
Show code
last_interacted_anom_stash_id = nil
L16 🔴 global_write
Global write: hidden_stash
Impact: low
Show code
hidden_stash = m_data.anomalous_hidden_stash or nil
L17 🔴 global_write
Global write: anom_stashes
Impact: low
Show code
anom_stashes = m_data.anomalous_stashes or {}
L52 🔴 global_write
Global write: last_interacted_anom_stash_id
Impact: low
Show code
last_interacted_anom_stash_id = obj:id()
L67 🔴 global_write
Global write: is_teleporting
Impact: low
Show code
is_teleporting = true
L71 🔴 global_write
Global write: is_teleporting
Impact: low
Show code
is_teleporting = false
L128 🔴 global_write
Global write: hidden_stash_obj
Impact: low
Show code
hidden_stash_obj = level.object_by_id(hidden_stash)
L150 🔴 global_write
Global write: hidden_stash
Impact: low
Show code
hidden_stash = nil
L159 🔴 global_write
Global write: obj
Impact: low
Show code
obj = level.object_by_id(data.stash_id)
L167 🔴 global_write
Global write: actor_invs
Impact: low
Show code
actor_invs = {
L205 🔴 global_write
Global write: base_reset
Impact: low
Show code
base_reset = ui_inventory.UIInventory.Reset
L340 🔴 global_write
Global write: se_hidden_stash
Impact: low
Show code
se_hidden_stash = alife_create("hidden_anom_stash", pos, db.actor:level_vertex_id(), db.actor:game_vertex_id())
L341 🔴 global_write
Global write: hidden_stash
Impact: low
Show code
hidden_stash = se_hidden_stash.id
L179 🟡 potential_nil_access
Potential nil access: 'stash_obj' from level.object_by_id() used without nil check
Impact: low
Show code
if stash_obj and stash_obj:section() == "anom_inv_stash" then
L242 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end

trader_autoinject.script

L34 🟢 repeated_npc_id()
npc:id() called 3x in trade_manager.update
Impact: low
Show code
Cache npc:id() result
L182 🟢 repeated_item_section()
item:section() called 4x in itr_inv
Impact: low
Show code
Cache item:section() result
L16 🔴 global_write
Global write: find
Impact: low
Show code
find = string.find
L32 🔴 global_write
Global write: TraderUpdate
Impact: low
Show code
TraderUpdate = trade_manager.update

Tiskar's repair threshold Icon replacers

1 file (🟢2 🟡4 🔴3 🔵3)

aaa_rax_icon_override_mcm.script

L728 🟢 uncached_globals_summary
Cache 1 globals in Refresh
Impact: medium
Show code
L757: math.ceil L758: math.ceil
L22 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( "RAX: | %s | "..text ,time_global(), ...)
L367 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR utils_xml.set_icon | XML_box or XML_temp doesn't exist")
L375 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR utils_xml.set_icon | section [%s] doesn't exist in system ini", sec)
L18 🔴 global_write
Global write: icon_override
Impact: low
Show code
icon_override = ini_file_ex("icon_override\\icon_override.ltx")
L540 🔴 global_write
Global write: axis
Impact: low
Show code
axis = utils_xml.get_item_axis(a_sec,1)
L555 🔴 global_write
Global write: axis
Impact: low
Show code
axis = utils_xml.get_item_axis(b_sec,1)
L21 🟢 dead_code_if_false
Dead code: if false (lines 21-23)
Impact: low
Show code
if false then
L358 🟡 unused_local_variable
Local variable 'rw' is assigned but never used
Impact: low
Show code
local ico_size, rw, rh, _le = 0.7,1,1,50
L358 🟡 unused_local_variable
Local variable 'rh' is assigned but never used
Impact: low
Show code
local ico_size, rw, rh, _le = 0.7,1,1,50
L54 🟡 unused_local_variable
Local variable 'clr_list_hl' is assigned but never used
Impact: low
Show code
local clr_list_hl = {
L525 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, kind, order = ini_sys:r_line_ex("item_kind_order",i,"","")

Tiskar's weapon part color clarity fix

1 file (🟢2 🟡4 🔴3 🔵3)

aaa_rax_icon_override_mcm.script

L728 🟢 uncached_globals_summary
Cache 1 globals in Refresh
Impact: medium
Show code
L757: math.ceil L758: math.ceil
L22 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( "RAX: | %s | "..text ,time_global(), ...)
L367 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR utils_xml.set_icon | XML_box or XML_temp doesn't exist")
L375 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR utils_xml.set_icon | section [%s] doesn't exist in system ini", sec)
L18 🔴 global_write
Global write: icon_override
Impact: low
Show code
icon_override = ini_file_ex("icon_override\\icon_override.ltx")
L540 🔴 global_write
Global write: axis
Impact: low
Show code
axis = utils_xml.get_item_axis(a_sec,1)
L555 🔴 global_write
Global write: axis
Impact: low
Show code
axis = utils_xml.get_item_axis(b_sec,1)
L21 🟢 dead_code_if_false
Dead code: if false (lines 21-23)
Impact: low
Show code
if false then
L358 🟡 unused_local_variable
Local variable 'rw' is assigned but never used
Impact: low
Show code
local ico_size, rw, rh, _le = 0.7,1,1,50
L358 🟡 unused_local_variable
Local variable 'rh' is assigned but never used
Impact: low
Show code
local ico_size, rw, rh, _le = 0.7,1,1,50
L54 🟡 unused_local_variable
Local variable 'clr_list_hl' is assigned but never used
Impact: low
Show code
local clr_list_hl = {
L525 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, kind, order = ini_sys:r_line_ex("item_kind_order",i,"","")

Toxic Air v2 Redux

7 files (🟢18 🟡29 🔴19 🔵23)

custom_functor_autoinject.script

L114 🟢 string_len
string.len(pos) -> #pos
Impact: low
Show code
sub_print_r(val,indent..string.rep(" ",string.len(pos)+8))
L115 🟢 string_len
string.len(pos) -> #pos
Impact: low
Show code
printf(indent..string.rep(" ",string.len(pos)+6).."}")
L105 🟢 uncached_globals_summary
Cache 1 globals in sub_print_r
Impact: medium
Show code
L106: tostring L107: tostring
L128 🟢 uncached_globals_summary
Cache 1 globals in print_table
Impact: medium
Show code
L137: type L139: type
L107 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."*"..tostring(t))
L113 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."["..pos.."] => "..tostring(t).." {")
L115 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent..string.rep(" ",string.len(pos)+6).."}")
L117 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent.."["..pos.."] => "..tostring(val))
L121 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(indent..tostring(t))
L140 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = function",k)
L143 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s",k,utils_data.vector_to_string(v))
L145 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = userdata", k)
L150 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = true",k)
L152 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = true")
L156 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = false", k)
L158 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."userdata = false")
L163 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = %s", k,v)
L165 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(sub.."%s = nil", k,v)
L319 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s, %s", k, v.index)
L322 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s, %s, max custom_functor reached", k, v.index)
L424 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Custom functors, processing queue")
L427 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Custom functors, type %s", v.type)
L464 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("functor slot is not valid, min 1, max 10, your slot: %s", slot)
L479 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("functor slot is not valid min 1, max 10, your slot: %s", slot)
L515 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[" .. k .. "] => ")
L98 🟡 unused_local_variable
Local variable 'table_remove' is assigned but never used
Impact: low
Show code
local table_remove = table.remove

demonized_crafter.script

L164 🟢 table_insert_append
table.insert(craft_recipes[tool][item], v) -> craft_recipes[tool][item][#craft_recipes[tool][item]+1] = v
Impact: high
Show code
table.insert(craft_recipes[tool][item], recipe)
L264 🟢 table_insert_append
table.insert(result_item_table, v) -> result_item_table[#result_item_table+1] = v
Impact: high
Show code
table.insert(result_item_table, res)
L148 🟢 uncached_globals_summary
Cache 1 globals in add_craft_recipe
Impact: medium
Show code
L150: pairs L154: pairs
L238 🟢 uncached_globals_summary
Cache 3 globals in add_craft_menu
Impact: medium
Show code
L241: pairs L242: pairs L246: ipairs L309: ipairs L257: tonumber L316: tonumber
L358 🟢 repeated_obj_id()
obj:id() called 3x in iterate
Impact: low
Show code
Cache obj:id() result
L273 🟡 string_concat_in_loop
String concat in loop: s = s .. x
Impact: critical
Show code
s = s .. item_name
L398 🟡 string_concat_in_loop
String concat in loop: s = s .. x
Impact: critical
Show code
s = s .. item_name .. ":" .. amount .. sep
L495 🟡 string_concat_in_loop
String concat in loop: tip_string = tip_string .. x
Impact: critical
Show code
tip_string = tip_string .. " \\n" .. ui_item.get_sec_name(recipe_item) .. ": " .. (craft_item_modes[recipe_item] and colorize("1") or (is_degradable(recipe_item) and colorize(round(recipe_amount * 100) .. "%") or colorize(recipe_amount)))
L515 🟡 string_concat_in_loop
String concat in loop: tip_string = tip_string .. x
Impact: critical
Show code
tip_string = tip_string .. " \\n" .. ui_item.get_sec_name(recipe_item) .. ": " .. (craft_item_modes[recipe_item] and colorize("1") or (is_degradable(recipe_item) and colorize(round(recipe_amount * 100) .. "%") or colorize(recipe_amount)))
L528 🟡 string_concat_in_loop
String concat in loop: failed_tip_string = failed_tip_string .. x
Impact: critical
Show code
failed_tip_string = failed_tip_string .. " \\n" .. ui_item.get_sec_name(recipe_item) .. ": " ..
L570 🟡 string_concat_in_loop
String concat in loop: failed_tip_string = failed_tip_string .. x
Impact: critical
Show code
failed_tip_string = failed_tip_string .. " \\n \\n" .. gc(craft_func_key .. "_craft_or") .. " \\n"
L143 🔴 global_write
Global write: craft_recipes
Impact: low
Show code
craft_recipes = {}
L144 🔴 global_write
Global write: craft_item_strings
Impact: low
Show code
craft_item_strings = {}
L367 🟡 potential_nil_access
Potential nil access: 'actor' from :parent() used without nil check
Impact: low
Show code
actor:iterate_inventory(iterate, actor)
L369 🟡 potential_nil_access
Potential nil access: 'actor' from :parent() used without nil check
Impact: low
Show code
actor:iterate_inventory_box(iterate, actor)
L371 🟡 potential_nil_access
Potential nil access: 'actor' from :parent() used without nil check
Impact: low
Show code
print_tip("item parent is undefined %s, %s", actor:name(), actor:section())
L371 🟡 potential_nil_access
Potential nil access: 'actor' from :parent() used without nil check
Impact: low
Show code
print_tip("item parent is undefined %s, %s", actor:name(), actor:section())

demonized_crafter_filters.script

L1 🔴 global_write
Global write: craft_recipes
Impact: low
Show code
craft_recipes = {

new_game_loadout_injector_mcm.script

L188 🟢 table_insert_append
table.insert(loadout_items[item_table.section], v) -> loadout_items[item_table.section][#loadout_items[item_table.section]+1] = v
Impact: high
Show code
table.insert(loadout_items[item_table.section], item_table)
L145 🟢 uncached_globals_summary
Cache 1 globals in add_item
Impact: medium
Show code
L146: type L159: type
L211 🟢 uncached_globals_summary
Cache 1 globals in ui_mm_faction_select.UINewGame.LoadLoadout
Impact: medium
Show code
L218: pairs L227: pairs
L78 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Loadout Injector: " .. str, ...)
L82 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!Loadout Injector: ERROR, " .. str, ...)
L109 🔴 global_write
Global write: loadout_items
Impact: low
Show code
loadout_items = {}
L112 🔴 global_write
Global write: loadout_removed_items
Impact: low
Show code
loadout_removed_items = {}

toxic_air.script

L471 🟢 repeated_level_name
level.name called 3x in actor_on_first_update
Impact: low
Show code
local level_name = level.name()
L601 🟢 repeated_tank_section()
tank:section() called 3x in tank_in_belt
Impact: low
Show code
Cache tank:section() result
L606 🟢 repeated_tank_id()
tank:id() called 5x in tank_in_belt
Impact: low
Show code
Cache tank:id() result
L1437 🟢 repeated_tank_id()
tank:id() called 2x in actor_on_update
Impact: low
Show code
Cache tank:id() result
L594 🔴 global_write
Global write: prevent_anm
Impact: low
Show code
prevent_anm = false
L1068 🔴 global_write
Global write: prevent_anm
Impact: low
Show code
prevent_anm = true -- Skip animation in tank_out_belt callback
L1093 🔴 global_write
Global write: prevent_anm
Impact: low
Show code
prevent_anm = false
L1136 🔴 global_write
Global write: BuildHeader
Impact: low
Show code
BuildHeader = ui_item.build_desc_header
L1212 🔴 global_write
Global write: NameCustom
Impact: low
Show code
NameCustom = ui_inventory.UIInventory.Name_Custom
L1223 🔴 global_write
Global write: ActionCustom
Impact: low
Show code
ActionCustom = ui_inventory.UIInventory.Action_Custom
L1885 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update
L2010 🔴 global_write
Global write: SpawnCosmetics
Impact: low
Show code
SpawnCosmetics = death_manager.spawn_cosmetics
L2018 🔴 global_write
Global write: base_add_bar
Impact: low
Show code
base_add_bar = utils_ui.UICellItem.Add_ProgressBar
L2343 🔴 global_write
Global write: prevent_anm
Impact: low
Show code
prevent_anm = true -- Skip animation in tank_out_belt callback
L2368 🔴 global_write
Global write: prevent_anm
Impact: low
Show code
prevent_anm = false
L457 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if se_obj and oxt_tbl[se_obj:section_name()] then
L582 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
if (outfit and filters[outfit:id()]) or (helmet and filters[helmet:id()]) then
L582 🟡 potential_nil_access
Potential nil access: 'helmet' from :item_in_slot() used without nil check
Impact: low
Show code
if (outfit and filters[outfit:id()]) or (helmet and filters[helmet:id()]) then
L627 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
if (outfit and filters[outfit:id()]) or (helmet and filters[helmet:id()]) then
L910 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L921 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L962 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local outfit_id = outfit and outfit:id()
L964 🟡 potential_nil_access
Potential nil access: 'helmet' from :item_in_slot() used without nil check
Impact: low
Show code
local helmet_id = helmet and helmet:id()
L1044 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local outfit_id = outfit and outfit:id()
L1046 🟡 potential_nil_access
Potential nil access: 'helmet' from :item_in_slot() used without nil check
Impact: low
Show code
local helmet_id = helmet and helmet:id()
L1425 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local outfit_id = outfit and outfit:id()
L1426 🟡 potential_nil_access
Potential nil access: 'helmet' from :item_in_slot() used without nil check
Impact: low
Show code
local helmet_id = helmet and helmet:id()
L2222 🟡 potential_nil_access
Potential nil access: 'helmet' from :item_in_slot() used without nil check
Impact: low
Show code
if helmet and filters[helmet:id()] then
L2224 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
elseif outfit and filters[outfit:id()] then
L10 🟡 unused_local_variable
Local variable 'math_ceil' is assigned but never used
Impact: low
Show code
local math_ceil = math.ceil
L16 🟡 unused_local_variable
Local variable 'CAM_EFFECTOR_TANK' is assigned but never used
Impact: low
Show code
local CAM_EFFECTOR_TANK = 105613
L17 🟡 unused_local_variable
Local variable 'CAM_EFFECTOR_FILTER' is assigned but never used
Impact: low
Show code
local CAM_EFFECTOR_FILTER = 105612
L19 🟡 unused_local_variable
Local variable 'HUD_UPDATE_INTERVAL' is assigned but never used
Impact: low
Show code
local HUD_UPDATE_INTERVAL = 2000

toxic_air_mcm.script

L35 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "toxic_air",sh=true ,gr={

trader_autoinject.script

L46 🟢 repeated_npc_id()
npc:id() called 3x in trade_manager.update
Impact: low
Show code
Cache npc:id() result
L196 🟢 repeated_item_section()
item:section() called 4x in itr_inv
Impact: low
Show code
Cache item:section() result
L28 🔴 global_write
Global write: find
Impact: low
Show code
find = string.find
L44 🔴 global_write
Global write: TraderUpdate
Impact: low
Show code
TraderUpdate = trade_manager.update

Toxic_Air_

3 files (🟢5 🟡16 🔴9 🔵0)

toxic_air.script

L156 🟢 repeated_level_name
level.name called 3x in actor_on_first_update
Impact: low
Show code
local level_name = level.name()
L518 🟢 repeated_obj_id()
obj:id() called 3x in get_cond_for_ui
Impact: low
Show code
Cache obj:id() result
L524 🟢 repeated_obj_section()
obj:section() called 3x in get_cond_for_ui
Impact: low
Show code
Cache obj:section() result
L534 🔴 global_write
Global write: BuildHeader
Impact: low
Show code
BuildHeader = ui_item.build_desc_header
L588 🔴 global_write
Global write: NameCustom
Impact: low
Show code
NameCustom = ui_inventory.UIInventory.Name_Custom
L599 🔴 global_write
Global write: ActionCustom
Impact: low
Show code
ActionCustom = ui_inventory.UIInventory.Action_Custom
L1051 🔴 global_write
Global write: TraderAuto
Impact: low
Show code
TraderAuto = trader_autoinject.update
L1178 🔴 global_write
Global write: SpawnCosmetics
Impact: low
Show code
SpawnCosmetics = death_manager.spawn_cosmetics
L1186 🔴 global_write
Global write: base_add_bar
Impact: low
Show code
base_add_bar = utils_ui.UICellItem.Add_ProgressBar
L201 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
if (outfit and filters[outfit:id()]) or (helmet and filters[helmet:id()]) then
L201 🟡 potential_nil_access
Potential nil access: 'helmet' from :item_in_slot() used without nil check
Impact: low
Show code
if (outfit and filters[outfit:id()]) or (helmet and filters[helmet:id()]) then
L346 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local outfit_id = outfit and outfit:id()
L348 🟡 potential_nil_access
Potential nil access: 'helmet' from :item_in_slot() used without nil check
Impact: low
Show code
local helmet_id = helmet and helmet:id()
L382 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L393 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L406 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local outfit_id = outfit and outfit:id()
L408 🟡 potential_nil_access
Potential nil access: 'helmet' from :item_in_slot() used without nil check
Impact: low
Show code
local helmet_id = helmet and helmet:id()
L465 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local outfit_id = outfit and outfit:id()
L467 🟡 potential_nil_access
Potential nil access: 'helmet' from :item_in_slot() used without nil check
Impact: low
Show code
local helmet_id = helmet and helmet:id()
L209 🟡 unused_local_variable
Local variable 'prevent_anm' is assigned but never used
Impact: low
Show code
local prevent_anm = false
L436 🟡 unused_local_variable
Local variable 'sec_take' is assigned but never used
Impact: low
Show code
local sec_take = take and take:section()
L503 🟡 unused_local_variable
Local variable 'sim' is assigned but never used
Impact: low
Show code
local sim = alife()
L545 🟡 unused_local_variable
Local variable 'blue_clr' is assigned but never used
Impact: low
Show code
local blue_clr = utils_xml.get_color("d_blue")
L547 🟡 unused_local_variable
Local variable 'grey_clr_xml' is assigned but never used
Impact: low
Show code
local grey_clr_xml = utils_xml.get_color("ui_gray_2")

toxic_air_mcm.script

L22 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "toxic_air",sh=true ,gr={
L50 🟡 unused_local_variable
Local variable 'ini_itm' is assigned but never used
Impact: low
Show code
local ini_itm = ini_file("items\\settings\\new_game_loadouts.ltx")

trader_autoinject.script

L55 🟢 repeated_npc_id()
npc:id() called 3x in trade_manager.update
Impact: low
Show code
Cache npc:id() result
L199 🟢 repeated_item_section()
item:section() called 4x in itr_inv
Impact: low
Show code
Cache item:section() result
L28 🔴 global_write
Global write: find
Impact: low
Show code
find = string.find
L53 🔴 global_write
Global write: TraderUpdate
Impact: low
Show code
TraderUpdate = trade_manager.update

Trabopap's Field Strip Shows Parts Health

1 file (🟢6 🟡0 🔴0 🔵0)

tpa_patch_repairs.script

L34 🟢 table_insert_append
table.insert(context_str, v) -> context_str[#context_str+1] = v
Impact: high
Show code
table.insert(context_str, clr .. remove_name(k) .. " (" .. v .. "%)")
L35 🟢 table_insert_append
table.insert(context_action, v) -> context_action[#context_action+1] = v
Impact: high
Show code
table.insert(context_action, "remove_part")
L36 🟢 table_insert_append
table.insert(context_params, v) -> context_params[#context_params+1] = v
Impact: high
Show code
table.insert(context_params, { obj:id(), k, v })
L42 🟢 table_insert_append
table.insert(context_str, v) -> context_str[#context_str+1] = v
Impact: high
Show code
table.insert(context_str, remove_name(nil))
L43 🟢 table_insert_append
table.insert(context_action, v) -> context_action[#context_action+1] = v
Impact: high
Show code
table.insert(context_action, "remove_part")
L44 🟢 table_insert_append
table.insert(context_params, v) -> context_params[#context_params+1] = v
Impact: high
Show code
table.insert(context_params, { obj:id(), k, v })

UI Rework G.A.M.M.A. Style - Sota

30 files (🟢34 🟡72 🔴113 🔵26)

better_stats_bars_mcm.script

L1 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("this script is disabled because the addon is no longer compatible")

efp_ui_mcm.script

L27 🟢 uncached_globals_summary
Cache 2 globals in color_to_table
Impact: medium
Show code
L32: bit.band L33: bit.band L32: bit.rshift L33: bit.rshift
L209 🟢 uncached_globals_summary
Cache 1 globals in on_mcm_load
Impact: medium
Show code
L323: pairs L328: pairs
L351 🟢 uncached_globals_summary
Cache 1 globals in on_option_change
Impact: medium
Show code
L354: pairs L358: pairs
L24 🔴 global_write
Global write: mcm_id
Impact: low
Show code
mcm_id = "efp_ui"
L186 🔴 global_write
Global write: module_settings
Impact: low
Show code
module_settings = {}

grok_remove_belt_duplicates.script

L35 🟢 uncached_globals_summary
Cache 1 globals in get_artefact_from_container
Impact: medium
Show code
L37: string.find L39: string.find
L38 🔴 global_write
Global write: res
Impact: low
Show code
res = sec:gsub("_lead_box", "")
L40 🔴 global_write
Global write: res
Impact: low
Show code
res = sec:gsub("_af_iam", "")
L42 🔴 global_write
Global write: res
Impact: low
Show code
res = sec:gsub("_af_aac", "")
L44 🔴 global_write
Global write: res
Impact: low
Show code
res = sec:gsub("_af_aam", "")
L60 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check (auto-fixable)
Impact: low
Show code
actor:iterate_belt( function (owner, obj)
L76 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:move_to_ruck(obj)

item_weapon_remove_old_ammo.script

L3 🟢 uncached_globals_summary
Cache 1 globals in Reset
Impact: medium
Show code
L30: string.find L30: string.find
L39 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("ERROR: could not find ammo list for [%s] - grenade mode: %s", self.section, self.grenade_mode)

sota_stats_tweak_gamma.script

L576 🟢 uncached_globals_summary
Cache 3 globals in change_color_brightness
Impact: medium
Show code
L585: bit.band L586: bit.band L586: bit.rshift L587: bit.rshift L590: math.ceil L591: math.ceil
L628 🟢 uncached_globals_summary
Cache 1 globals in UpdateStats
Impact: medium
Show code
L635: pairs L668: pairs
L906 🟢 uncached_globals_summary
Cache 1 globals in UpdateStatsBonus
Impact: medium
Show code
L930: pairs L936: pairs
L223 🟢 repeated_obj_section()
obj:section() called 3x in <global>
Impact: low
Show code
Cache obj:section() result
L120 🔴 global_write
Global write: hit_type
Impact: low
Show code
hit_type = gadb.hit_type
L121 🔴 global_write
Global write: immunity
Impact: low
Show code
immunity = gadb.immunity
L122 🔴 global_write
Global write: protection
Impact: low
Show code
protection = gadb.protection
L123 🔴 global_write
Global write: booster_type_def
Impact: low
Show code
booster_type_def = gadb.booster_type_def
L124 🔴 global_write
Global write: adjuster
Impact: low
Show code
adjuster = gadb.adjuster
L125 🔴 global_write
Global write: arti_adjuster
Impact: low
Show code
arti_adjuster = gadb.arti_adjuster
L126 🔴 global_write
Global write: limiter
Impact: low
Show code
limiter = gadb.limiter
L127 🔴 global_write
Global write: elemental
Impact: low
Show code
elemental = gadb.elemental
L128 🔴 global_write
Global write: psy
Impact: low
Show code
psy = gadb.psy
L129 🔴 global_write
Global write: cap_stat
Impact: low
Show code
cap_stat = gadb.cap_stat
L130 🔴 global_write
Global write: defense
Impact: low
Show code
defense = gadb.defense
L135 🔴 global_write
Global write: gadb_const
Impact: low
Show code
gadb_const = {
L256 🔴 global_write
Global write: limiter
Impact: low
Show code
limiter = limiter + af_limit
L258 🔴 global_write
Global write: limiter
Impact: low
Show code
limiter = 0.95
L271 🔴 global_write
Global write: booster_value
Impact: low
Show code
booster_value = booster_value * adj
L335 🔴 global_write
Global write: def
Impact: low
Show code
def = def or 0
L433 🔴 global_write
Global write: def
Impact: low
Show code
def = def or 0
L747 🔴 global_write
Global write: booster_value
Impact: low
Show code
booster_value = booster_value * adj
L1270 🔴 global_write
Global write: hovered_object
Impact: low
Show code
hovered_object = nil
L1273 🔴 global_write
Global write: hovered_object
Impact: low
Show code
hovered_object = obj:id()
L1281 🔴 global_write
Global write: hovered_object
Impact: low
Show code
hovered_object = nil
L1301 🔴 global_write
Global write: n
Impact: low
Show code
n = math.floor(math.max(n or 1, 1))
L1306 🔴 global_write
Global write: n
Impact: low
Show code
n = n - 1
L174 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local outfit = actor:item_in_slot(7)
L198 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local helmet = actor:item_in_slot(12)
L222 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:iterate_belt( function(owner, obj)
L266 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:cast_Actor():conditions():BoosterForEach( function(booster_type, booster_time, booster_value)
L642 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local outfit = actor:item_in_slot(7)
L675 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local helm = actor:item_in_slot(12)
L708 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:iterate_belt( function(owner, obj)
L741 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:cast_Actor():conditions():BoosterForEach( function(booster_type, booster_time, booster_value)
L840 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local power = actor:cast_Actor():conditions():V_SatietyPower()
L1005 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local is_on_belt = actor:is_on_belt(obj) -- selected artefact is on the belt
L1016 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local cnt_arty = actor:belt_count()
L1033 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local arty_on_belt = (i <= cnt_arty) and actor:item_on_belt(i-1)
L1156 🟡 unused_local_variable
Local variable 'is_br_stats' is assigned but never used
Impact: low
Show code
local is_br_stats = (name == "br_class") or (name == "head_br_class")

svui_condition_bars.script

L1 🔴 global_write
Global write: XML_bars
Impact: low
Show code
XML_bars = CScriptXmlInit()

ui_inventory.script

L1796 🟢 table_insert_append
table.insert(context_str, v) -> context_str[#context_str+1] = v
Impact: high
Show code
table.insert(context_str, name)
L1801 🟢 table_insert_append
table.insert(context_action, v) -> context_action[#context_action+1] = v
Impact: high
Show code
table.insert(context_action, func_action[1])
L1802 🟢 table_insert_append
table.insert(context_params, v) -> context_params[#context_params+1] = v
Impact: high
Show code
table.insert(context_params, {id, bag, unpack(func_action)})
L2226 🟢 table_insert_append
table.insert(free_slots, v) -> free_slots[#free_slots+1] = v
Impact: high
Show code
table.insert(free_slots, cslots[i])
L690 🟢 uncached_globals_summary
Cache 1 globals in InitControls
Impact: medium
Show code
L747: ipairs L773: ipairs
L1256 🟢 uncached_globals_summary
Cache 1 globals in UpdateStyles
Impact: medium
Show code
L1289: ipairs L1449: ipairs
L1741 🟢 uncached_globals_summary
Cache 1 globals in InitProperties
Impact: medium
Show code
L1762: unpack L1771: unpack
L2688 🟢 uncached_globals_summary
Cache 1 globals in UpdateStats
Impact: medium
Show code
L2693: pairs L2732: pairs
L2919 🟢 uncached_globals_summary
Cache 1 globals in On_Sort
Impact: medium
Show code
L2955: pairs L2958: pairs
L3359 🟢 uncached_globals_summary
Cache 1 globals in LMode_RefreshInventories
Impact: medium
Show code
L3366: pairs L3372: pairs
L3536 🟢 uncached_globals_summary
Cache 1 globals in TMode_RefreshInventories
Impact: medium
Show code
L3544: pairs L3549: pairs
L3855 🟢 uncached_globals_summary
Cache 1 globals in RMode_InitItem
Impact: medium
Show code
L3868: pairs L3914: pairs
L4549 🟢 uncached_globals_summary
Cache 1 globals in On_CC_Mouse1_DB
Impact: medium
Show code
L4607: unpack L4616: unpack
L4776 🟢 uncached_globals_summary
Cache 1 globals in Update
Impact: medium
Show code
L4805: pairs L4820: pairs
L4313 🟢 repeated_obj_from_section()
obj_from:section() called 3x in On_CC_DragDrop
Impact: low
Show code
Cache obj_from:section() result
L4889 🟡 string_concat_in_loop
String concat in loop: ext_descr = ext_descr .. x
Impact: critical
Show code
ext_descr = ext_descr .. self:FormatStatDescrLine(prop.st, equ_total, prop.unit, prop.idp, " \\n \\n", extra) .. equ_descr
L4944 🟡 string_concat_in_loop
String concat in loop: result = result .. x
Impact: critical
Show code
result = result .. self:FormatStatDescrLine(ext_line.st, ext_line.value, unit, idp, " \\n • ")
L5009 🟡 string_concat_in_loop
String concat in loop: result = result .. x
Impact: critical
Show code
result = result .. self:FormatStatDescrLine("st_stats_subtitle_"..equ_type, val, unit, idp, " \\n • ", boost_time_str)
L5025 🟡 string_concat_in_loop
String concat in loop: result = result .. x
Impact: critical
Show code
result = result .. self:FormatStatDescrLine(ext_line.st, ext_line.value, unit, idp, " \\n")
L1708 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR Can't get item game object!")
L1908 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR UIInventory:Name_Custom | can't find function (%s) for %s in section [%s]", str[1] .. str[2], "use" .. i .. "_functor", sec)
L2286 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR UIInventory:Action_Custom | can't find function (%s) for %s in section [%s]", str[1] .. str[2], "use" .. i .. "_action_functor", sec)
L54 🔴 global_write
Global write: is_gamma
Impact: low
Show code
is_gamma = gts("ui_st_game_version"):find(gamma_tag)
L58 🔴 global_write
Global write: show_full_stats
Impact: low
Show code
show_full_stats = false
L60 🔴 global_write
Global write: show_weight
Impact: low
Show code
show_weight = false
L62 🔴 global_write
Global write: st_perc
Impact: low
Show code
st_perc = gts("st_perc")
L64 🔴 global_write
Global write: clr_stats_t
Impact: low
Show code
clr_stats_t = {
L70 🔴 global_write
Global write: satiety_max
Impact: low
Show code
satiety_max = nil
L71 🔴 global_write
Global write: thirst_mul
Impact: low
Show code
thirst_mul = actor_status_thirst.eat_thirstiness_mul or 1000
L72 🔴 global_write
Global write: thirst_max
Impact: low
Show code
thirst_max = 10000-- actor_status_thirst.start_blur_4 or (is_gamma and 8000 or 5760)
L73 🔴 global_write
Global write: sleep_mul
Impact: low
Show code
sleep_mul = actor_status_sleep.eat_sleepiness_mul or (is_gamma and 2000 or 1000)
L74 🔴 global_write
Global write: sleep_max
Impact: low
Show code
sleep_max = 10000-- actor_status_sleep.start_blur_4 or 8750
L76 🔴 global_write
Global write: stat_radia
Impact: low
Show code
stat_radia = { magn= 1 , unit= "st_perc" }
L78 🔴 global_write
Global write: xml_clr_t
Impact: low
Show code
xml_clr_t = {
L87 🔴 global_write
Global write: stats_round_idp
Impact: low
Show code
stats_round_idp = function(num, idp)
L91 🔴 global_write
Global write: idp
Impact: low
Show code
idp = idp or 0
L95 🔴 global_write
Global write: idp
Impact: low
Show code
idp = math_max( 2 , idp )
L97 🔴 global_write
Global write: idp
Impact: low
Show code
idp = math_max( 1 , idp )
L103 🔴 global_write
Global write: align_t
Impact: low
Show code
align_t = {
L112 🔴 global_write
Global write: font_t
Impact: low
Show code
font_t = {
L125 🔴 global_write
Global write: ui_rework_support
Impact: low
Show code
ui_rework_support = {
L237 🔴 global_write
Global write: display_supply_level
Impact: low
Show code
display_supply_level = is_gamma
L263 🔴 global_write
Global write: color_settings
Impact: low
Show code
color_settings = {
L303 🔴 global_write
Global write: faction_colors
Impact: low
Show code
faction_colors = {
L318 🔴 global_write
Global write: faction_text_colors
Impact: low
Show code
faction_text_colors = {
L334 🔴 global_write
Global write: stat_colors
Impact: low
Show code
stat_colors = not is_gamma and {
L368 🔴 global_write
Global write: slot_colors
Impact: low
Show code
slot_colors = {
L385 🔴 global_write
Global write: player_faction_color
Impact: low
Show code
player_faction_color = GetARGB( 255 , 39 , 39 , 160 )
L386 🔴 global_write
Global write: player_faction_text_color
Impact: low
Show code
player_faction_text_color = GetARGB( 255 , 255 , 232 , 208 )
L2810 🔴 global_write
Global write: booster_value
Impact: low
Show code
booster_value = booster_value * adj
L4345 🔴 global_write
Global write: quick_item
Impact: low
Show code
quick_item = exec_console_cmd("slot_" .. (idx_to - 1) .. " " .. obj_from:section())
L4901 🔴 global_write
Global write: satiety_max
Impact: low
Show code
satiety_max = (not satiety_max) and utils_ui.stats_table["booster"]["eat_satiety"].magnitude or satiety_max
L1710 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
self:Print(nil, msg, obj:name())
L1729 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
return p:id() == AC_ID
L1732 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
return npc and p:id() == npc:id()
L2475 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local actor_community = actor:character_community():sub(7)
L2476 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local actor_icon = actor:character_icon()
L2477 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local actor_money = actor:money()
L2527 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local outfit = actor:item_in_slot(7)
L2528 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local backpack = actor:item_in_slot(13)
L2531 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local tot_weight = actor:get_total_weight()
L2534 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local max_weight = actor:get_actor_max_weight()
L2537 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
max_weight = max_weight + (outfit and outfit:get_additional_max_weight() or 0)
L2540 🟡 potential_nil_access
Potential nil access: 'backpack' from :item_in_slot() used without nil check
Impact: low
Show code
max_weight = max_weight + (backpack and backpack:get_additional_max_weight() or 0)
L2545 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:iterate_inventory( function(owner, obj)
L2551 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:iterate_belt( function(owner, obj)
L2558 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:cast_Actor():conditions():BoosterForEach( function(booster_type, booster_time, booster_value)
L2629 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local item = actor:item_in_slot(i)
L2641 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local outfit = actor:item_in_slot(7)
L2658 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local outfit = actor:item_in_slot(7)
L2659 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local cnt_arty = actor:belt_count()
L2660 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local cnt_arty_slot = outfit and outfit:cast_CustomOutfit():get_artefact_count() or 0
L2664 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local item = i <= cnt_arty and actor:item_on_belt(i-1)
L2700 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local outfit = actor:item_in_slot(7)
L2739 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local helm = actor:item_in_slot(12)
L2775 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:iterate_belt( function(owner, obj)
L2804 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:cast_Actor():conditions():BoosterForEach( function(booster_type, booster_time, booster_value)
L2848 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local power = actor:cast_Actor():conditions():V_SatietyPower()
L3150 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
local clsid = obj:clsid()
L3427 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
tot_weight = tot_weight + obj:weight()
L4106 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
local sec = obj:section()
L4107 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
local cond = obj:condition()
L4135 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
inventory_upgrades.effect_repair_item( obj:section(), obj:condition())
L4135 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
inventory_upgrades.effect_repair_item( obj:section(), obj:condition())
L4136 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
obj:set_condition(0.99999)

utils_ui.script

L1246 🟢 table_insert_append
table.insert(self.childs, v) -> self.childs[#self.childs+1] = v
Impact: high
Show code
table.insert(self.childs, IsItem("ammo",sec) or 1)
L581 🟢 uncached_globals_summary
Cache 1 globals in Set
Impact: medium
Show code
L614: math.ceil L615: math.ceil
L2386 🟢 uncached_globals_summary
Cache 1 globals in Reset
Impact: medium
Show code
L2390: pairs L2393: pairs
L1784 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR UICellContainer:RemoveItemManual | can't get game object for [%s]", sec)
L1946 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR UICellContainer:FindSimilar | no data recieved!")
L263 🔴 global_write
Global write: stats_table
Impact: low
Show code
stats_table = {}
L567 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
local condition = (obj and obj:condition()) or 0
L1296 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
self.section = obj and obj:section()
L128 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, kind, order = ini_sys:r_line_ex("item_kind_order",i,"","")
L2834 🟡 unused_local_variable
Local variable 'cls' is assigned but never used
Impact: low
Show code
local cls = obj:clsid()

utils_ui_icon_rotation_fix_mcm.script

L225 🟡 unused_local_variable
Local variable 'h_upgr' is assigned but never used
Impact: low
Show code
local w_upgr, h_upgr = self.upgr:GetWidth(), self.upgr:GetHeight()

weight_of_catergory.script

L4 🔴 global_write
Global write: weight_offset
Impact: low
Show code
weight_offset = 18

z_aaa_rax_icon_override_mcm.script

L4 🟢 uncached_globals_summary
Cache 1 globals in Set
Impact: medium
Show code
L37: math.ceil L38: math.ceil

z_barter_ui.script

L2 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("original script not found, patch not activated")

z_faction_trade_ui.script

L2 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("original script not found, patch not activated")

z_indirect_parts_favoriter.script

L2 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("original script not found, patch not activated")

z_inventory_upgrades.script

L21 🟢 uncached_globals_summary
Cache 1 globals in inventory_upgrades.property_functor_a
Impact: medium
Show code
L49: tonumber L51: tonumber
L27 🟡 unused_local_variable
Local variable 'section' is assigned but never used
Impact: low
Show code
local section = section_table[1]

z_item_icon_info.script

L511 🟢 uncached_globals_summary
Cache 1 globals in Add_Ammo_Short_Name_Text
Impact: medium
Show code
L513: pairs L518: pairs
L631 🟢 uncached_globals_summary
Cache 1 globals in change_alpha
Impact: medium
Show code
L634: bit.band L635: bit.band
L745 🟢 uncached_globals_summary
Cache 1 globals in Add_Mag_Icon_Text
Impact: medium
Show code
L755: pairs L760: pairs
L558 🟡 string_concat_in_loop
String concat in loop: name_cutoff = name_cutoff .. x
Impact: critical
Show code
name_cutoff = name_cutoff .. " " .. str_table[1]
L563 🟡 string_concat_in_loop
String concat in loop: gc_name = gc_name .. x
Impact: critical
Show code
gc_name = gc_name .. str_table[i]
L842 🟡 string_concat_in_loop
String concat in loop: name_cutoff = name_cutoff .. x
Impact: critical
Show code
name_cutoff = name_cutoff .. " " .. str_table[1]
L847 🟡 string_concat_in_loop
String concat in loop: gc_name = gc_name .. x
Impact: critical
Show code
gc_name = gc_name .. str_table[i]
L2 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("mcm script (item_icon_info_mcm.script) of addon UI Improvements by Utjan not found, patch not activated")
L6 🔴 global_write
Global write: bar_list
Impact: low
Show code
bar_list = {
L14 🔴 global_write
Global write: utjan_xml
Impact: low
Show code
utjan_xml = nil
L16 🔴 global_write
Global write: base_init
Impact: low
Show code
base_init = utils_ui.UICellItem.InitControls
L22 🔴 global_write
Global write: base_pbar
Impact: low
Show code
base_pbar = utils_ui.UICellItem.Add_ProgressBar
L41 🔴 global_write
Global write: base_counter
Impact: low
Show code
base_counter = utils_ui.UICellItem.Add_Counter
L56 🔴 global_write
Global write: base_reset
Impact: low
Show code
base_reset = utils_ui.UICellItem.Reset
L81 🔴 global_write
Global write: valid_wpn_kinds
Impact: low
Show code
valid_wpn_kinds = {
L91 🔴 global_write
Global write: grenade_classes
Impact: low
Show code
grenade_classes = {
L97 🔴 global_write
Global write: main_slot_indexes
Impact: low
Show code
main_slot_indexes = {
L221 🔴 global_write
Global write: arty_table
Impact: low
Show code
arty_table = {
L332 🔴 global_write
Global write: clr_r
Impact: low
Show code
clr_r = GetARGB(255,196,18,18)
L333 🔴 global_write
Global write: clr_o
Impact: low
Show code
clr_o = utils_xml.get_color("d_orange", true)
L334 🔴 global_write
Global write: clr_y
Impact: low
Show code
clr_y = GetARGB(255,255,255,118)
L335 🔴 global_write
Global write: clr_g
Impact: low
Show code
clr_g = GetARGB(255,107,207,119)
L336 🔴 global_write
Global write: clr_missing
Impact: low
Show code
clr_missing = GetARGB(255,70,60,60) -- Missing part color
L443 🔴 global_write
Global write: unique_mapping
Impact: low
Show code
unique_mapping = {
L454 🔴 global_write
Global write: name_mapping
Impact: low
Show code
name_mapping = {
L500 🔴 global_write
Global write: valid_ammo_class
Impact: low
Show code
valid_ammo_class = {
L505 🔴 global_write
Global write: valid_exlosive_ammo
Impact: low
Show code
valid_exlosive_ammo = {
L643 🔴 global_write
Global write: one_use_recipes
Impact: low
Show code
one_use_recipes = {
L647 🔴 global_write
Global write: workshop_autoinject_known_recipes
Impact: low
Show code
workshop_autoinject_known_recipes = {}
L649 🔴 global_write
Global write: functor_table_readable
Impact: low
Show code
functor_table_readable = {
L692 🔴 global_write
Global write: workshop_autoinject_known_recipes
Impact: low
Show code
workshop_autoinject_known_recipes = workshop_autoinject and workshop_autoinject.known_recipe or workshop_autoinject_known_recipes
L736 🔴 global_write
Global write: base_wai_load
Impact: low
Show code
base_wai_load = workshop_autoinject.load_state
L739 🔴 global_write
Global write: workshop_autoinject_known_recipes
Impact: low
Show code
workshop_autoinject_known_recipes = mdata.known_recipe or {}
L906 🔴 global_write
Global write: repair_type_texture_tbl
Impact: low
Show code
repair_type_texture_tbl = {
L932 🔴 global_write
Global write: settings
Impact: low
Show code
settings = load_defaults()
L935 🔴 global_write
Global write: settings
Impact: low
Show code
settings = load_defaults()
L954 🔴 global_write
Global write: utjan_xml
Impact: low
Show code
utjan_xml = CScriptXmlInit()

z_item_recipe.script

L2 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Banjaji's Crafting System Improvements detected, vanilla recipe window patch disabled")
L40 🟡 unused_local_variable
Local variable 'line' is assigned but never used
Impact: low
Show code
local line = xml:InitStatic("recipe:list:pic_line",_st)

z_item_recipe_Banjaji_CSI.script

L2 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("original script not found, patch not activated")

z_soulslike_sleep_dialog.script

L2 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("original script not found, patch not activated")

z_souslike_gamemode_injector_mcm.script

L2 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("original script not found, patch not activated")

z_tasks_placeable_waypoints.script

L2 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("original script not found, patch not activated")

z_ui_itm_details.script

L2 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("original script not found, patch not activated")

z_ui_workshop.script

L242 🟢 uncached_globals_summary
Cache 1 globals in EvaluateUpgrades
Impact: medium
Show code
L245: pairs L246: pairs
L193 🟡 string_concat_in_loop
String concat in loop: prereq = prereq .. x
Impact: critical
Show code
prereq = prereq .. "\\n • " .. str

z_upgrade_rank_pricing.script

L35 🔴 global_write
Global write: rank
Impact: low
Show code
rank = section:sub(14,14)
L67 🔴 global_write
Global write: cur_hint
Impact: low
Show code
cur_hint = nil
L103 🔴 global_write
Global write: rank
Impact: low
Show code
rank = section:sub(14,14)

z_utils_ui_demonized_inventory_weights.script

L2 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("original script not found, patch not activated")
L19 🔴 global_write
Global write: sec
Impact: low
Show code
sec = sec or obj:section()

z_utils_xml.script

L13 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR utils_xml.set_icon | XML_box or XML_temp doesn't exist")
L21 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR utils_xml.set_icon | section [%s] doesn't exist in system ini", sec)
L3 🟡 unused_local_variable
Local variable 'rw' is assigned but never used
Impact: low
Show code
local ico_size, rw, rh, _le = 0.7,1,1,50
L3 🟡 unused_local_variable
Local variable 'rh' is assigned but never used
Impact: low
Show code
local ico_size, rw, rh, _le = 0.7,1,1,50

zz_ui_inventory_better_stats_bars.script

L1 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("this script is disabled because the addon is no longer compatible")

zzz_craft_use_in_tooltip_mcm.script

L302 🟢 uncached_globals_summary
Cache 1 globals in getCraftableItems
Impact: medium
Show code
L313: pairs L325: pairs
L418 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str = str .. ","
L443 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
str = str .. ","
L14 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(error_or_result)
L430 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! Craft Info in Tooltip | Could not find inv name of section " .. craftable_sec)
L452 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! Craft Info in Tooltip | Could not find inv name of section " .. meal_sec)
L25 🔴 global_write
Global write: og_info_item_init
Impact: low
Show code
og_info_item_init = utils_ui.UIInfoItem.__init
L181 🔴 global_write
Global write: og_info_item_update
Impact: low
Show code
og_info_item_update = utils_ui.UIInfoItem.Update
L311 🔴 global_write
Global write: result
Impact: low
Show code
result, ingredients, item = ini_craft:r_line_ex(section,i,"","")
L311 🔴 global_write
Global write: ingredients
Impact: low
Show code
result, ingredients, item = ini_craft:r_line_ex(section,i,"","")
L311 🔴 global_write
Global write: item
Impact: low
Show code
result, ingredients, item = ini_craft:r_line_ex(section,i,"","")
L323 🔴 global_write
Global write: result
Impact: low
Show code
result, recipe_name, info = ini_craft:r_line_ex(section,i,"","")
L323 🔴 global_write
Global write: recipe_name
Impact: low
Show code
result, recipe_name, info = ini_craft:r_line_ex(section,i,"","")
L323 🔴 global_write
Global write: info
Impact: low
Show code
result, recipe_name, info = ini_craft:r_line_ex(section,i,"","")
L374 🔴 global_write
Global write: result
Impact: low
Show code
result, recipe_name, info = ini_cook:r_line_ex("meal_list",i,"","")
L374 🔴 global_write
Global write: recipe_name
Impact: low
Show code
result, recipe_name, info = ini_cook:r_line_ex("meal_list",i,"","")
L374 🔴 global_write
Global write: info
Impact: low
Show code
result, recipe_name, info = ini_cook:r_line_ex("meal_list",i,"","")
L494 🔴 global_write
Global write: base_build_desc_footer
Impact: low
Show code
base_build_desc_footer = ui_item.build_desc_footer
L497 🔴 global_write
Global write: base_details_reset
Impact: low
Show code
base_details_reset = ui_itm_details.UIItemSheet.Reset
L502 🔴 global_write
Global write: base_add_recipe
Impact: low
Show code
base_add_recipe = workshop_autoinject.add_new_recipe
L515 🔴 global_write
Global write: base_add_override_recipe
Impact: low
Show code
base_add_override_recipe = workshop_autoinject.add_override_recipe
L524 🔴 global_write
Global write: base_remove_recipe
Impact: low
Show code
base_remove_recipe = workshop_autoinject.remove_existing_recipes
L533 🔴 global_write
Global write: base_clear_recipe
Impact: low
Show code
base_clear_recipe = workshop_autoinject.clear_existing_recipes
L554 🔴 global_write
Global write: op
Impact: low
Show code
op = { id= "craft_in_tooltip",sh=true ,gr={
L111 🟡 unused_local_variable
Local variable 'recipes_pos' is assigned but never used
Impact: low
Show code
local recipes_pos = self[cont]:GetWndPos()
L112 🟡 unused_local_variable
Local variable 'recipes_size' is assigned but never used
Impact: low
Show code
local recipes_size = {x = self[cont]:GetWidth(), y = self[cont]:GetHeight()}

zzz_parts_in_tooltip.script

L2 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("original script not found, patch not activated")

zzzzz_arti_jamming_repairs.script

L42 🟡 string_concat_in_loop
String concat in loop: str_msg = str_msg .. x
Impact: critical
Show code
str_msg = str_msg .. "\\n • " .. ui_item.get_sec_name(k)
L2 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("original script not found, patch not activated")
L28 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
wpn:force_unload_magazine(true)

UI Rework G.A.M.M.A. Style - Sota INVENTORY WEIGHTS PATCH

1 file (🟢0 🟡0 🔴1 🔵1)

z_utils_ui_demonized_inventory_weights.script

L2 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("original script not found, patch not activated")
L19 🔴 global_write
Global write: sec
Impact: low
Show code
sec = sec or obj:section()

WPO fix heat lua crash

1 file (🟢4 🟡11 🔴7 🔵3)

arti_jamming.script

L210 🟢 repeated_gun_id()
gun:id() called 3x in actor_on_update
Impact: low
Show code
Cache gun:id() result
L218 🟢 repeated_gun_section()
gun:section() called 5x in actor_on_update
Impact: low
Show code
Cache gun:section() result
L596 🟢 repeated_wpn_obj_id()
wpn_obj:id() called 2x in actor_on_weapon_fired
Impact: low
Show code
Cache wpn_obj:id() result
L48 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("arti_jamming | %s | " .. txt, time_global(), ...)
L339 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(jc_ratio)
L341 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(jc)
L2 🔴 global_write
Global write: gc
Impact: low
Show code
gc = game.translate_string
L3 🔴 global_write
Global write: math_random
Impact: low
Show code
math_random = math.random
L4 🔴 global_write
Global write: math_floor
Impact: low
Show code
math_floor = math.floor
L36 🔴 global_write
Global write: get_config
Impact: low
Show code
get_config = a_arti_jamming_mcm.get_config
L38 🔴 global_write
Global write: d_flag
Impact: low
Show code
d_flag = false
L826 🔴 global_write
Global write: d_flag
Impact: low
Show code
d_flag = false
L832 🔴 global_write
Global write: d_flag
Impact: low
Show code
d_flag = true
L210 🟡 potential_nil_access
Potential nil access: 'gun' from :active_item() used without nil check
Impact: low
Show code
if gun and gun:id() ~= cgd.id then
L486 🟡 potential_nil_access
Potential nil access: 'obj_wpn' from :active_item() used without nil check
Impact: low
Show code
local id = obj_wpn and obj_wpn:id() or 0
L759 🟡 potential_nil_access
Potential nil access: 'item' from :item_in_slot() used without nil check
Impact: low
Show code
local item_id = item and item:id() or 0
L843 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
jammed_guns[wpn:id()] = 4
L844 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
print_dbg("Logged id %s, sec %s", wpn:id(), wpn:section())
L844 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
print_dbg("Logged id %s, sec %s", wpn:id(), wpn:section())
L519 🟢 dead_code_if_false
Dead code: if false (lines 519-525)
Impact: low
Show code
if false then--math.random(100) < misfire_chance / 3 then
L23 🟡 unused_local_variable
Local variable 'DAMAGE_THRESHOLD' is assigned but never used
Impact: low
Show code
local DAMAGE_THRESHOLD = 86
L32 🟡 unused_local_variable
Local variable 'SALE_PART_MIN' is assigned but never used
Impact: low
Show code
local SALE_PART_MIN = 51
L408 🟡 unused_local_variable
Local variable 'heat_per_shot' is assigned but never used
Impact: low
Show code
local heat_per_shot = 10
L796 🟡 unused_local_variable
Local variable 'new_weapon' is assigned but never used
Impact: low
Show code
local new_weapon = alife_clone_weapon(old_weapon)
L957 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, sec, value = ini_overheat:r_line("custom_overheat" , i , "", "")

Warfare Alife Overhaul Gamma Patch

19 files (🟢86 🟡84 🔴129 🔵144)

faction_expansions.script

L291 🟢 uncached_globals_summary
Cache 1 globals in get_section
Impact: medium
Show code
L292: math.random L308: math.random
L23 🔴 global_write
Global write: faction
Impact: low
Show code
faction = {}
L24 🔴 global_write
Global write: level
Impact: low
Show code
level = {}
L25 🔴 global_write
Global write: mutant
Impact: low
Show code
mutant = {}
L26 🔴 global_write
Global write: mutant_tier_by_clsid
Impact: low
Show code
mutant_tier_by_clsid = {
L421 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_fact:r_line_ex("mutant_tier",i,"","")

modxml_ui_options_warfare_patch.script

L278 🟢 uncached_globals_summary
Cache 1 globals in second_to_time_string
Impact: medium
Show code
L283: string.format L285: string.format

request_for_backup.script

L9 🟢 uncached_globals_summary
Cache 2 globals in process_manual_request
Impact: medium
Show code
L23: pairs L30: pairs L134: math.random L156: math.random

show_capture_point_on_map.script

L44 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1)
L58 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0)
L62 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1)
L11 🔴 global_write
Global write: printd
Impact: low
Show code
printd = warfare.printd
L13 🔴 global_write
Global write: str_wrfr_cr
Impact: low
Show code
str_wrfr_cr = game.translate_string("st_wrfr_canc_req_backup")
L14 🔴 global_write
Global write: str_wrfr_rs
Impact: low
Show code
str_wrfr_rs = game.translate_string("st_wrfr_req_squad")
L20 🔴 global_write
Global write: s_obj
Impact: low
Show code
s_obj = h_smart and alife_object(h_smart)
L32 🔴 global_write
Global write: s_obj
Impact: low
Show code
s_obj = h_smart and alife_object(h_smart)

sim_offline_combat.script

L105 🟢 uncached_globals_summary
Cache 1 globals in smart_terrain_on_update
Impact: medium
Show code
L109: pairs L122: pairs
L243 🟢 uncached_globals_summary
Cache 1 globals in coordinator
Impact: medium
Show code
L297: pairs L307: pairs
L174 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!!! TRYING TO REGISTER NON-SQUAD AS SQUAD")
L56 🔴 global_write
Global write: task_squads
Impact: low
Show code
task_squads = {}
L58 🔴 global_write
Global write: story_id_communities
Impact: low
Show code
story_id_communities = {}
L59 🔴 global_write
Global write: ignore_list
Impact: low
Show code
ignore_list = {}
L60 🔴 global_write
Global write: stationary_squads
Impact: low
Show code
stationary_squads = {}
L63 🔴 global_write
Global write: ocs_power
Impact: low
Show code
ocs_power = {}
L64 🔴 global_write
Global write: opponents
Impact: low
Show code
opponents = {}
L65 🔴 global_write
Global write: squads_by_level
Impact: low
Show code
squads_by_level = {}
L143 🔴 global_write
Global write: in_combat
Impact: low
Show code
in_combat = validate_enemy(sim, lid_1, squad_1, id_1, id_t, community_1)
L155 🔴 global_write
Global write: in_combat
Impact: low
Show code
in_combat = validate_enemy(sim, lid_1, squad_1, id_1, id_2, community_1)
L757 🔴 global_write
Global write: task_squads
Impact: low
Show code
task_squads = m_data.offline_task_squads or {}
L123 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local squad_1 = sim:object(id_1)
L124 🟡 potential_nil_access
Potential nil access: 'squad_1' from :object() used without nil check
Impact: low
Show code
local section = squad_1 and squad_1:section_name()
L298 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local squad = sim:object(id)
L309 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_npc = id and sim:object(id)
L310 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local squad = se_npc and se_npc.group_id and se_npc.group_id ~= 65535 and sim:object(se_npc.group_id)
L320 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local squad = sim:object(id)
L321 🟡 potential_nil_access
Potential nil access: 'squad' from :object() used without nil check
Impact: low
Show code
local section = squad and squad:section_name()
L384 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local squad_2 = id_2 and sim:object(id_2)
L645 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = k.id and sim:object(k.id)
L43 🟡 unused_local_variable
Local variable 'MONSTER_MULTI' is assigned but never used
Impact: low
Show code
local MONSTER_MULTI = 1 -- multiplier for mutants rank
L51 🟡 unused_local_variable
Local variable 'smart_battles_only' is assigned but never used
Impact: low
Show code
local smart_battles_only
L53 🟡 unused_local_variable
Local variable 'string_find' is assigned but never used
Impact: low
Show code
local is_enemy, string_find, math_random, math_ceil, math_max, math_pow = game_relations.is_factions_enemies, string.find, math.random, math.ceil, math.max, math.pow
L68 🟡 unused_local_variable
Local variable 'c_cnt' is assigned but never used
Impact: low
Show code
local c_cnt, c_tbl = 0, {} -- enemies collector
L68 🟡 unused_local_variable
Local variable 'c_tbl' is assigned but never used
Impact: low
Show code
local c_cnt, c_tbl = 0, {} -- enemies collector
L340 🟡 unused_local_variable
Local variable 'pop_factor' is assigned but never used
Impact: low
Show code
local pop_factor = (stalker_pop_factor + monster_pop_factor)/2
L744 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_ocs:r_line_ex("stationary_squads",i,"","")

sim_squad_warfare.script

L789 🟢 uncached_globals_summary
Cache 1 globals in find_random_patrol_target
Impact: medium
Show code
L798: pairs L811: pairs
L405 🟢 repeated_pda_section()
pda:section() called 4x in sim_squad_scripted.sim_squad_scripted.show
Impact: low
Show code
Cache pda:section() result
L71 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, "squad_on_update: "..squad:name())
L80 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, squad:name())
L127 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(2, squad:name())
L135 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!!! TRYING TO REGISTER NON-SQUAD AS SQUAD")
L141 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("--- registering " .. squad:section_name() .. " with warfare")
L167 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(3, squad:name())
L199 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, "squad_warfare_update: "..squad:name())
L250 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, squad:name())
L317 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, squad:name())
L332 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, squad:name())
L336 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, "squad_on_npc_death: "..squad:name())
L360 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, squad:name())
L366 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, self:name().." registered: "..tostring(self.registered_with_warfare))
L370 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, self:name())
L382 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(2, self:name())
L525 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(3, self:name())
L531 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, self:name())
L534 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, self:name())
L541 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(2, self:name())
L597 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, squad:name())
L648 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, squad:name())
L654 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, squad:name())
L779 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, squad:name())
L790 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, squad:name())
L828 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, squad:name())
L837 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, squad:name())
L899 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, squad:name())
L903 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(2, squad:name())
L917 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, squad:name())
L920 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("squad %s is from capture territory task, ignore it's target", squad:name())
L958 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, squad:name())
L963 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, squad:name())
L986 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, squad:name())
L21 🔴 global_write
Global write: printd
Impact: low
Show code
printd = warfare.printd
L22 🔴 global_write
Global write: dbg_map_hud
Impact: low
Show code
dbg_map_hud = false
L24 🔴 global_write
Global write: squad_icons
Impact: low
Show code
squad_icons = {
L405 🟡 potential_nil_access
Potential nil access: 'pda' from :item_in_slot() used without nil check
Impact: low
Show code
elseif db.actor and pda and (pda:section() == "device_pda_2") and (faction == warfare.actor_faction) then
L407 🟡 potential_nil_access
Potential nil access: 'pda' from :item_in_slot() used without nil check
Impact: low
Show code
elseif db.actor and pda and (pda:section() == "device_pda_3") and not game_relations.is_factions_enemies(warfare.actor_faction, faction) then
L484 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_actor = sim:actor()
L951 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = k.object or k.id and sim:object(k.id)
L980 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = k.object or k.id and sim:object(k.id)
L388 🟡 unused_local_variable
Local variable 'enemy' is assigned but never used
Impact: low
Show code
local enemy = game_relations.is_factions_enemies(warfare.actor_faction, faction)
L660 🟡 unused_local_variable
Local variable 'squadName' is assigned but never used
Impact: low
Show code
local squadName = squad:name()
L821 🟡 unused_local_variable
Local variable 'd' is assigned but never used
Impact: low
Show code
local d = 1 + 1/(math.min(1, math.pow(warfare.distance_to_xz_sqr(p1, p2), 2)))
L831 🟡 unused_local_variable
Local variable 'BASE_WEIGHT' is assigned but never used
Impact: low
Show code
local BASE_WEIGHT = 3
L832 🟡 unused_local_variable
Local variable 'RESOURCE_WEIGHT' is assigned but never used
Impact: low
Show code
local RESOURCE_WEIGHT = 1
L848 🟡 unused_local_variable
Local variable 'gp' is assigned but never used
Impact: low
Show code
local gp = global_position.from(squad)

smart_terrain_warfare.script

L473 🟢 uncached_globals_summary
Cache 1 globals in get_night_activity_flag
Impact: medium
Show code
L476: math.random L483: math.random
L505 🟢 uncached_globals_summary
Cache 2 globals in process_manual_capture
Impact: medium
Show code
L554: pairs L581: pairs L673: math.random L703: math.random
L871 🟢 uncached_globals_summary
Cache 1 globals in process_base_squads
Impact: medium
Show code
L884: math.random L928: math.random
L1152 🟢 uncached_globals_summary
Cache 1 globals in find_nearby_bases
Impact: medium
Show code
L1192: table.sort L1196: table.sort
L1393 🟢 uncached_globals_summary
Cache 1 globals in surge_behavior
Impact: medium
Show code
L1413: pairs L1421: pairs
L1513 🟢 uncached_globals_summary
Cache 2 globals in process_targets
Impact: medium
Show code
L1518: math.random L1525: math.random L1551: pairs L1577: pairs
L1926 🟢 uncached_globals_summary
Cache 2 globals in create_invasion_plan
Impact: medium
Show code
L1961: pairs L1982: pairs L2033: math.max L2034: math.max
L2144 🟢 uncached_globals_summary
Cache 2 globals in process_invasion_defense
Impact: medium
Show code
L2148: math.random L2157: math.random L2199: pairs L2287: pairs
L2610 🟢 uncached_globals_summary
Cache 2 globals in find_patrol_target
Impact: medium
Show code
L2631: pairs L2658: pairs L2713: math.random L2714: math.random
L2722 🟢 uncached_globals_summary
Cache 2 globals in process_patrols
Impact: medium
Show code
L2726: math.random L2732: math.random L2739: pairs L2764: pairs
L2832 🟢 uncached_globals_summary
Cache 2 globals in process_loners
Impact: medium
Show code
L2836: math.random L2842: math.random L2849: pairs L2869: pairs
L3230 🟢 uncached_globals_summary
Cache 2 globals in process_ecolog
Impact: medium
Show code
L3234: math.random L3240: math.random L3247: pairs L3265: pairs
L3567 🟢 uncached_globals_summary
Cache 2 globals in process_mutants
Impact: medium
Show code
L3572: math.random L3591: math.random L3584: pairs L3600: pairs
L3707 🟢 uncached_globals_summary
Cache 1 globals in show
Impact: medium
Show code
L3752: pairs L3776: pairs
L4936 🟢 uncached_globals_summary
Cache 1 globals in find_targets
Impact: medium
Show code
L5140: math.abs L5140: math.abs
L546 🟢 repeated_alife
alife called 4x in process_manual_capture
Impact: low
Show code
local sim = alife()
L4130 🟡 string_concat_in_loop
String concat in loop: props = props .. x
Impact: critical
Show code
props = props .. " \\n" .. clr_b .. " \\n" .. str_wrfr[17] .. " \\n" .. clr_gr
L4289 🟡 string_concat_in_loop
String concat in loop: props = props .. x
Impact: critical
Show code
props = props .. " \\n" .. clr_b .. " \\n" .. str_wrfr[17] .. " \\n" .. clr_gr
L5001 🟡 string_concat_in_loop
String concat in loop: pName = pName .. x
Impact: critical
Show code
pName = pName.." ("..other:name()..")"
L350 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0)
L359 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1)
L429 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, smart:name())
L991 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd("%s is sending a base squad to %s", faction, other:name())
L2510 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, smart:name())
L2565 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, smart:name())
L2611 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, "find_patrol_target - smart: "..(not smart and "nil" or smart:name()).."squad: "..(not squad and "nil" or squad:name()))
L2711 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1)
L3563 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(2, smart:name())
L3578 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, smart:name())
L3681 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, smart:name())
L3720 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, self:name())
L4036 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, self:name())
L4041 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, self:name())
L4061 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, self:name())
L4065 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, smart:name())
L4086 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, smart:name())
L4091 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, smart:name())
L4144 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, smart:name())
L4149 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, smart:name())
L4186 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, smart:name())
L4192 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, smart:name())
L4331 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, smart:name())
L4362 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, smart:name())
L4399 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, smart:name())
L4440 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, smart:name())
L4491 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, smart:name())
L4497 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, smart:name())
L4518 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, smart:name())
L4550 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, smart:name())
L4696 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, smart:name())
L4707 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, smart:name())
L4777 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, smart:name())
L4783 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, "find_random_patrol_target: "..(smart and smart:name() or "spawn"))
L4930 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1)
L4937 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, smart:name())
L5143 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, smart:name())
L5357 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, smart:name())
L5390 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(2, sm_name)
L5395 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(3, sm_name)
L5481 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(4, sm_name)
L56 🔴 global_write
Global write: printd
Impact: low
Show code
printd = warfare.printd
L58 🔴 global_write
Global write: hide_smarts
Impact: low
Show code
hide_smarts = false -- altered by pda_warfare.script
L63 🔴 global_write
Global write: point_cap_timers
Impact: low
Show code
point_cap_timers = {}
L64 🔴 global_write
Global write: smart_owners
Impact: low
Show code
smart_owners = {}
L65 🔴 global_write
Global write: manual_point
Impact: low
Show code
manual_point = nil
L66 🔴 global_write
Global write: dbg_hud
Impact: low
Show code
dbg_hud = false
L68 🔴 global_write
Global write: guard_size
Impact: low
Show code
guard_size = 1 -- number of squads to keep at a base when an invasion is sent out
L70 🔴 global_write
Global write: reset_defense_timer
Impact: low
Show code
reset_defense_timer = {}
L73 🔴 global_write
Global write: defense_timers
Impact: low
Show code
defense_timers = {}
L74 🔴 global_write
Global write: defense_next_update
Impact: low
Show code
defense_next_update = {}
L75 🔴 global_write
Global write: patrol_timers
Impact: low
Show code
patrol_timers = {}
L76 🔴 global_write
Global write: patrol_next_update
Impact: low
Show code
patrol_next_update = {}
L77 🔴 global_write
Global write: spawn_mutant_timers
Impact: low
Show code
spawn_mutant_timers = {}
L78 🔴 global_write
Global write: spawn_mutant_next_update
Impact: low
Show code
spawn_mutant_next_update = {}
L79 🔴 global_write
Global write: process_mutant_timers
Impact: low
Show code
process_mutant_timers = {}
L80 🔴 global_write
Global write: process_mutant_next_update
Impact: low
Show code
process_mutant_next_update = {}
L81 🔴 global_write
Global write: loner_timer
Impact: low
Show code
loner_timer = {}
L82 🔴 global_write
Global write: loners_next_update
Impact: low
Show code
loners_next_update = {}
L83 🔴 global_write
Global write: ecolog_timer
Impact: low
Show code
ecolog_timer = {}
L84 🔴 global_write
Global write: ecolog_next_update
Impact: low
Show code
ecolog_next_update = {}
L85 🔴 global_write
Global write: night_flag_timer
Impact: low
Show code
night_flag_timer = {}
L86 🔴 global_write
Global write: night_flag_next_update
Impact: low
Show code
night_flag_next_update = {}
L88 🔴 global_write
Global write: smart_terrain_distances
Impact: low
Show code
smart_terrain_distances = {} -- store distances when they get used. Save it in warfare.script to avoid lag spikes from continuously measuring distances between smart terrains
L89 🔴 global_write
Global write: under_attack
Impact: low
Show code
under_attack = {} -- when a smart is under attack, halt squad assignment from that smart until the threat has passed or the point has changed hands
L91 🔴 global_write
Global write: patrol_squads
Impact: low
Show code
patrol_squads = {}
L92 🔴 global_write
Global write: random_patrols
Impact: low
Show code
random_patrols = {}
L93 🔴 global_write
Global write: invasions
Impact: low
Show code
invasions = {}
L95 🔴 global_write
Global write: waiting_for_capture
Impact: low
Show code
waiting_for_capture = {}
L98 🔴 global_write
Global write: max_resource_count
Impact: low
Show code
max_resource_count = {
L117 🔴 global_write
Global write: invasion_defense_timers
Impact: low
Show code
invasion_defense_timers = {}
L118 🔴 global_write
Global write: invasion_defense_next_update
Impact: low
Show code
invasion_defense_next_update = {}
L121 🔴 global_write
Global write: reinforcements_requested
Impact: low
Show code
reinforcements_requested = {} -- bases will only request reinforcements once per incoming attack to ease computational load
L123 🔴 global_write
Global write: actor_informed
Impact: low
Show code
actor_informed = {} -- Players on the same level of an allied defending point will be notified one time about the attack
L130 🔴 global_write
Global write: control_hold
Impact: low
Show code
control_hold = {}
L132 🔴 global_write
Global write: send_to_territory
Impact: low
Show code
send_to_territory = {
L148 🔴 global_write
Global write: pda_icons
Impact: low
Show code
pda_icons = {
L277 🔴 global_write
Global write: monster_level_capacity
Impact: low
Show code
monster_level_capacity = {
L515 🔴 global_write
Global write: manual_point
Impact: low
Show code
manual_point = nil
L647 🔴 global_write
Global write: manual_point
Impact: low
Show code
manual_point = { smart.id, game.get_game_time(), closest_base, targeting_squad, 1 }
L655 🔴 global_write
Global write: manual_point
Impact: low
Show code
manual_point = nil -- actor has attempted a manual capture beyond the capture distance - kill the attempt
L806 🔴 global_write
Global write: manual_point
Impact: low
Show code
manual_point = nil
L822 🔴 global_write
Global write: manual_point
Impact: low
Show code
manual_point = { smart.id, game.get_game_time(), }
L833 🔴 global_write
Global write: manual_point
Impact: low
Show code
manual_point = nil
L843 🔴 global_write
Global write: manual_point
Impact: low
Show code
manual_point = nil
L860 🔴 global_write
Global write: manual_point
Impact: low
Show code
manual_point = nil
L1231 🔴 global_write
Global write: other
Impact: low
Show code
other = base_id and alife_object(base_id)
L4567 🔴 global_write
Global write: owner
Impact: low
Show code
owner = "none"
L5491 🔴 global_write
Global write: waiting_for_capture
Impact: low
Show code
waiting_for_capture = m_data.wfcTable
L5493 🔴 global_write
Global write: waiting_for_capture
Impact: low
Show code
waiting_for_capture = {}
L5495 🔴 global_write
Global write: wfc_Table_size
Impact: low
Show code
wfc_Table_size = 0
L5497 🔴 global_write
Global write: wfc_Table_size
Impact: low
Show code
wfc_Table_size = wfc_Table_size + 1
L544 🟡 potential_nil_access
Potential nil access: 'obj_pda' from :active_item() used without nil check
Impact: low
Show code
if (obj_pda and sfind(obj_pda:section(),"device_pda") and obj_pda:condition() >= obj_pda:power_critical()) then
L544 🟡 potential_nil_access
Potential nil access: 'obj_pda' from :active_item() used without nil check
Impact: low
Show code
if (obj_pda and sfind(obj_pda:section(),"device_pda") and obj_pda:condition() >= obj_pda:power_critical()) then
L544 🟡 potential_nil_access
Potential nil access: 'obj_pda' from :active_item() used without nil check
Impact: low
Show code
if (obj_pda and sfind(obj_pda:section(),"device_pda") and obj_pda:condition() >= obj_pda:power_critical()) then
L2237 🟡 potential_nil_access
Potential nil access: 'sender' from db.actor() used without nil check
Impact: low
Show code
local sender_header = strformat("%s, %s", sender:character_name(), game.translate_string("st_dyn_news_comm_" .. warfare.actor_faction .. "_" .. 6))
L2241 🟡 potential_nil_access
Potential nil access: 'sender' from db.actor() used without nil check
Impact: low
Show code
dynamic_news_helper.send_tip( msg, sender_header, 0, 10, sender:character_icon(), "beep_1", "npc" )
L318 🟡 unused_local_variable
Local variable 'clr_c' is assigned but never used
Impact: low
Show code
local clr_c = utils_xml.get_color("d_cyan")
L1186 🟡 unused_local_variable
Local variable 'enemyCount' is assigned but never used
Impact: low
Show code
local enemyCount,enemyPower = squad_count_defending(other, other.owning_faction)
L2448 🟡 unused_local_variable
Local variable 'regional_resources' is assigned but never used
Impact: low
Show code
local regional_resources = warfare_levels.level_information[levelID] and warfare_levels.level_information[levelID].faction_stats and warfare_levels.level_information[levelID].faction_stats[smart.owning_faction] and warfare_levels.level_information[levelID].faction_stats[smart.owning_faction].linked_resource_count or 0
L2449 🟡 unused_local_variable
Local variable 'local_resources' is assigned but never used
Impact: low
Show code
local local_resources = warfare_levels.level_information[levelID] and warfare_levels.level_information[levelID].faction_stats and warfare_levels.level_information[levelID].faction_stats[smart.owning_faction] and warfare_levels.level_information[levelID].faction_stats[smart.owning_faction].resource_count or 0
L2662 🟡 unused_local_variable
Local variable 'found_target' is assigned but never used
Impact: low
Show code
local found_target = false
L3542 🟡 unused_local_variable
Local variable 'new_squad' is assigned but never used
Impact: low
Show code
local new_squad = utils_obj.create_squad(section, smart:name()) -- create identical section
L3668 🟡 unused_local_variable
Local variable 'num_targeting' is assigned but never used
Impact: low
Show code
local num_targeting = squad_count_targeting(target, "monster")
L3722 🟡 unused_local_variable
Local variable 'c' is assigned but never used
Impact: low
Show code
local c = 0
L3727 🟡 unused_local_variable
Local variable 'friends' is assigned but never used
Impact: low
Show code
local friends = is_factions_friends(warfare.actor_faction, faction)
L3730 🟡 unused_local_variable
Local variable 'actor_level' is assigned but never used
Impact: low
Show code
local actor_level
L4195 🟡 unused_local_variable
Local variable 'owning_faction_ru' is assigned but never used
Impact: low
Show code
local owning_faction_ru = warfare_names.faction_names[smart.owning_faction]
L4616 🟡 unused_local_variable
Local variable 'smrt_name' is assigned but never used
Impact: low
Show code
local smrt_name = game.translate_string("st_" .. smart:name() .. "_name")
L4729 🟡 unused_local_variable
Local variable 'base_weight' is assigned but never used
Impact: low
Show code
local base_weight = 0.75
L4730 🟡 unused_local_variable
Local variable 'resource_weight' is assigned but never used
Impact: low
Show code
local resource_weight = 1
L4731 🟡 unused_local_variable
Local variable 'territory_weight' is assigned but never used
Impact: low
Show code
local territory_weight = 1.5
L4732 🟡 unused_local_variable
Local variable 'lair_weight' is assigned but never used
Impact: low
Show code
local lair_weight = 1.5
L4785 🟡 unused_local_variable
Local variable 'smart_level' is assigned but never used
Impact: low
Show code
local smart_level = smart and game_graph():vertex(smart.m_game_vertex_id):level_id()
L5408 🟡 unused_local_variable
Local variable 'location' is assigned but never used
Impact: low
Show code
local location = nil
L5409 🟡 unused_local_variable
Local variable 'spawnTrader' is assigned but never used
Impact: low
Show code
local spawnTrader = false
L5410 🟡 unused_local_variable
Local variable 'spawnMechanic' is assigned but never used
Impact: low
Show code
local spawnMechanic = false
L5411 🟡 unused_local_variable
Local variable 'spawnMedic' is assigned but never used
Impact: low
Show code
local spawnMedic = false
L5412 🟡 unused_local_variable
Local variable 'spawnBarman' is assigned but never used
Impact: low
Show code
local spawnBarman = false

warfare.script

L361 🟢 table_insert_append
table.insert(warfare_levels.level_information[smart.level_id].smarts, v) -> warfare_levels.level_information[smart.level_id].smarts[#warfare_levels.level_information[smart.level_id].smarts+1] = v
Impact: high
Show code
table.insert(warfare_levels.level_information[smart.level_id].smarts, smart.id)
L753 🟢 table_insert_append
table.insert(start_pos, v) -> start_pos[#start_pos+1] = v
Impact: high
Show code
table.insert(start_pos, base.m_level_vertex_id)
L754 🟢 table_insert_append
table.insert(start_pos, v) -> start_pos[#start_pos+1] = v
Impact: high
Show code
table.insert(start_pos, base.m_game_vertex_id)
L755 🟢 table_insert_append
table.insert(start_pos, v) -> start_pos[#start_pos+1] = v
Impact: high
Show code
table.insert(start_pos, base.position)
L116 🟢 uncached_globals_summary
Cache 1 globals in save_state
Impact: medium
Show code
L153: pairs L167: pairs
L188 🟢 uncached_globals_summary
Cache 1 globals in load_state
Impact: medium
Show code
L228: pairs L229: pairs
L313 🟢 uncached_globals_summary
Cache 1 globals in actor_on_update
Impact: medium
Show code
L335: pairs L336: pairs
L525 🟢 uncached_globals_summary
Cache 2 globals in fill_start_position
Impact: medium
Show code
L583: math.random L622: math.random L639: string.find L660: string.find
L729 🟢 uncached_globals_summary
Cache 2 globals in initialize_random_starting_locations
Impact: medium
Show code
L733: pairs L778: pairs L749: math.random L771: math.random
L1017 🟢 uncached_globals_summary
Cache 1 globals in is_warfare_trader
Impact: medium
Show code
L1018: string.find L1019: string.find
L1028 🟢 uncached_globals_summary
Cache 1 globals in get_squad_section_faction
Impact: medium
Show code
L1029: string.find L1031: string.find
L1060 🟢 uncached_globals_summary
Cache 1 globals in is_squad_section_enemy_of_faction
Impact: medium
Show code
L1064: string.find L1066: string.find
L329 🟢 repeated_alife
alife called 2x in actor_on_update
Impact: low
Show code
local sim = alife()
L75 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0)
L94 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1)
L117 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, "save_state")
L183 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, "save_state")
L189 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, "load_state")
L192 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1)
L200 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(2)
L226 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(3)
L240 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(4)
L252 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(5)
L260 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(6)
L268 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(7)
L273 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, "load_state")
L280 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, squad:name())
L302 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1)
L314 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, "actor_on_update")
L404 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1, "actor_on_update")
L408 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(2, "actor_on_update")
L465 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(3, "actor_on_update")
L506 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd("stalker_pop_factor = %s", value)
L520 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd("monster_pop_factor = %s, smr %s", value, smr_amain_mcm and "true" or "false")
L526 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0)
L684 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1)
L730 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0)
L751 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1)
L763 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(2)
L769 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(3, actor_faction)
L777 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(5)
L817 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(6)
L894 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(1)
L946 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, "on_game_start")
L959 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(2, "on_game_start")
L53 🔴 global_write
Global write: warfare_debug
Impact: low
Show code
warfare_debug = true
L55 🔴 global_write
Global write: actor_faction
Impact: low
Show code
actor_faction = nil
L56 🔴 global_write
Global write: actor_influence_points
Impact: low
Show code
actor_influence_points = 0
L57 🔴 global_write
Global write: influence_levels
Impact: low
Show code
influence_levels = {} -- influence_levels[smart_terrain_id] = influence_level if > 0 or nil
L59 🔴 global_write
Global write: base_count
Impact: low
Show code
base_count = 0
L60 🔴 global_write
Global write: resource_count
Impact: low
Show code
resource_count = 0
L61 🔴 global_write
Global write: level_count
Impact: low
Show code
level_count = 32
L62 🔴 global_write
Global write: initialized
Impact: low
Show code
initialized = false
L65 🔴 global_write
Global write: all_out_war_applied
Impact: low
Show code
all_out_war_applied = false
L68 🔴 global_write
Global write: need_all_out_war_applied
Impact: low
Show code
need_all_out_war_applied = true
L69 🔴 global_write
Global write: dynamic_relations_installed
Impact: low
Show code
dynamic_relations_installed = false
L72 🔴 global_write
Global write: ignore
Impact: low
Show code
ignore = {}
L98 🔴 global_write
Global write: registered_squads
Impact: low
Show code
registered_squads = {
L186 🔴 global_write
Global write: loaded_squads
Impact: low
Show code
loaded_squads = false
L194 🔴 global_write
Global write: actor_influence_points
Impact: low
Show code
actor_influence_points = m_data.warfare and m_data.warfare.actor_influence_points or 0
L195 🔴 global_write
Global write: influence_levels
Impact: low
Show code
influence_levels = m_data.warfare and m_data.warfare.influence_levels or {}
L196 🔴 global_write
Global write: all_out_war_applied
Impact: low
Show code
all_out_war_applied = m_data.warfare and m_data.warfare.all_out_war_applied or false
L224 🔴 global_write
Global write: new_surge
Impact: low
Show code
new_surge = m_data.warfare and m_data.warfare.new_surge or true
L248 🔴 global_write
Global write: loaded_squads
Impact: low
Show code
loaded_squads = true
L329 🔴 global_write
Global write: actor_faction
Impact: low
Show code
actor_faction = get_actor_true_community() or alife():actor():community():sub(7)
L368 🔴 global_write
Global write: base_count
Impact: low
Show code
base_count = base_count + 1
L375 🔴 global_write
Global write: resource_count
Impact: low
Show code
resource_count = resource_count + smart.props.resource
L412 🔴 global_write
Global write: actor_faction
Impact: low
Show code
actor_faction = get_actor_true_community() or alife():actor():community():sub(7)
L419 🔴 global_write
Global write: dynamic_relations_installed
Impact: low
Show code
dynamic_relations_installed = true
L425 🔴 global_write
Global write: all_out_war_applied
Impact: low
Show code
all_out_war_applied = true
L472 🔴 global_write
Global write: initialized
Impact: low
Show code
initialized = true
L481 🔴 global_write
Global write: warfare_positions_filled
Impact: low
Show code
warfare_positions_filled = false
L563 🔴 global_write
Global write: ignore
Impact: low
Show code
ignore = sim_offline_combat.get_ignore_list()
L661 🔴 global_write
Global write: squad
Impact: low
Show code
squad = SIMBOARD:create_squad(smart,squad_section) -- common squads can't go over user-set cap
L666 🔴 global_write
Global write: squad
Impact: low
Show code
squad = SIMBOARD:create_squad(smart,squad_section) -- always make story squads
L752 🔴 global_write
Global write: start_pos
Impact: low
Show code
start_pos = {}
L761 🔴 global_write
Global write: actor_faction
Impact: low
Show code
actor_faction = alife():actor():community():sub(7)
L962 🔴 global_write
Global write: ignore
Impact: low
Show code
ignore = sim_offline_combat.get_ignore_list()
L970 🔴 global_write
Global write: info
Impact: low
Show code
info = debug.getinfo(2, "nS")
L567 🟡 unused_local_variable
Local variable 'max_active' is assigned but never used
Impact: low
Show code
local max_active = warfare_options.options.monster_max_squads_per_level

warfare_factions.script

L85 🟢 uncached_globals_summary
Cache 2 globals in update_faction
Impact: medium
Show code
L99: math.random L100: math.random L153: pairs L193: pairs
L120 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(0, faction or "nil faction")
L311 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Resurgence of %s is underway, targeting %s with %s squads", faction, target:name(), target_pop)
L340 🔵 debug_statement
Debug call: printd()
Impact: medium
Show code
printd(9, "true end")
L17 🔴 global_write
Global write: printd
Impact: low
Show code
printd = warfare.printd
L19 🔴 global_write
Global write: factions_p
Impact: low
Show code
factions_p = {}
L20 🔴 global_write
Global write: factions
Impact: low
Show code
factions = {
L37 🔴 global_write
Global write: all_factions
Impact: low
Show code
all_factions = {
L54 🔴 global_write
Global write: faction_information
Impact: low
Show code
faction_information = {}
L55 🔴 global_write
Global write: faction_timers
Impact: low
Show code
faction_timers = {}

warfare_imgui.script

L13 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("script _imgui_groups.script not loaded, disabling warfare_imgui.script")
L17 🔴 global_write
Global write: squads_window_visible
Impact: low
Show code
squads_window_visible = false
L18 🔴 global_write
Global write: smarts_window_visible
Impact: low
Show code
smarts_window_visible = false
L19 🔴 global_write
Global write: auto_capture_window_visible
Impact: low
Show code
auto_capture_window_visible = false
L20 🔴 global_write
Global write: smart_info_window_visible
Impact: low
Show code
smart_info_window_visible = false
L26 🔴 global_write
Global write: squads_window_visible
Impact: low
Show code
_, squads_window_visible = ImGui.MenuItem(SQUADS_MENU_ITEM, nil, squads_window_visible, true)
L27 🔴 global_write
Global write: smarts_window_visible
Impact: low
Show code
_, smarts_window_visible = ImGui.MenuItem(SMARTS_MENU_ITEM, nil, smarts_window_visible, true)
L28 🔴 global_write
Global write: auto_capture_window_visible
Impact: low
Show code
_, auto_capture_window_visible = ImGui.MenuItem(AUTO_CAPTURE_MENU_ITEM, nil, auto_capture_window_visible, true)
L29 🔴 global_write
Global write: smart_info_window_visible
Impact: low
Show code
_, smart_info_window_visible = ImGui.MenuItem(SMART_INFO_MENU_ITEM, nil, smart_info_window_visible, true)
L56 🔴 global_write
Global write: squads_window_visible
Impact: low
Show code
squads_window_visible = visible
L66 🔴 global_write
Global write: smarts_window_visible
Impact: low
Show code
smarts_window_visible = visible
L76 🔴 global_write
Global write: auto_capture_window_visible
Impact: low
Show code
auto_capture_window_visible = visible
L86 🔴 global_write
Global write: smart_info_window_visible
Impact: low
Show code
smart_info_window_visible = visible

warfare_imgui_auto_capture.script

L132 🟢 table_insert_append
table.insert(reasons, v) -> reasons[#reasons+1] = v
Impact: high
Show code
table.insert(reasons, "Faction cannot capture (Loner/Ecologist)")
L137 🟢 table_insert_append
table.insert(reasons, v) -> reasons[#reasons+1] = v
Impact: high
Show code
table.insert(reasons, "No faction bases available")
L142 🟢 table_insert_append
table.insert(reasons, v) -> reasons[#reasons+1] = v
Impact: high
Show code
table.insert(reasons, "Surge in progress")
L147 🟢 table_insert_append
table.insert(reasons, v) -> reasons[#reasons+1] = v
Impact: high
Show code
table.insert(reasons, "Night time (auto capture disabled)")
L152 🟢 table_insert_append
table.insert(reasons, v) -> reasons[#reasons+1] = v
Impact: high
Show code
table.insert(reasons, "No active PDA")
L157 🟢 table_insert_append
table.insert(reasons, v) -> reasons[#reasons+1] = v
Impact: high
Show code
table.insert(reasons, "Auto capture disabled in options")
L58 🟢 uncached_globals_summary
Cache 2 globals in render
Impact: medium
Show code
L69: tostring L70: tostring L85: string.format L115: string.format
L53 🟡 potential_nil_access
Potential nil access: 'obj_pda' from :active_item() used without nil check (auto-fixable)
Impact: low
Show code
status.has_active_pda = obj_pda and string.find(obj_pda:section(),"device_pda") and obj_pda:condition() >= obj_pda:power_critical()
L53 🟡 potential_nil_access
Potential nil access: 'obj_pda' from :active_item() used without nil check (auto-fixable)
Impact: low
Show code
status.has_active_pda = obj_pda and string.find(obj_pda:section(),"device_pda") and obj_pda:condition() >= obj_pda:power_critical()
L53 🟡 potential_nil_access
Potential nil access: 'obj_pda' from :active_item() used without nil check (auto-fixable)
Impact: low
Show code
status.has_active_pda = obj_pda and string.find(obj_pda:section(),"device_pda") and obj_pda:condition() >= obj_pda:power_critical()

warfare_imgui_smart_info.script

L9 🟢 table_insert_append
table.insert(types, v) -> types[#types+1] = v
Impact: high
Show code
table.insert(types, "Base")
L12 🟢 table_insert_append
table.insert(types, v) -> types[#types+1] = v
Impact: high
Show code
table.insert(types, "Resource")
L15 🟢 table_insert_append
table.insert(types, v) -> types[#types+1] = v
Impact: high
Show code
table.insert(types, "Territory")
L18 🟢 table_insert_append
table.insert(types, v) -> types[#types+1] = v
Impact: high
Show code
table.insert(types, "Lair")
L102 🟢 table_insert_append
table.insert(targets, v) -> targets[#targets+1] = v
Impact: high
Show code
table.insert(targets, otherWarfare)
L525 🟢 table_insert_append
table.insert(block_reasons, v) -> block_reasons[#block_reasons+1] = v
Impact: high
Show code
table.insert(block_reasons, "Resource location: Day time (spawn blocked until night)")
L527 🟢 table_insert_append
table.insert(block_reasons, v) -> block_reasons[#block_reasons+1] = v
Impact: high
Show code
table.insert(block_reasons, "Resource location: Night time (spawn allowed)")
L530 🟢 table_insert_append
table.insert(block_reasons, v) -> block_reasons[#block_reasons+1] = v
Impact: high
Show code
table.insert(block_reasons, "Time restriction: None (spawns anytime)")
L536 🟢 table_insert_append
table.insert(block_reasons, v) -> block_reasons[#block_reasons+1] = v
Impact: high
Show code
table.insert(block_reasons, "Actor too close (" .. string.format("%.0f", smart.dist_to_actor) .. " < " .. tostring(smart.respawn_radius) .. ")")
L538 🟢 table_insert_append
table.insert(block_reasons, v) -> block_reasons[#block_reasons+1] = v
Impact: high
Show code
table.insert(block_reasons, "Actor distance OK (" .. string.format("%.0f", smart.dist_to_actor) .. " >= " .. tostring(smart.respawn_radius) .. ")")
L541 🟢 table_insert_append
table.insert(block_reasons, v) -> block_reasons[#block_reasons+1] = v
Impact: high
Show code
table.insert(block_reasons, "Actor not on same level")
L560 🟢 table_insert_append
table.insert(mutant_squads, v) -> mutant_squads[#mutant_squads+1] = v
Impact: high
Show code
table.insert(mutant_squads, squad:section_name())
L630 🟢 table_insert_append
table.insert(mutant_behavior, v) -> mutant_behavior[#mutant_behavior+1] = v
Impact: high
Show code
table.insert(mutant_behavior, {
L637 🟢 table_insert_append
table.insert(mutant_behavior, v) -> mutant_behavior[#mutant_behavior+1] = v
Impact: high
Show code
table.insert(mutant_behavior, {
L644 🟢 table_insert_append
table.insert(mutant_behavior, v) -> mutant_behavior[#mutant_behavior+1] = v
Impact: high
Show code
table.insert(mutant_behavior, {
L25 🟢 uncached_globals_summary
Cache 2 globals in format_time_remaining
Impact: medium
Show code
L31: string.format L37: string.format L31: math.floor L34: math.floor
L152 🟢 uncached_globals_summary
Cache 1 globals in get_unique_squad_info
Impact: medium
Show code
L201: string.find L201: string.find
L232 🟢 uncached_globals_summary
Cache 1 globals in render_faction_smart_info
Impact: medium
Show code
L243: tostring L244: tostring
L411 🟢 uncached_globals_summary
Cache 3 globals in render_mutant_smart_info
Impact: medium
Show code
L468: string.format L502: string.format L500: tostring L501: tostring L544: ipairs L566: ipairs
L701 🟢 uncached_globals_summary
Cache 2 globals in render
Impact: medium
Show code
L734: tostring L755: tostring L884: string.format L885: string.format
L666 🟡 string_concat_in_loop
String concat in loop: status_text = status_text .. x
Impact: critical
Show code
status_text = status_text .. " (" .. tostring(behavior.wait_time) .. "m wait"
L878 🟡 string_concat_in_loop
String concat in loop: squad_factions_str = squad_factions_str .. x
Impact: critical
Show code
squad_factions_str = squad_factions_str .. ", "
L2 🔴 global_write
Global write: selected_smart_id
Impact: low
Show code
selected_smart_id = nil

warfare_imgui_smarts.script

L5 🟢 table_insert_append
table.insert(types, v) -> types[#types+1] = v
Impact: high
Show code
table.insert(types, "st_wrfr_prop_base")
L8 🟢 table_insert_append
table.insert(types, v) -> types[#types+1] = v
Impact: high
Show code
table.insert(types, "st_wrfr_prop_resource")
L11 🟢 table_insert_append
table.insert(types, v) -> types[#types+1] = v
Impact: high
Show code
table.insert(types, "st_wrfr_prop_territory")
L14 🟢 table_insert_append
table.insert(types, v) -> types[#types+1] = v
Impact: high
Show code
table.insert(types, "st_wrfr_prop_lair")
L84 🟢 table_insert_append
table.insert(targets, v) -> targets[#targets+1] = v
Impact: high
Show code
table.insert(targets, otherWarfare)
L256 🟢 table_insert_append
table.insert(smarts, v) -> smarts[#smarts+1] = v
Impact: high
Show code
table.insert(smarts, smart)
L292 🟡 string_concat_in_loop
String concat in loop: header_text = header_text .. x
Impact: critical
Show code
header_text = header_text .. (sort_ascending and " ^" or " v")

warfare_imgui_squads.script

L139 🟢 table_insert_append
table.insert(squads, v) -> squads[#squads+1] = v
Impact: high
Show code
table.insert(squads, squad)
L174 🟡 string_concat_in_loop
String concat in loop: header_text = header_text .. x
Impact: critical
Show code
header_text = header_text .. (sort_ascending and " ^" or " v")

xr_logic.script

L771 🟢 table_insert_append
table.insert(lst[n][index], v) -> lst[n][index][#lst[n][index]+1] = v
Impact: high
Show code
table.insert(lst[n][index],{infop,1,(string.find(infop,"npcx_"))})
L773 🟢 table_insert_append
table.insert(lst[n][index], v) -> lst[n][index][#lst[n][index]+1] = v
Impact: high
Show code
table.insert(lst[n][index],{infop,2,(string.find(infop,"npcx_"))})
L786 🟢 table_insert_append
table.insert(t, v) -> t[#t+1] = v
Impact: high
Show code
table.insert(t,tonumber(p) or p)
L788 🟢 table_insert_append
table.insert(lst[n][index], v) -> lst[n][index][#lst[n][index]+1] = v
Impact: high
Show code
table.insert(lst[n][index],{infop,sign == sign_equ and 3 or 4,t})
L793 🟢 table_insert_append
table.insert(lst[n][index], v) -> lst[n][index][#lst[n][index]+1] = v
Impact: high
Show code
table.insert(lst[n][index],{infop,sign == sign_equ and 3 or 4})
L796 🟢 table_insert_append
table.insert(lst[n][index], v) -> lst[n][index][#lst[n][index]+1] = v
Impact: high
Show code
table.insert(lst[n][index],{infop,5,tonumber(infop)})
L729 🟢 string_len
string.len(infop_name) -> #infop_name
Impact: low
Show code
if at < string.len(infop_name) - 1 then
L710 🟢 uncached_globals_summary
Cache 1 globals in parse_infop
Impact: medium
Show code
L718: string.sub L719: string.sub
L765 🟢 uncached_globals_summary
Cache 1 globals in extract_conditions
Impact: medium
Show code
L771: string.find L773: string.find
L804 🟢 uncached_globals_summary
Cache 1 globals in parse_condlist
Impact: medium
Show code
L827: string.sub L827: string.sub
L1059 🟢 uncached_globals_summary
Cache 1 globals in pstor_save_all
Impact: medium
Show code
L1075: pairs L1081: pairs
L155 🟢 repeated_npc_id()
npc:id() called 4x in determine_section_to_activate
Impact: low
Show code
Cache npc:id() result
L1314 🟢 repeated_npc_id()
npc:id() called 6x in set_new_scheme_and_logic
Impact: low
Show code
Cache npc:id() result
L110 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: object '%s' actual_ini=%s actual_ini_filename=%s %s=%s", npc:name(),actual_ini ~= nil,actual_ini_filename,section_logic,actual_ini and actual_ini:section_exist(section_logic))
L171 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("object '%s': section '%s': section 'active' has no conditionless else clause",npc:name(), section_logic)
L199 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("activate_by_section: INI is nil! npc=%s section=%s",npc and npc:name(),section)
L205 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: xr_logic: activate_by_section: loading field is nil, true or false expected")
L231 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: xr_logic: activate_by_section: section is NIL and NPC not in gulag.")
L245 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("object '%s': activate_by_section: section '%s' does not exist", npc:name(), section)
L250 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("object '%s': unable to determine scheme name from section name '%s'", npc:name(), section)
L254 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: %s trying to use a scheme not intended for stype scheme=%s stype=%s",npc:name(),scheme,db.storage[npc_id].stype)
L269 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: xr_logic: scheme '%s' is not registered in modules.script", scheme)
L273 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: xr_logic: can't call %s.set_scheme() - a nil value", filename)
L313 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: no scheme found in schemes table or scheme has no add_to_binder function! scheme = %s",scheme)
L338 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: subscribe_action_for_events storage is nil!")
L454 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("pick_section_from_condlist xr_conditions fail! obj=%s functor=%s",npc and npc:name(),infop[1])
L461 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("pick_section_from_condlist xr_conditions fail! obj=%s functor=%s",npc and npc:name(),infop[1])
L517 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("pick_section_from_condlist xr_effects fail! obj=%s functor=%s",npc and npc:name(),infop[1])
L520 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!!! Attempting to pick section on nonexistent object, npc, or infoportion !!!")
L640 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("WARNING: object '%s': try_switch_to_another_section: unknown condition '%s' encountered",npc:name(), c.name)
L653 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("npc '%s': st.section is nil, active section is '%s'",npc:name(), utils_data.to_str(db.storage[npc:id()].active_section))
L727 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf( "wrong condlist" )
L808 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR!! xr_logic.parse_condlist npc=%s section=%s field=%s src=%s",npc and npc:name(),section,field,src)
L934 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("object '%s': section '%s': field '%s': there is no object with story_id '%s'",npc:name(), section, field, t.v1)
L1045 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("mob_capture: reset_actions parameter's value is not specified")
L1095 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("xr_logic: pstor_save_all: not registered type '%s' encountered", tv)
L1147 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("xr_logic: pstor_load_all: not registered type '%s' encountered %s", tn,obj:name())
L1175 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("save_obj WARNING: db.storage is nil! %s",obj:name())
L1260 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("1:get_customdata_or_ini_file %s file %s doesn't exist!",npc:name(),link_filename)
L1278 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("2:get_customdata_or_ini_file %s file %s doesn't exist!",npc:name(),filename)
L1311 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("set_new_scheme_and_logic npc is nil!")
L1323 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: set_new_scheme_and_logic: cannot find ini %s",ini_filename)
L50 🔴 global_write
Global write: result
Impact: low
Show code
result, id, value = st.ini:r_line(spawn_items_section,i,"","")
L775 🔴 global_write
Global write: a
Impact: low
Show code
a = string.find(infop,"(",1,true)
L777 🔴 global_write
Global write: b
Impact: low
Show code
b = string.find(infop,")",1,true)
L420 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
if not (actor:has_info(infop[1])) then
L425 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
if not (sim:has_info(0,infop[1])) then
L441 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
if (actor:has_info(infop[1])) then
L446 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
if (sim:has_info(0,infop[1])) then
L488 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
if not (actor:has_info(infop[1])) then
L489 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:give_info_portion(infop[1])
L492 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
if not (sim:has_info(0,infop[1])) then
L493 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
sim:give_info(0,infop[1])
L506 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
if (actor:has_info(infop[1])) then
L507 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
actor:disable_info_portion(infop[1])
L510 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
if (sim:has_info(0,infop[1])) then
L511 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
sim:disable_info(0,infop[1])
L939 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(id)
L1255 🟡 potential_nil_access
Potential nil access: 'ini' from :spawn_ini() used without nil check
Impact: low
Show code
local link_filename = ini:r_string_ex("logic","cfg")

z_global_position.script

L7 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("!!! %s on level has invalid offset !!! %s", object_or_position, level_id)

z_guards_spawner.script

L55 🟢 table_insert_append
table.insert(guards_spawner.guarded_smarts[smart_name], v) -> guards_spawner.guarded_smarts[smart_name][#guards_spawner.guarded_smarts[smart_name]+1] = v
Impact: high
Show code
table.insert(guards_spawner.guarded_smarts[smart_name], squad.id)
L11 🟡 unused_local_variable
Local variable 'old_guards_spawner_spawn_guard' is assigned but never used
Impact: low
Show code
local old_guards_spawner_spawn_guard = guards_spawner.spawn_guard

z_sim_squad_scripted.script

L1 🟢 uncached_globals_summary
Cache 2 globals in sim_squad_scripted.sim_squad_scripted.get_random_spawn_count
Impact: medium
Show code
L4: tonumber L5: tonumber L23: string.find L23: string.find
L33 🟡 unused_local_variable
Local variable 'old_sim_squad_scripted_create_npc' is assigned but never used
Impact: low
Show code
local old_sim_squad_scripted_create_npc = sim_squad_scripted.sim_squad_scripted.create_npc

z_ui_mm_faction_select_mcm.script

L1 🟡 unused_local_variable
Local variable 'old_UINewGame_OnCheckSetStory' is assigned but never used
Impact: low
Show code
local old_UINewGame_OnCheckSetStory = ui_mm_faction_select.UINewGame.OnCheckSetStory
L16 🟡 unused_local_variable
Local variable 'old_UINewGame_OnCheckSetWarfare' is assigned but never used
Impact: low
Show code
local old_UINewGame_OnCheckSetWarfare = ui_mm_faction_select.UINewGame.OnCheckSetWarfare

Warfare Patch

4 files (🟢18 🟡25 🔴7 🔵11)

faction_expansions.script

L159 🟢 uncached_globals_summary
Cache 1 globals in get_section
Impact: medium
Show code
L160: math.random L174: math.random
L19 🔴 global_write
Global write: faction
Impact: low
Show code
faction = {}
L20 🔴 global_write
Global write: level
Impact: low
Show code
level = {}
L21 🔴 global_write
Global write: mutant
Impact: low
Show code
mutant = {}
L22 🔴 global_write
Global write: mutant_tier_by_clsid
Impact: low
Show code
mutant_tier_by_clsid = {
L266 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_fact:r_line_ex("mutant_tier",i,"","")

sim_squad_scripted.script

L629 🟢 uncached_globals_summary
Cache 3 globals in create_npc
Impact: medium
Show code
L643: tonumber L645: tonumber L721: string.find L721: string.find L733: math.random L733: math.random
L936 🟢 uncached_globals_summary
Cache 1 globals in STATE_Write
Impact: medium
Show code
L946: tostring L947: tostring
L960 🟢 uncached_globals_summary
Cache 1 globals in STATE_Read
Impact: medium
Show code
L976: tonumber L982: tonumber
L604 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: npc section %s does not exist!",spawn_section)
L610 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("INCORRECT npc_spawn_section USED [%s]. You cannot use npc with custom_data in squads", spawn_section)
L686 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('spawn smart: %s', spawn_smart)
L722 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Spawning trader/mechanic/medic/barman, squad size changed to 1")
L745 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("You are trying to spawn an empty squad [%s]!!!", settings_id)
L871 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("squad community is 'nil' for player_id [%s]", self.player_id)
L12 🔴 global_write
Global write: dbg_map_hud
Impact: low
Show code
dbg_map_hud = false
L228 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_actor = sim:actor()
L239 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local cur_lvl = sim:level_name(game_graph():vertex(self.m_game_vertex_id):level_id())
L427 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(id)
L499 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local obj = sim:object(member_id)
L619 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local actor = sim:actor()
L620 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
if (simulation_objects.is_on_the_same_level(obj, actor) and spawn_position:distance_to_sqr(actor.position) <= sim:switch_distance()^2) then
L860 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(k.id)
L861 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if se_obj and se_obj:has_detector() then
L1226 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_actor = sim:actor()
L21 🟡 unused_local_variable
Local variable 'a' is assigned but never used
Impact: low
Show code
local a,key,val = locations_ini:r_line_ex(section,0,"","")
L21 🟡 unused_local_variable
Local variable 'val' is assigned but never used
Impact: low
Show code
local a,key,val = locations_ini:r_line_ex(section,0,"","")
L173 🟡 unused_local_variable
Local variable 'itm' is assigned but never used
Impact: low
Show code
local itm = alife_create_item(vv, alife_object(k.id))
L812 🟡 unused_local_variable
Local variable 'planner' is assigned but never used
Impact: low
Show code
local planner = npc:motivation_action_manager()
L1398 🟡 unused_local_variable
Local variable 'smarts_by_no_assault_zones' is assigned but never used
Impact: low
Show code
local smarts_by_no_assault_zones = {

ui_mm_faction_select.script

L203 🟢 table_insert_append
table.insert(start_pos, v) -> start_pos[#start_pos+1] = v
Impact: high
Show code
table.insert(start_pos,ini_map:r_float_ex(start_location, "lvid"))
L204 🟢 table_insert_append
table.insert(start_pos, v) -> start_pos[#start_pos+1] = v
Impact: high
Show code
table.insert(start_pos,ini_map:r_float_ex(start_location, "gvid"))
L205 🟢 table_insert_append
table.insert(start_pos, v) -> start_pos[#start_pos+1] = v
Impact: high
Show code
table.insert(start_pos,vector():set(ini_map:r_float_ex(start_location,"x"),ini_map:r_float_ex(start_location,"y"),ini_map:r_float_ex(start_location,"z")))
L1168 🟢 table_insert_append
table.insert(self.table_icon, v) -> self.table_icon[#self.table_icon+1] = v
Impact: high
Show code
table.insert(self.table_icon, def_icon)
L1175 🟢 table_insert_append
table.insert(self.table_icon, v) -> self.table_icon[#self.table_icon+1] = v
Impact: high
Show code
table.insert(self.table_icon, id)
L1189 🟢 table_insert_append
table.insert(self.table_map, v) -> self.table_map[#self.table_map+1] = v
Impact: high
Show code
table.insert(self.table_map, "random_location")
L1199 🟢 table_insert_append
table.insert(self.table_map, v) -> self.table_map[#self.table_map+1] = v
Impact: high
Show code
table.insert(self.table_map, id)
L1202 🟢 table_insert_append
table.insert(self.table_map, v) -> self.table_map[#self.table_map+1] = v
Impact: high
Show code
table.insert(self.table_map, id)
L45 🟢 uncached_globals_summary
Cache 2 globals in on_game_load
Impact: medium
Show code
L59: tostring L59: tostring L59: math.random L59: math.random
L444 🟢 uncached_globals_summary
Cache 2 globals in __init
Impact: medium
Show code
L484: tonumber L495: tonumber L485: tostring L496: tostring
L1218 🟢 uncached_globals_summary
Cache 2 globals in LoadLoadout
Impact: medium
Show code
L1224: tostring L1225: tostring L1236: tonumber L1236: tonumber
L1568 🟡 string_concat_in_loop
String concat in loop: str_stats = str_stats .. x
Impact: critical
Show code
str_stats = str_stats .. "%c[0,150,150,150]• %c[0,50,175,50]" .. game.translate_string("st_faction_" .. k) .. "\\n"
L1728 🟡 string_concat_in_loop
String concat in loop: loadout_str = loadout_str .. x
Impact: critical
Show code
loadout_str = loadout_str .. "," .. ci.section
L364 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("giving psy helmet to Monolith/Sin/Zombied actor")
L1290 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("sec: %s | points: %s | points left: %s", ci.section, points, self.points_left)
L312 🟡 unused_local_variable
Local variable 'sim' is assigned but never used
Impact: low
Show code
local sim = alife()
L400 🟡 unused_local_variable
Local variable 'as' is assigned but never used
Impact: low
Show code
local as
L1233 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, sec, value = ini_itm:r_line(self.selected_faction .. "_loadout" , i , "", "")
L1658 🟡 unused_local_variable
Local variable 'bind' is assigned but never used
Impact: low
Show code
local bind = dik_to_bind(dik)

ui_options.script

L1063 🟢 uncached_globals_summary
Cache 1 globals in curr_crosshair_clr
Impact: medium
Show code
L1068: tonumber L1070: tonumber
L1316 🟢 uncached_globals_summary
Cache 1 globals in Reset_opt
Impact: medium
Show code
L1322: unpack L1371: unpack
L2351 🟢 uncached_globals_summary
Cache 1 globals in On_Accept
Impact: medium
Show code
L2368: unpack L2370: unpack
L67 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L972 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("- Changed player name from (%s) to (%s)", curr_name, new_name)
L1159 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!Found nil option value [%s]", id)
L76 🔴 global_write
Global write: options
Impact: low
Show code
options = {}
L91 🔴 global_write
Global write: options
Impact: low
Show code
options = {
L51 🟡 unused_local_variable
Local variable 'm_ceil' is assigned but never used
Impact: low
Show code
local m_floor, m_ceil, s_find, s_gsub = math.floor, math.ceil, string.find, string.gsub
L57 🟡 unused_local_variable
Local variable 'clr_g2' is assigned but never used
Impact: low
Show code
local clr_g2 = GetARGB(255, 200, 200, 200)
L58 🟡 unused_local_variable
Local variable 'clr_w' is assigned but never used
Impact: low
Show code
local clr_w = GetARGB(255, 255, 255, 255)
L2480 🟡 unused_local_variable
Local variable 'bind' is assigned but never used
Impact: low
Show code
local bind = dik_to_bind(dik)

Weather Expansion for Atmospherics

1 file (🟢2 🟡7 🔴2 🔵0)

psi_storm_manager.script

L123 🟢 uncached_globals_summary
Cache 1 globals in new_psi_storm_time
Impact: medium
Show code
L127: math.floor L132: math.floor
L193 🟢 uncached_globals_summary
Cache 1 globals in finish
Impact: medium
Show code
L206: pairs L216: pairs
L19 🔴 global_write
Global write: PsiStormManager
Impact: low
Show code
PsiStormManager = nil
L21 🔴 global_write
Global write: PsiStormManager
Impact: low
Show code
PsiStormManager = PsiStormManager or CPsiStormManager()
L507 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
se_npc = sim:object(id)
L509 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
squad = squad_id and sim:object(squad_id)
L545 🟡 potential_nil_access
Potential nil access: 'crow' from level.object_by_id() used without nil check
Impact: low
Show code
if(crow and crow:alive() and distance_2d(pos, crow:position())<25) then
L545 🟡 potential_nil_access
Potential nil access: 'crow' from level.object_by_id() used without nil check
Impact: low
Show code
if(crow and crow:alive() and distance_2d(pos, crow:position())<25) then
L29 🟡 unused_local_variable
Local variable 'prev_game_sec' is assigned but never used
Impact: low
Show code
local prev_game_sec = -1
L31 🟡 unused_local_variable
Local variable 'diff_game_sec' is assigned but never used
Impact: low
Show code
local diff_game_sec = -1
L563 🟡 unused_local_variable
Local variable 'time' is assigned but never used
Impact: low
Show code
local time = 0

Western Goods

22 files (🟢51 🟡7 🔴17 🔵55)

modxml_western_goods.script

L29 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~[WG] WARNING | DXML | Aborting. Invalid number of results for '%s', got '%s', expected '%s'.", query, size_table(query_res), 1)

modxml_zzz_rand_text_dialog.script

L119 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~[WG] WARNING | Random Text Tag | collect_translations - strings of (%s) don't exist!", st)

trader_autoinject.script

L55 🟢 repeated_npc_id()
npc:id() called 3x in trade_manager.update
Impact: low
Show code
Cache npc:id() result
L199 🟢 repeated_item_section()
item:section() called 4x in itr_inv
Impact: low
Show code
Cache item:section() result
L28 🔴 global_write
Global write: find
Impact: low
Show code
find = string.find
L53 🔴 global_write
Global write: TraderUpdate
Impact: low
Show code
TraderUpdate = trade_manager.update

western_goods_bind_lighter.script

L83 🟢 repeated_self_object_section()
self.object:section() called 5x in __init
Impact: low
Show code
Cache self.object:section() result
L226 🟡 potential_nil_access
Potential nil access: 'parent' from :parent() used without nil check (auto-fixable)
Impact: low
Show code
return parent and parent:id() == AC_ID or false
L231 🟡 potential_nil_access
Potential nil access: 'det' from :item_in_slot() used without nil check
Impact: low
Show code
if det and det:id() == self.object:id() then
L242 🟡 potential_nil_access
Potential nil access: 'active_det' from :active_detector() used without nil check (auto-fixable)
Impact: low
Show code
return active_det and active_det:id() == self.object:id() or false

western_goods_class_fire_source.script

L47 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~[WG] WARNING | Fire Source | Light Campfire - No campfire found ! [pos: %s | lvid: %s | gvid: %s]", db.actor:position(), db.actor:level_vertex_id(), db.actor:game_vertex_id())

western_goods_core.script

L129 🟢 uncached_globals_summary
Cache 1 globals in check_missing_translations
Impact: medium
Show code
L138: pairs L144: pairs
L264 🟢 uncached_globals_summary
Cache 1 globals in check_prerequisites
Impact: medium
Show code
L266: string.format L274: string.format
L53 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[WG] Western Goods version %s", VERSION)
L163 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![WG] ERROR | Core | String '" .. str_curr .. "' found in '" .. lang_curr .. "' but not in '" .. lang_other .. "' !")
L400 🔴 global_write
Global write: western_goods_items
Impact: low
Show code
western_goods_items = {}
L406 🔴 global_write
Global write: western_goods_special_items
Impact: low
Show code
western_goods_special_items = {
L410 🔴 global_write
Global write: western_goods_squads
Impact: low
Show code
western_goods_squads = {}
L412 🔴 global_write
Global write: western_goods_npcs
Impact: low
Show code
western_goods_npcs = {}
L414 🔴 global_write
Global write: western_goods_task
Impact: low
Show code
western_goods_task = {}
L416 🔴 global_write
Global write: western_goods_info
Impact: low
Show code
western_goods_info = {}

western_goods_dialogs_manager.script

L111 🟢 table_insert_append
table.insert(DIALOGS_TABLE, v) -> DIALOGS_TABLE[#DIALOGS_TABLE+1] = v
Impact: high
Show code
table.insert(DIALOGS_TABLE, { message=message, sender=sender, icon=icon, timer=timer, sound=sfx })

western_goods_flea.script

L97 🟢 table_insert_append
table.insert(sections, v) -> sections[#sections+1] = v
Impact: high
Show code
table.insert(sections,section)
L103 🟢 table_insert_append
table.insert(new_offers, v) -> new_offers[#new_offers+1] = v
Impact: high
Show code
table.insert(new_offers,{ sections=sections, sale=sale, cost=cost })
L398 🟢 table_insert_append
table.insert(viable_sections, v) -> viable_sections[#viable_sections+1] = v
Impact: high
Show code
table.insert(viable_sections,sec_name)
L411 🟢 table_insert_append
table.insert(viable_sections, v) -> viable_sections[#viable_sections+1] = v
Impact: high
Show code
table.insert(viable_sections,sec_name)
L83 🟢 uncached_globals_summary
Cache 1 globals in generate_offers
Impact: medium
Show code
L94: math.random L95: math.random
L146 🟢 repeated_npc_id()
npc:id() called 6x in init_offers
Impact: low
Show code
Cache npc:id() result
L204 🟢 repeated_npc_id()
npc:id() called 3x in list_offers
Impact: low
Show code
Cache npc:id() result
L240 🟢 repeated_npc_id()
npc:id() called 4x in show_current_offer
Impact: low
Show code
Cache npc:id() result
L458 🟡 string_concat_in_loop
String concat in loop: items_text = items_text .. x
Impact: critical
Show code
items_text = items_text .. [[ - ]] .. ui_item.get_sec_name(sec) .. [[\n]]
L400 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![WG] ERROR | Flea Market | Section %s (module : %s) cannot be collected, as it does not exist!", sec_name, section)
L413 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![WG] ERROR | Flea Market | Section %s (from script) cannot be collected, as it does not exist!", sec_name)

western_goods_guide.script

L43 🟢 table_insert_append
table.insert(guides_data[char_id], v) -> guides_data[char_id][#guides_data[char_id]+1] = v
Impact: high
Show code
table.insert(guides_data[char_id], { location = location, price = tonumber(price) })

western_goods_helicopter.script

L223 🟢 repeated_heli_obj_id()
heli_obj:id() called 19x in heli_update
Impact: low
Show code
Cache heli_obj:id() result
L426 🟢 repeated_target_id()
target:id() called 3x in order_helicopter
Impact: low
Show code
Cache target:id() result

western_goods_mcm.script

L59 🔴 global_write
Global write: op
Impact: low
Show code
op = { id="western_goods", sh=true, gr={

western_goods_module_food.script

L34 🟢 repeated_obj_section()
obj:section() called 2x in actor_on_item_use
Impact: low
Show code
Cache obj:section() result

western_goods_monkey_patches.script

L75 🟢 table_insert_append
table.insert(valid_patches, v) -> valid_patches[#valid_patches+1] = v
Impact: high
Show code
table.insert(valid_patches, patch)
L20 🔴 global_write
Global write: monkey_patches
Impact: low
Show code
monkey_patches = {

western_goods_restrictors.script

L40 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![WG] ERROR | Fake Restrictor | in_bounds() called with no game object !")
L43 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![WG] ERROR | Fake Restrictor | in_bounds() called with no restrictor data !")

western_goods_tasks_act_1.script

L990 🟢 repeated_alife
alife called 5x in task_status_functor.act_1_task_3_status_f
Impact: low
Show code
local sim = alife()
L1451 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![WG] ERROR | Tasks Act 1 | Invalid spawn location for %s : loc:%s", const_sec, location)
L1461 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![WG] ERROR | Tasks Act 1 | Failed to create %s at loc:%s x:%s,y:%s,z:%s lvid:%s gvid:%s", const_sec, location, pos.x, pos.y, pos.z, lvid, gvid)

western_goods_tasks_act_2.script

L83 🟢 table_insert_append
table.insert(secondary_items_found, v) -> secondary_items_found[#secondary_items_found+1] = v
Impact: high
Show code
table.insert(secondary_items_found, obj)
L1259 🟢 table_insert_append
table.insert(marked_enemies, v) -> marked_enemies[#marked_enemies+1] = v
Impact: high
Show code
table.insert(marked_enemies, id)
L226 🟢 repeated_obj_section()
obj:section() called 4x in task_status_functor.act_2_task_1_status_f
Impact: low
Show code
Cache obj:section() result
L421 🟢 repeated_restrictor_id()
restrictor:id() called 4x in task_functor.act_2_task_2_target_f
Impact: low
Show code
Cache restrictor:id() result
L495 🟢 repeated_alife
alife called 11x in task_status_functor.act_2_task_2_status_f
Impact: low
Show code
local sim = alife()
L488 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![WG] ERROR | Tasks Act 2 | Failed to spawn %s smart:%s",spawn_data.sec, spawn_data.smart)
L524 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![WG] ERROR | Tasks Act 2 | Failed to spawn %s smart:%s",spawn_data.sec, spawn_data.smart)
L548 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![WG] ERROR | Tasks Act 2 | Failed to spawn %s smart:%s",spawn_data.sec, spawn_data.smart)
L567 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![WG] ERROR | Tasks Act 2 | Failed to spawn %s x:%s y:%s z:%s lvid:%s gvid:%s",spawn_data.sec, spawn_data.x, spawn_data.y, spawn_data.z, spawn_data.lvid, spawn_data.gvid)
L645 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![WG] ERROR | Tasks Act 2 | Failed to spawn %s smart:%s",spawn_data.sec, spawn_data.smart)
L683 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![WG] ERROR | Tasks Act 2 | Failed to spawn %s x:%s y:%s z:%s lvid:%s gvid:%s",spawn_data.sec, spawn_data.x, spawn_data.y, spawn_data.z, spawn_data.lvid, spawn_data.gvid)
L713 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![WG] ERROR | Tasks Act 2 | Failed to spawn %s smart:%s",spawn_data.sec, spawn_data.smart)
L786 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![WG] ERROR | Tasks Act 2 | Failed to spawn %s smart:%s",spawn_data.sec, spawn_data.smart)
L834 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![WG] ERROR | Tasks Act 2 | Failed to spawn %s smart:%s",spawn_data.sec, spawn_data.smart)
L975 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![WG] ERROR | Tasks Act 2 | Failed to spawn %s smart:%s",spawn_data.sec, spawn_data.smart)
L1017 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![WG] ERROR | Tasks Act 2 | Failed to spawn %s smart:%s",spawn_data.sec, spawn_data.smart)
L1031 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![WG] ERROR | Tasks Act 2 | Failed to spawn %s smart:%s",spawn_data.sec, spawn_data.smart)

western_goods_trade_eur_usd.script

L169 🟢 uncached_globals_summary
Cache 1 globals in ui_inventory_UIInventory_TMode_UpdatePrice
Impact: medium
Show code
L198: math.ceil L198: math.ceil
L235 🟢 uncached_globals_summary
Cache 1 globals in make_exchange
Impact: medium
Show code
L262: pairs L278: pairs
L264 🟢 repeated_obj_section()
obj:section() called 6x in make_exchange
Impact: low
Show code
Cache obj:section() result
L308 🟢 repeated_obj_id()
obj:id() called 4x in make_exchange
Impact: low
Show code
Cache obj:id() result

western_goods_ui_compass.script

L20 🔴 global_write
Global write: dbg_printf
Impact: low
Show code
dbg_printf = western_goods_utils.dbg_printf

western_goods_ui_rangefinder.script

L137 🟢 repeated_device
device called 3x in GetHCDTextures
Impact: low
Show code
local dev = device()
L158 🟢 repeated_obj_section()
obj:section() called 2x in actor_on_update
Impact: low
Show code
Cache obj:section() result
L213 🟡 potential_nil_access
Potential nil access: 'active_item' from :active_item() used without nil check
Impact: low
Show code
if not active_item or not western_goods_utils.table_contains(self.m_valid_sections, active_item:section()) then

western_goods_ui_readable.script

L50 🟢 repeated_obj_section()
obj:section() called 3x in use_item
Impact: low
Show code
Cache obj:section() result
L61 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![WG] ERROR | UI Readable | No section passed!")
L313 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![WG] ERROR | UI Readable | Missing texture for '%s'. Expected texture '%s' !", self.m_section, expected)

western_goods_utils.script

L493 🟢 table_insert_append
table.insert(matches[key], v) -> matches[key][#matches[key]+1] = v
Impact: high
Show code
table.insert(matches[key], texture_descr_id)
L821 🟢 table_insert_append
table.insert(textures, v) -> textures[#textures+1] = v
Impact: high
Show code
table.insert(textures, texture)
L117 🟢 uncached_globals_summary
Cache 1 globals in as_string
Impact: medium
Show code
L120: type L129: type
L857 🟢 uncached_globals_summary
Cache 1 globals in get_named_location
Impact: medium
Show code
L878: tonumber L879: tonumber
L1063 🟢 uncached_globals_summary
Cache 1 globals in open_container
Impact: medium
Show code
L1070: string.find L1073: string.find
L36 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L106 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![WG] ERROR | Utils | Cannot cast variable to number")
L136 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![WG] ERROR | Utils | Cannot cast variable to string")
L158 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![WG] ERROR | Utils | Cannot cast variable to boolean")
L425 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![WG] ERROR | Utils | Failed to get Stalker Net Data for %s", se_obj:section_name())
L524 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![WG] ERROR | Utils | Squad already exists - '%s'", se_squad:section_name())
L540 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![WG] ERROR | Utils | Failed to create squad (%s)",sec)
L577 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![WG] ERROR | Utils | Failed to create squad (%s)",sec)
L594 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![WG] ERROR | Utils | Failed to create squad (%s)",sec)
L618 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![WG] ERROR | Utils | Failed to create dead squad (%s)",sec)
L710 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~[WG] WARNING | Utils | Aborting, trying to get the squad of an object that cannot be in a squad (obj : '%s')", obj and obj:name())
L758 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~[WG] WARNING | Utils | Trying to get HUD bone '%s' position in third person ! Fallback to '%s'", hud_bone, bone)
L795 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~[WG] WARNING | Utils | Trying to set HUD bone '%s' visibility in third person ! Fallback to '%s'", hud_bone, bone)
L861 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![WG] ERROR | Utils | Named location '%s' not found !", location_name)
L867 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![WG] ERROR | Utils | Named location '%s' has an invalid position !\n%s", location_name, utils_data.print_table(position, false, true))
L872 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![WG] ERROR | Utils | Named location '%s' has an invalid orientation !\n%s", location_name, utils_data.print_table(orientation, false, true))
L933 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("![WG] ERROR | Utils | Missing argument no %s for '%s()'!",index,params[#params])
L21 🔴 global_write
Global write: trade_status_flags
Impact: low
Show code
trade_status_flags = { cant_trade = 1, too_damaged = 2, hidden = 3, tradable = 4 }
L22 🔴 global_write
Global write: weapon_zoom_types
Impact: low
Show code
weapon_zoom_types = { normal = 0, alt = 1, gl = 2 }
L23 🔴 global_write
Global write: animation_hands_modes
Impact: low
Show code
animation_hands_modes = { right = 0, left = 1, both = 2 }
L24 🔴 global_write
Global write: hud_states
Impact: low
Show code
hud_states = { idle = 0, showing = 1, hiding = 2, hidden = 3, bore = 4 }
L25 🔴 global_write
Global write: hud_states_devices
Impact: low
Show code
hud_states_devices = { idle_zoom = 5, idle_zoom_in = 6, idle_zoom_out = 7, throw_start = 8, throw = 9, throw_end = 10 }
L26 🔴 global_write
Global write: squad_relations
Impact: low
Show code
squad_relations = { friend = "friend", neutral = "neutral", enemy = "enemy" }

xr_logic_ex.script

L89 🟢 uncached_globals_summary
Cache 1 globals in get_waypoint
Impact: medium
Show code
L96: tonumber L96: tonumber
L170 🟢 uncached_globals_summary
Cache 3 globals in xr_effects.animpoint
Impact: medium
Show code
L215: math.random L249: math.random L220: pairs L227: pairs L295: tostring L312: tostring
L415 🟢 uncached_globals_summary
Cache 3 globals in load_animpoint
Impact: medium
Show code
L423: tostring L472: tostring L425: tonumber L429: tonumber L427: string.gmatch L436: string.gmatch
L673 🟢 uncached_globals_summary
Cache 2 globals in mutant_load_path
Impact: medium
Show code
L687: string.gmatch L693: string.gmatch L690: tonumber L699: tonumber
L735 🟢 uncached_globals_summary
Cache 1 globals in vector_angle_diff
Impact: medium
Show code
L739: math.abs L739: math.abs
L902 🟢 uncached_globals_summary
Cache 2 globals in npc_logic_update
Impact: medium
Show code
L915: tostring L923: tostring L916: tonumber L924: tonumber
L1006 🟢 uncached_globals_summary
Cache 1 globals in npc_set_position
Impact: medium
Show code
L1041: tonumber L1041: tonumber
L1087 🟢 uncached_globals_summary
Cache 3 globals in npc_on_before_hit
Impact: medium
Show code
L1094: string.find L1102: string.find L1095: tonumber L1108: tonumber L1105: tostring L1105: tostring
L16 🟢 repeated_npc_id()
npc:id() called 5x in <global>
Impact: low
Show code
Cache npc:id() result
L171 🟢 repeated_npc_id()
npc:id() called 7x in xr_effects.animpoint
Impact: low
Show code
Cache npc:id() result
L621 🟢 repeated_npc_clsid()
npc:clsid() called 3x in xr_effects.mutant_path
Impact: low
Show code
Cache npc:clsid() result
L1298 🟢 repeated_device
device called 3x in execute
Impact: low
Show code
local dev = device()
L189 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: animpoint %s | %s",st.active_section,dt.level_vertex_id)
L228 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: load_campfire_actions [%s] %s is_in_camp %s %s",npc:name(),dt.active_section,is_in_camp,v and v.name)
L240 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: [%s] %s no camp",npc:name(),dt.active_section)
L275 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: animpoint load campfire action %s %s",dt.active_section,v)
L319 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: xr_logic_ex can not find %s %s",dt.active_section,dt.delay_animation)
L718 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: %s [%s] no dt.position",st.ini_filename,st.active_section)
L721 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: %s [%s] no dt.level_vertex_id",st.ini_filename,st.active_section)
L724 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: %s [%s] no dt.look_position",st.ini_filename,st.active_section)
L783 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: xr_logic_ex | load_storage_squad file %s doesn't exist.",ini_name)
L818 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: xr_logic_ex | load_storage_logic file %s doesn't exist.",ini_name)
L893 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: squad_target_update teleport [%s] %s %s",squad:name(),new_target,squad.scripted_target)
L943 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: xr_logic_ex | old logic [%s] %s %s",npc:name(),st.section_logic,st.active_section)
L958 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("GhenTuong: xr_logic_ex | new logic [%s] %s %s %s",npc:name(),ini_name,new_logic,new_section)
L865 🟢 dead_code_if_false
Dead code: if false (lines 865-884)
Impact: low
Show code
if (false) then
L1031 🟢 dead_code_if_false
Dead code: if false (lines 1031-1046)
Impact: low
Show code
if (false) then
L1147 🟡 unused_local_variable
Local variable 'r' is assigned but never used
Impact: low
Show code
local r,i,v = smart.ini:r_line("on_changing_level",k)
L828 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result,i,v = ini:r_line("section@logic",k)

Wildkins's Ammo Parts on Hover

1 file (🟢6 🟡14 🔴11 🔵20)

itms_manager.script

L199 🟢 uncached_globals_summary
Cache 1 globals in actor_on_first_update
Impact: medium
Show code
L214: pairs L236: pairs
L642 🟢 uncached_globals_summary
Cache 1 globals in use_watch
Impact: medium
Show code
L645: tostring L655: tostring
L1167 🟢 uncached_globals_summary
Cache 1 globals in update
Impact: medium
Show code
L1169: pairs L1198: pairs
L331 🟢 repeated_obj_id()
obj:id() called 2x in actor_on_item_take
Impact: low
Show code
Cache obj:id() result
L719 🟢 repeated_wpn_section()
wpn:section() called 3x in new_game_equippment
Impact: low
Show code
Cache wpn:section() result
L1312 🟢 repeated_alife
alife called 3x in Create_Item
Impact: low
Show code
local sim = alife()
L80 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR item_combination | wrong section names")
L711 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("- Autosaved new game")
L1014 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: relocate_item_to_actor | object for section [%s] is bugged!", section)
L1069 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR: Couldn't relocate_item_from_actor | not enough item [%s] recolated! need %s more", section, cnt)
L1101 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR itms_manager | play_item_sound | no object recieved!")
L1173 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("* ItemProcessor | processing condition | id: %s - con: %s", id, con)
L1183 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("# ItemProcessor | processing condition done | id: %s - con: %s", id, new_con)
L1202 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("* ItemProcessor | processing uses | id: %s - uses: %s", id, uses)
L1211 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("# ItemProcessor | processing uses done | id: %s - con: %s", id, uses)
L1230 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("* ItemProcessor | processing ammo | id: %s - ammo: %s", id, ammo)
L1239 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("# ItemProcessor | processing ammo done | id: %s - con: %s", id, new_con)
L1288 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ItemProcessor | Missing spawn properties for [%s] | Spawn type: %s | pos: %s, lvi: %s, gvi: %s", section, spawn_typ, pos , lvi , gvi)
L1322 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/ alife_create [%s] (%s) x%s ammo %s", section, se_ammo and se_ammo.id, num_in_box, spawn_typ)
L1331 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/ alife_create [%s] (%s) x%s ammo %s", section, se_ammo and se_ammo.id, num, spawn_typ)
L1346 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/ alife_create [%s] (%s) on %s", section, se_itm and se_itm.id, spawn_typ)
L1350 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ItemProcessor | Missing spawn owner for [%s]!", section)
L1389 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR [%s] is not spawned by ItemProcessor",section)
L1393 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ItemProcessor | section [%s] doesn't exist!", section)
L1397 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ ItemProcessor | nothing is passed to process!")
L1432 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s ItemProcessor | %s: (%s) [%s] - owner: (%s) [%s]", mark, str, id, obj and obj:section(), p and p:id() or "-", p and p:section())
L27 🔴 global_write
Global write: ini_manager
Impact: low
Show code
ini_manager = ini_file("items\\settings\\itms_manager.ltx")
L28 🔴 global_write
Global write: ini_container
Impact: low
Show code
ini_container = ini_file("items\\settings\\arty_container.ltx")
L29 🔴 global_write
Global write: ini_parts
Impact: low
Show code
ini_parts = ini_file("items\\settings\\parts.ltx")
L30 🔴 global_write
Global write: ini_craft
Impact: low
Show code
ini_craft = ini_file("items\\settings\\craft.ltx")
L31 🔴 global_write
Global write: ini_death
Impact: low
Show code
ini_death = ini_file("items\\settings\\death_generic.ltx")
L32 🔴 global_write
Global write: ini_reward
Impact: low
Show code
ini_reward = ini_file("items\\settings\\item_rewards.ltx")
L33 🔴 global_write
Global write: ini_ammo
Impact: low
Show code
ini_ammo = ini_file("items\\ammo\\ammo_vanilla.ltx")
L34 🔴 global_write
Global write: ini_ammo_bas
Impact: low
Show code
ini_ammo_bas = ini_file("items\\ammo\\ammo_bas.ltx")
L42 🔴 global_write
Global write: itms_arty_container
Impact: low
Show code
itms_arty_container = utils_data.collect_section(ini_container,"containers",true) or {}
L53 🔴 global_write
Global write: item_rewards
Impact: low
Show code
item_rewards = {}
L68 🔴 global_write
Global write: item_combine
Impact: low
Show code
item_combine = {}
L535 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L543 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L550 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then return end
L663 🟡 potential_nil_access
Potential nil access: 'p' from :parent() used without nil check
Impact: low
Show code
if not (p and p:id() == AC_ID) then
L1316 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
se_tbl[#se_tbl+1] = sim:create_ammo(section, pos, lvi, gvi, p_id, num_in_box)
L1326 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
se_tbl[#se_tbl+1] = sim:create_ammo(section, pos, lvi, gvi, p_id, num)
L1431 🟡 potential_nil_access
Potential nil access: 'obj' from level.object_by_id() used without nil check
Impact: low
Show code
local p = obj and obj:parent()
L102 🟡 unused_local_variable
Local variable 'booster_string' is assigned but never used
Impact: low
Show code
local booster_string = {
L323 🟡 unused_local_variable
Local variable 'str_itm_taken' is assigned but never used
Impact: low
Show code
local str_itm_taken = game.translate_string("st_item_taken")
L336 🟡 unused_local_variable
Local variable 'fuel' is assigned but never used
Impact: low
Show code
local fuel = tostring(math.random(6,8))
L643 🟡 unused_local_variable
Local variable 'Y' is assigned but never used
Impact: low
Show code
local Y, M, D, h, mint, sec, ms = game.get_game_time():get()
L643 🟡 unused_local_variable
Local variable 'M' is assigned but never used
Impact: low
Show code
local Y, M, D, h, mint, sec, ms = game.get_game_time():get()
L643 🟡 unused_local_variable
Local variable 'D' is assigned but never used
Impact: low
Show code
local Y, M, D, h, mint, sec, ms = game.get_game_time():get()
L643 🟡 unused_local_variable
Local variable 'ms' is assigned but never used
Impact: low
Show code
local Y, M, D, h, mint, sec, ms = game.get_game_time():get()

Yet Another Knife Reanimation - lizzardman

4 files (🟢4 🟡3 🔴19 🔵2)

animation_common.script

L31 🟢 table_insert_append
table.insert(anim_mutators, v) -> anim_mutators[#anim_mutators+1] = v
Impact: high
Show code
table.insert(anim_mutators, {functor=functor, priority=priority})
L88 🟢 repeated_item_section()
item:section() called 3x in actor_on_hud_animation_play
Impact: low
Show code
Cache item:section() result

aol_anim_transitions.script

L6 🟢 table_insert_append
table.insert(valid_anims, v) -> valid_anims[#valid_anims+1] = v
Impact: high
Show code
table.insert(valid_anims, anm_suffix)
L37 🟢 table_insert_append
table.insert(pattern_transitions[hud_section], v) -> pattern_transitions[hud_section][#pattern_transitions[hud_section]+1] = v
Impact: high
Show code
table.insert(pattern_transitions[hud_section], {
L99 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L128 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L15 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L32 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L3 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L10 🔴 global_write
Global write: transitions
Impact: low
Show code
transitions = {
L26 🔴 global_write
Global write: pattern_transitions
Impact: low
Show code
pattern_transitions = {
L162 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L51 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_items:r_line_ex(section,i,"","")

aol_sprint_cancel.script

L16 🔴 global_write
Global write: aol_anim_transitions_anm_transitions
Impact: low
Show code
aol_anim_transitions_anm_transitions = aol_anim_transitions.anm_transitions

uni_anim_knives.script

L5 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = false
L11 🔴 global_write
Global write: fdda_anim_prepare
Impact: low
Show code
fdda_anim_prepare = enhanced_animations.anim_prepare
L13 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L17 🔴 global_write
Global write: fdda_call_my_slot_back
Impact: low
Show code
fdda_call_my_slot_back = enhanced_animations.call_my_slot_back
L21 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = false
L26 🔴 global_write
Global write: fdda_bp_call_my_slot_back
Impact: low
Show code
fdda_bp_call_my_slot_back = zzz_ea_addon_backpack.call_my_slot_back
L30 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = false
L39 🔴 global_write
Global write: ha_prepare_for_animation
Impact: low
Show code
ha_prepare_for_animation = headgear_animations.prepare_for_animation
L41 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L45 🔴 global_write
Global write: ha_restore_after_animation
Impact: low
Show code
ha_restore_after_animation = headgear_animations.restore_after_animation
L47 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = false
L100 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L111 🔴 global_write
Global write: knife_equipped
Impact: low
Show code
knife_equipped = string.match(tostring(sec), "knife")
L152 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = false

ZCP 1.5d

18 files (🟢64 🟡89 🔴32 🔵59)

bind_anomaly_field.script

L57 🟢 uncached_globals_summary
Cache 1 globals in ini_settings
Impact: medium
Show code
L84: tonumber L109: tonumber
L425 🟢 uncached_globals_summary
Cache 1 globals in pulse_anomaly_update
Impact: medium
Show code
L445: math.random L450: math.random
L30 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L48 🔴 global_write
Global write: dyn_anomalies
Impact: low
Show code
dyn_anomalies = {} -- [level][id] = name
L517 🔴 global_write
Global write: dyn_anomalies
Impact: low
Show code
dyn_anomalies = m_data.dyn_anomalies or {}
L554 🔴 global_write
Global write: fields_by_names
Impact: low
Show code
fields_by_names = {}

bind_awr.script

L266 🟢 table_insert_append
table.insert(angles_t[k], v) -> angles_t[k][#angles_t[k]+1] = v
Impact: high
Show code
angles_t[k] = {}
L304 🟢 uncached_globals_summary
Cache 1 globals in full_access
Impact: medium
Show code
L309: string.format L310: string.format
L437 🟢 uncached_globals_summary
Cache 2 globals in table_to_string
Impact: medium
Show code
L447: type L449: type L450: tostring L462: tostring
L61 🟢 repeated_npc_section()
npc:section() called 3x in OnDeath
Impact: low
Show code
Cache npc:section() result
L432 🟡 string_concat_in_loop
String concat in loop: str = str .. x
Impact: critical
Show code
local txt = header and ("-- " .. tostring(header) .. "\n{\n\n") or "{\n\n"
L456 🟡 string_concat_in_loop
String concat in loop: txt = txt .. x
Impact: critical
Show code
key = "[\""..tostring(k) .. "\"]"
L164 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/ Registered vice [%s] = %s", name, i)
L172 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("/ Registered vice lamp [%s] = %s", name, i)
L417 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
return tostring(p[i])
L497 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
txt = txt .. "\n}"
L153 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local s_obj = sim:object(i)
L233 🟡 potential_nil_access
Potential nil access: 'alife' from alife() used without nil check
Impact: low
Show code
local se_actor = alife:actor()
L292 🟡 potential_nil_access
Potential nil access: 'lamp' from level.object_by_id() used without nil check
Impact: low
Show code
if lamp then
L10 🟡 unused_local_variable
Local variable 'settings_list' is assigned but never used
Impact: low
Show code
local settings_list = {}

dph_debug_log.script

L123 🟢 table_insert_append
table.insert(private.modules, v) -> private.modules[#private.modules+1] = v
Impact: high
Show code
table.insert(private.modules, m)
L31 🟢 uncached_globals_summary
Cache 1 globals in new
Impact: medium
Show code
L85: ipairs L94: ipairs
L49 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe(public.format_entry("dph_debug_log/log", LOG_LEVEL_ERROR, "Unable to open logfile %s! Entry logged on the following line.", public.config.file))
L50 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(public.format_entry(mod, level, entry, ...))
L58 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe(ln)
L60 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(ln)
L71 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe(public.format_entry("dph_debug_log/pda", LOG_LEVEL_ERROR, "Could not send message to PDA: Actor does not exist! Entry logged on the following line."))
L72 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(public.format_entry(mod, level, entry, ...))
L139 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe(public.format_entry("dph_debug_log", LOG_LEVEL_ERROR, "Target %s threw an exception while logging <%s> %s", target, mod, entry))
L140 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("ERROR: %s", err)
L141 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(public.format_entry(mod, level, entry, ...))
L16 🔴 global_write
Global write: log_levels
Impact: low
Show code
log_levels = {
L78 🔴 global_write
Global write: m
Impact: low
Show code
m = tostring(mt)
L79 🔴 global_write
Global write: p
Impact: low
Show code
p = tostring(pt)
L137 🟡 unused_local_variable
Local variable 'status' is assigned but never used
Impact: low
Show code
local status, err = pcall(private.targets[target], mod, level, entry, ...)

faction_expansions.script

L128 🟢 uncached_globals_summary
Cache 1 globals in get_section
Impact: medium
Show code
L129: math.random L140: math.random
L8 🔴 global_write
Global write: faction
Impact: low
Show code
faction = {}
L9 🔴 global_write
Global write: level
Impact: low
Show code
level = {}
L10 🔴 global_write
Global write: mutant
Impact: low
Show code
mutant = {}
L11 🔴 global_write
Global write: mutant_tier_by_clsid
Impact: low
Show code
mutant_tier_by_clsid = {
L232 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_fact:r_line_ex("mutant_tier",i,"","")

game_setup.script

L106 🟢 uncached_globals_summary
Cache 1 globals in init_settings
Impact: medium
Show code
L127: tonumber L149: tonumber
L182 🟢 uncached_globals_summary
Cache 1 globals in try_spawn_world_item
Impact: medium
Show code
L199: math.random L225: math.random
L348 🟢 repeated_alife
alife called 3x in freedom_medic_fix
Impact: low
Show code
local sim = alife()
L79 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L315 🟡 potential_nil_access
Potential nil access: 'se' from :object() used without nil check
Impact: low
Show code
if se and (se:name() == 'bar_physic_object_mlr_0002' or se:name() == 'bar_physic_object_mlr_0003') then
L315 🟡 potential_nil_access
Potential nil access: 'se' from :object() used without nil check
Impact: low
Show code
if se and (se:name() == 'bar_physic_object_mlr_0002' or se:name() == 'bar_physic_object_mlr_0003') then
L330 🟡 potential_nil_access
Potential nil access: 'se' from :object() used without nil check
Impact: low
Show code
if se and (se:name() == 'ds_physic_destroyable_object_0046' or se:name() == 'ds_physic_object_0009' or se:name() == 'ds_physic_object_0010' or se:name() == 'ds_physic_object_0002') then
L330 🟡 potential_nil_access
Potential nil access: 'se' from :object() used without nil check
Impact: low
Show code
if se and (se:name() == 'ds_physic_destroyable_object_0046' or se:name() == 'ds_physic_object_0009' or se:name() == 'ds_physic_object_0010' or se:name() == 'ds_physic_object_0002') then
L330 🟡 potential_nil_access
Potential nil access: 'se' from :object() used without nil check
Impact: low
Show code
if se and (se:name() == 'ds_physic_destroyable_object_0046' or se:name() == 'ds_physic_object_0009' or se:name() == 'ds_physic_object_0010' or se:name() == 'ds_physic_object_0002') then
L330 🟡 potential_nil_access
Potential nil access: 'se' from :object() used without nil check
Impact: low
Show code
if se and (se:name() == 'ds_physic_destroyable_object_0046' or se:name() == 'ds_physic_object_0009' or se:name() == 'ds_physic_object_0010' or se:name() == 'ds_physic_object_0002') then
L392 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(i)
L422 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(i)

pda.script

L117 🟢 uncached_globals_summary
Cache 1 globals in get_time_elapsed
Impact: medium
Show code
L122: string.format L124: string.format
L132 🟢 uncached_globals_summary
Cache 1 globals in get_stat
Impact: medium
Show code
L136: tostring L138: tostring
L523 🟢 uncached_globals_summary
Cache 1 globals in coc_rankings_set_hint
Impact: medium
Show code
L547: tostring L550: tostring
L457 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("- get_coc_ranking_list | id [%s] = %s", i , coc_ranking_list[i])
L4 🔴 global_write
Global write: dialog_closed
Impact: low
Show code
dialog_closed = true
L89 🔴 global_write
Global write: dialog_closed
Impact: low
Show code
dialog_closed = false
L112 🔴 global_write
Global write: dialog_closed
Impact: low
Show code
dialog_closed = true
L24 🟡 potential_nil_access
Potential nil access: 'obj' from :item_in_slot() used without nil check
Impact: low
Show code
local sec = obj and obj:section()
L467 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
t[0] = sim:actor():rank()
L471 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(i)
L472 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if (se_obj and IsStalker(nil,se_obj:clsid()) and se_obj:alive() and se_obj:community() ~= "zombied" and se_obj:community() ~= "trader") then
L472 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if (se_obj and IsStalker(nil,se_obj:clsid()) and se_obj:alive() and se_obj:community() ~= "zombied" and se_obj:community() ~= "trader") then
L472 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if (se_obj and IsStalker(nil,se_obj:clsid()) and se_obj:alive() and se_obj:community() ~= "zombied" and se_obj:community() ~= "trader") then
L472 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if (se_obj and IsStalker(nil,se_obj:clsid()) and se_obj:alive() and se_obj:community() ~= "zombied" and se_obj:community() ~= "trader") then
L476 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
t[se_obj.id] = se_obj:rank()
L610 🟡 potential_nil_access
Potential nil access: 'outfit' from :item_in_slot() used without nil check
Impact: low
Show code
local icon = ini_sys:r_string_ex(outfit:section(),"character_portrait")
L648 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
if actor:dont_has_info(v.target) then
L652 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
if (db.storage[obj_id].object:position():distance_to(actor:position()) <= n_dist) then

sim_board.script

L91 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("Smart already exist in list [%s]", obj:name())
L166 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("create_squad_at_named_location: squad section does not exist in misc\\squad_descr.ltx: %s",squad_id)
L174 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('create_squad_at_named_location: named location not defined in named_locations.ltx: %s',loc_name)
L190 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("str_explode_num: warning: %s couldn't be parsed as number", s)
L305 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("---------------- Welcome To Test Map ----------------")
L362 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("sim_board:fill_start_position incorrect smart by name %s",section)
L145 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = k.object or k.id and sim:object(k.id)
L211 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = k.object or k.id and sim:object(k.id)
L278 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local squad = se_obj.group_id and se_obj.group_id ~= 65535 and sim:object(se_obj.group_id)
L284 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local smart = squad.smart_id and sim:object(squad.smart_id)
L6 🟡 unused_local_variable
Local variable 'tsort' is assigned but never used
Impact: low
Show code
local level,alife,game_graph,math,pairs,tostring,tonumber,tsort,tinsert = level,alife,game_graph,math,pairs,tostring,tonumber,table.sort,table.insert
L6 🟡 unused_local_variable
Local variable 'tinsert' is assigned but never used
Impact: low
Show code
local level,alife,game_graph,math,pairs,tostring,tonumber,tsort,tinsert = level,alife,game_graph,math,pairs,tostring,tonumber,table.sort,table.insert
L273 🟡 unused_local_variable
Local variable 'community_groups' is assigned but never used
Impact: low
Show code
local community_groups = {}

sim_squad_scripted.script

L629 🟢 uncached_globals_summary
Cache 2 globals in create_npc
Impact: medium
Show code
L644: tonumber L646: tonumber L728: math.random L728: math.random
L937 🟢 uncached_globals_summary
Cache 1 globals in STATE_Write
Impact: medium
Show code
L947: tostring L948: tostring
L961 🟢 uncached_globals_summary
Cache 1 globals in STATE_Read
Impact: medium
Show code
L977: tonumber L983: tonumber
L604 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: npc section %s does not exist!",spawn_section)
L610 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("INCORRECT npc_spawn_section USED [%s]. You cannot use npc with custom_data in squads", spawn_section)
L687 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf('spawn smart: %s', spawn_smart)
L746 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("You are trying to spawn an empty squad [%s]!!!", settings_id)
L872 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("squad community is 'nil' for player_id [%s]", self.player_id)
L12 🔴 global_write
Global write: dbg_map_hud
Impact: low
Show code
dbg_map_hud = false
L228 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_actor = sim:actor()
L239 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local cur_lvl = sim:level_name(game_graph():vertex(self.m_game_vertex_id):level_id())
L427 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(id)
L499 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local obj = sim:object(member_id)
L619 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local actor = sim:actor()
L620 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
if (simulation_objects.is_on_the_same_level(obj, actor) and spawn_position:distance_to_sqr(actor.position) <= sim:switch_distance()^2) then
L861 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(k.id)
L862 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if se_obj and se_obj:has_detector() then
L1227 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_actor = sim:actor()
L21 🟡 unused_local_variable
Local variable 'a' is assigned but never used
Impact: low
Show code
local a,key,val = locations_ini:r_line_ex(section,0,"","")
L21 🟡 unused_local_variable
Local variable 'val' is assigned but never used
Impact: low
Show code
local a,key,val = locations_ini:r_line_ex(section,0,"","")
L173 🟡 unused_local_variable
Local variable 'itm' is assigned but never used
Impact: low
Show code
local itm = alife_create_item(vv, alife_object(k.id))
L813 🟡 unused_local_variable
Local variable 'planner' is assigned but never used
Impact: low
Show code
local planner = npc:motivation_action_manager()
L1399 🟡 unused_local_variable
Local variable 'smarts_by_no_assault_zones' is assigned but never used
Impact: low
Show code
local smarts_by_no_assault_zones = {

smart_terrain.script

L626 🟢 uncached_globals_summary
Cache 1 globals in select_npc_job
Impact: medium
Show code
L695: pairs L705: pairs
L925 🟢 uncached_globals_summary
Cache 1 globals in STATE_Write
Impact: medium
Show code
L935: pairs L944: pairs
L1121 🟢 uncached_globals_summary
Cache 2 globals in get_smart_props
Impact: medium
Show code
L1123: tostring L1129: tostring L1146: pairs L1162: pairs
L1209 🟢 uncached_globals_summary
Cache 1 globals in check_smart_faction
Impact: medium
Show code
L1211: pairs L1220: pairs
L1597 🟢 uncached_globals_summary
Cache 1 globals in try_respawn
Impact: medium
Show code
L1698: math.random L1714: math.random
L1359 🟢 repeated_npc_id()
npc:id() called 4x in setup_logic
Impact: low
Show code
Cache npc:id() result
L528 🟡 string_concat_in_loop
String concat in loop: path_name = path_name .. x
Impact: critical
Show code
path_name = path_name.."_task"
L1148 🟡 string_concat_in_loop
String concat in loop: props = props .. x
Impact: critical
Show code
props = props.."["..k.."] = "..v.num.."("..(xr_logic.pick_section_from_condlist(db.actor, self,self.respawn_params[k].num) or "0")..")\\n"
L1163 🟡 string_concat_in_loop
String concat in loop: props = props .. x
Impact: critical
Show code
props = props .. tostring(k) .. "\\n"
L1169 🟡 string_concat_in_loop
String concat in loop: props = props .. x
Impact: critical
Show code
props = props .. prop .. " = " .. val .. "\\n"
L199 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR!: smart_terrain: no configuration file defined in spawn ini for %s",self:name())
L210 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: There is no configuration file [%s] in smart_terrain [%s]", filename, self:name())
L217 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! SMART_TERRAIN [%s] has no terrain_mask section in smart_terrain_masks.ltx!!!",self:name())
L276 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s Wrong smart_terrain respawn_params section [%s](there is no section)",self:name(),respawn_params)
L282 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s Wrong smart_terrain respawn_params section [%s](empty params)", self:name(), respawn_params)
L293 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: %s Wrong smatr_terrain respawn_params section [%s] prop [%s](there is no section)",self:name(), respawn_params, prop_name)
L313 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
return printf("fill_npc_info invalid clsid for %s",obj and obj:name())
L318 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
return printf("fill_npc_info invalid stype for %s [clsid=%s]",obj and obj:name(),cls)
L351 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
return printf("register_npc no clsid! %s",obj and obj:name())
L446 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("validate_patrol_path WARNING: %s: invalid game_vertex_id for point %s",path_name,i)
L451 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("validate_patrol_path ERROR: %s: path does not exist",path_name)
L471 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!CRITICAL ERROR: %s does not have a dynamic ltx!",self:name())
L491 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("gulag: ltx=%s no 'active' in section %s", self.ltx_name, section)
L517 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("smart_terrain.load_jobs(): Cannot find path_field in section %s. ini_path=%s",active_section,job.ini_path)
L539 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s:load_jobs() There is no such patrol path %s",self:name(),path_name)
L549 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("There is an exclusive job with wrong smatrcover name [%s] smartterrain [%s]", tostring(smartcover_name), self:name())
L634 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
return printf("%s no npc_info!",self:name())
L640 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
return printf("%s no job table for %s [stype = %s]",self:name(),npc_info.se_obj:name(),npc_info.stype)
L1007 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s:STATE_Read: invalid id in npc_info table. Check for save corruption or error in smart_terrain job system.")
L1355 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s.setup_logic: NPC is nil",self:name())
L1361 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s.setup_logic: npc_info is nil! for id=%s",self:name(),npc:id())
L1366 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s.setup_logic: npc_info.se_obj is nil! for id=%s",self:name(),npc:id())
L1372 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("%s.setup_logic: npc_info has no job! for id=%s",self:name(),npc:id())
L1385 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[smart_terrain %s] section=%s, don't use section 'nil'!", self:name(), sect)
L1709 🔵 debug_statement
Debug call: log()
Impact: medium
Show code
log("ERROR: %s Incorrect Respawn Params. respawn_params[%s].num=%s already_spawned[%s]=%s already_spawned[%s].num=%s",self:name(),k,v.num,k,type(self.already_spawned[k]),self.already_spawned[k] and self.already_spawned[k].num)
L11 🔴 global_write
Global write: nearest_to_actor_smart
Impact: low
Show code
nearest_to_actor_smart = {id = nil , dist = math.huge}
L12 🔴 global_write
Global write: dbg_hud
Impact: low
Show code
dbg_hud = false
L137 🔴 global_write
Global write: actor_level
Impact: low
Show code
actor_level = nil
L146 🔴 global_write
Global write: actor_level
Impact: low
Show code
actor_level = actor_level or sim:level_name(gg:vertex(sim:actor().m_game_vertex_id):level_id())
L1786 🔴 global_write
Global write: temp1
Impact: low
Show code
temp1, level_name, temp2 = names_ini:r_line("levels", i, "", "")
L1786 🔴 global_write
Global write: level_name
Impact: low
Show code
temp1, level_name, temp2 = names_ini:r_line("levels", i, "", "")
L1786 🔴 global_write
Global write: temp2
Impact: low
Show code
temp1, level_name, temp2 = names_ini:r_line("levels", i, "", "")
L1790 🔴 global_write
Global write: result
Impact: low
Show code
result, smart_name, value = names_ini:r_line(level_name, i, "", "")
L1790 🔴 global_write
Global write: smart_name
Impact: low
Show code
result, smart_name, value = names_ini:r_line(level_name, i, "", "")
L1790 🔴 global_write
Global write: value
Impact: low
Show code
result, smart_name, value = names_ini:r_line(level_name, i, "", "")
L146 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
actor_level = actor_level or sim:level_name(gg:vertex(sim:actor().m_game_vertex_id):level_id())
L146 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
actor_level = actor_level or sim:level_name(gg:vertex(sim:actor().m_game_vertex_id):level_id())
L147 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local smart_level = sim:level_name(gg:vertex(self.m_game_vertex_id):level_id())
L197 🟡 potential_nil_access
Potential nil access: 'spawn_ini' from :spawn_ini() used without nil check
Impact: low
Show code
local filename = spawn_ini:r_string_ex(smart_sect,"cfg")
L1074 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local sobj = sim:object(id)
L1075 🟡 potential_nil_access
Potential nil access: 'sobj' from :object() used without nil check
Impact: low
Show code
local cls = sobj and sobj:clsid()
L1095 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(id)
L1249 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_actor = sim:actor()
L1398 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local smart = se_obj.m_smart_terrain_id and se_obj.m_smart_terrain_id ~= 65535 and sim:object(se_obj.m_smart_terrain_id)
L1427 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local smart = sim and se_obj.m_smart_terrain_id and se_obj.m_smart_terrain_id ~= 65535 and sim:object(se_obj.m_smart_terrain_id)
L1461 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = k.object or k.id and sim:object(k.id)
L291 🟡 unused_local_variable
Local variable 'prop_condlist' is assigned but never used
Impact: low
Show code
local result, prop_name, prop_condlist = ini:r_line(respawn_params,j,"","")

smr_civil_war.script

L114 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(member.id)
L115 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj2 = sim:object(k.id)
L116 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
smr_debug.get_log().info("civilwar/relations", "setting up squad relations between %s and %s in squad %s", se_obj:section_name(), se_obj2:section_name(), squad:section_name())
L116 🟡 potential_nil_access
Potential nil access: 'se_obj2' from :object() used without nil check (auto-fixable)
Impact: low
Show code
smr_debug.get_log().info("civilwar/relations", "setting up squad relations between %s and %s in squad %s", se_obj:section_name(), se_obj2:section_name(), squad:section_name())
L118 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
se_obj:force_set_goodwill(5000, se_obj2.id)
L119 🟡 potential_nil_access
Potential nil access: 'se_obj2' from :object() used without nil check
Impact: low
Show code
se_obj2:force_set_goodwill(5000, se_obj.id)
L127 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
local se_obj = sim:object(k.id)
L128 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
if (not IsStalker(nil, se_obj:clsid())) then
L129 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
smr_debug.get_log().info("civilwar/relations", "not a stalker: %s in squad %s", se_obj:section_name(), squad:section_name())
L132 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
smr_debug.get_log().info("civilwar/relations", "setting up relations for %s in squad %s", se_obj:section_name(), squad:section_name())
L133 🟡 potential_nil_access
Potential nil access: 'se_obj' from :object() used without nil check
Impact: low
Show code
se_obj:force_set_goodwill(-5000, sim:object(0))
L133 🟡 potential_nil_access
Potential nil access: 'sim' from alife() used without nil check
Impact: low
Show code
se_obj:force_set_goodwill(-5000, sim:object(0))

smr_loot.script

L439 🟢 table_insert_append
table.insert(useful_tier1, v) -> useful_tier1[#useful_tier1+1] = v
Impact: high
Show code
table.insert(useful_tier1, "device_glowstick_orange")
L440 🟢 table_insert_append
table.insert(useful_tier1, v) -> useful_tier1[#useful_tier1+1] = v
Impact: high
Show code
table.insert(useful_tier1, "device_glowstick_red")
L441 🟢 table_insert_append
table.insert(useful_tier1, v) -> useful_tier1[#useful_tier1+1] = v
Impact: high
Show code
table.insert(useful_tier1, "device_glowstick_blue")
L442 🟢 table_insert_append
table.insert(useful_tier1, v) -> useful_tier1[#useful_tier1+1] = v
Impact: high
Show code
table.insert(useful_tier1, "device_glowstick")
L445 🟢 table_insert_append
table.insert(useful_tier1, v) -> useful_tier1[#useful_tier1+1] = v
Impact: high
Show code
table.insert(useful_tier1, "lockpick")
L446 🟢 table_insert_append
table.insert(useful_tier1, v) -> useful_tier1[#useful_tier1+1] = v
Impact: high
Show code
table.insert(useful_tier1, "bundle_lockpick")
L447 🟢 table_insert_append
table.insert(useful_tier2, v) -> useful_tier2[#useful_tier2+1] = v
Impact: high
Show code
table.insert(useful_tier2, "lockpick_set")
L448 🟢 table_insert_append
table.insert(useful_tier4, v) -> useful_tier4[#useful_tier4+1] = v
Impact: high
Show code
table.insert(useful_tier4, "skeleton_key")
L451 🟢 table_insert_append
table.insert(repair_tier1, v) -> repair_tier1[#repair_tier1+1] = v
Impact: high
Show code
table.insert(repair_tier1, "ramrod_tool")
L452 🟢 table_insert_append
table.insert(repair_tier1, v) -> repair_tier1[#repair_tier1+1] = v
Impact: high
Show code
table.insert(repair_tier1, "rasp_tool")
L453 🟢 table_insert_append
table.insert(repair_tier1, v) -> repair_tier1[#repair_tier1+1] = v
Impact: high
Show code
table.insert(repair_tier1, "sewing_thread")
L454 🟢 table_insert_append
table.insert(repair_tier2, v) -> repair_tier2[#repair_tier2+1] = v
Impact: high
Show code
table.insert(repair_tier2, "heavy_sewing_thread")
L315 🟢 uncached_globals_summary
Cache 1 globals in try_spawn_ammo
Impact: medium
Show code
L316: math.random L318: math.random
L341 🟡 unused_local_variable
Local variable 'f' is assigned but never used
Impact: low
Show code
local f = factor or 1

smr_pop.script

L94 🟢 table_insert_append
table.insert(mutant_spawn_squads, v) -> mutant_spawn_squads[#mutant_spawn_squads+1] = v
Impact: high
Show code
table.insert(mutant_spawn_squads, v)
L111 🟢 table_insert_append
table.insert(unused_mutant_spawn_table[mn[1]], v) -> unused_mutant_spawn_table[mn[1]][#unused_mutant_spawn_table[mn[1]]+1] = v
Impact: high
Show code
table.insert(unused_mutant_spawn_table[mn[1]], v)
L124 🟢 table_insert_append
table.insert(zombie_spawn_table, v) -> zombie_spawn_table[#zombie_spawn_table+1] = v
Impact: high
Show code
table.insert(zombie_spawn_table, s)
L130 🟢 table_insert_append
table.insert(zombie_spawn_table, v) -> zombie_spawn_table[#zombie_spawn_table+1] = v
Impact: high
Show code
table.insert(zombie_spawn_table, "simulation_zombie")
L141 🟢 table_insert_append
table.insert(faction_spawn_table, v) -> faction_spawn_table[#faction_spawn_table+1] = v
Impact: high
Show code
table.insert(faction_spawn_table, n)
L146 🟢 table_insert_append
table.insert(faction_spawn_table, v) -> faction_spawn_table[#faction_spawn_table+1] = v
Impact: high
Show code
table.insert(faction_spawn_table, "stalker")
L172 🟢 table_insert_append
table.insert(mutant_spawn_table, v) -> mutant_spawn_table[#mutant_spawn_table+1] = v
Impact: high
Show code
table.insert(mutant_spawn_table, m)
L176 🟢 table_insert_append
table.insert(mutant_spawn_table, v) -> mutant_spawn_table[#mutant_spawn_table+1] = v
Impact: high
Show code
table.insert(mutant_spawn_table, "chimera_")
L185 🟢 string_len
string.len(m) -> #m
Impact: low
Show code
if (string.sub(section, 1, string.len(m)) == m) then
L315 🟢 string_len
string.len("simulation_") -> #"simulation_"
Impact: low
Show code
if (string.sub(orig_spawn, 1, string.len("simulation_")) == "simulation_")
L220 🟢 uncached_globals_summary
Cache 1 globals in try_spawn_faction
Impact: medium
Show code
L227: math.random L228: math.random
L288 🟢 uncached_globals_summary
Cache 1 globals in smr_handle_spawn
Impact: medium
Show code
L299: math.random L308: math.random

smr_spawn_template.script

L1 🔴 global_write
Global write: template_cfg
Impact: low
Show code
template_cfg = {}
L2 🔴 global_write
Global write: template_cfg_weights
Impact: low
Show code
template_cfg_weights = {}
L7 🔴 global_write
Global write: template_cfg
Impact: low
Show code
template_cfg = load_template_config()
L21 🔴 global_write
Global write: lc
Impact: low
Show code
lc = ini:line_count(section)
L94 🔴 global_write
Global write: weeks
Impact: low
Show code
weeks = math.floor(days/7)
L95 🔴 global_write
Global write: weeks
Impact: low
Show code
if weeks > 3 then weeks = 3 end

smr_spawns_mcm.script

L15 🟢 table_insert_append
table.insert(flist, v) -> flist[#flist+1] = v
Impact: high
Show code
table.insert(flist, {"plugins\\zcp\\spawn_templates\\" .. file_name, file_name })

smr_squad.script

L52 🟢 string_len
string.len(m) -> #m
Impact: low
Show code
if (string.sub(section, 1, string.len(m)) == m) then

smr_utils.script

L45 🟢 table_insert_append
table.insert(tmp, v) -> tmp[#tmp+1] = v
Impact: high
Show code
table.insert(tmp, sq)
L42 🔴 global_write
Global write: lc
Impact: low
Show code
lc = ini:line_count(section)
L52 🔴 global_write
Global write: lc
Impact: low
Show code
lc = ini:line_count(section)
L61 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, sq, count = ini:r_line(section,line,"","")

tasks_fetch.script

L325 🟢 repeated_npc_id()
npc:id() called 3x in <global>
Impact: low
Show code
Cache npc:id() result
L189 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR: fetch_reward_and_remove | no fetch item found!")
L194 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ Warning: fetch_reward_and_remove | total_cost is below 50")
L266 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR xr_effects.remove_artefact_item | no var found for %s", p[1])
L445 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! ERROR: %s | fetch list [%s] is invalid", p[1], p[2])
L552 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("!ERROR: xr_effects:setup_generic_fetch_task - invalid section %s",sec)
L740 🔵 debug_statement
Debug call: printe()
Impact: medium
Show code
printe("! WARNING: fetch_list.ltx | wrong section name [%s]", id)
L634 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local item = section and actor:object(section)
L657 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
if actor:object(section .. "_af_aam")
L658 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
or actor:object(section .. "_af_iam")
L659 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
or actor:object(section .. "_af_aac")
L660 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
or actor:object(section .. "_lead_box")
L124 🟡 unused_local_variable
Local variable 'sim' is assigned but never used
Impact: low
Show code
local sim = alife()

ui_mm_faction_select.script

L201 🟢 table_insert_append
table.insert(start_pos, v) -> start_pos[#start_pos+1] = v
Impact: high
Show code
table.insert(start_pos,ini_map:r_float_ex(start_location, "lvid"))
L202 🟢 table_insert_append
table.insert(start_pos, v) -> start_pos[#start_pos+1] = v
Impact: high
Show code
table.insert(start_pos,ini_map:r_float_ex(start_location, "gvid"))
L203 🟢 table_insert_append
table.insert(start_pos, v) -> start_pos[#start_pos+1] = v
Impact: high
Show code
table.insert(start_pos,vector():set(ini_map:r_float_ex(start_location,"x"),ini_map:r_float_ex(start_location,"y"),ini_map:r_float_ex(start_location,"z")))
L1130 🟢 table_insert_append
table.insert(self.table_icon, v) -> self.table_icon[#self.table_icon+1] = v
Impact: high
Show code
table.insert(self.table_icon, def_icon)
L1137 🟢 table_insert_append
table.insert(self.table_icon, v) -> self.table_icon[#self.table_icon+1] = v
Impact: high
Show code
table.insert(self.table_icon, id)
L1151 🟢 table_insert_append
table.insert(self.table_map, v) -> self.table_map[#self.table_map+1] = v
Impact: high
Show code
table.insert(self.table_map, "random_location")
L1161 🟢 table_insert_append
table.insert(self.table_map, v) -> self.table_map[#self.table_map+1] = v
Impact: high
Show code
table.insert(self.table_map, id)
L1164 🟢 table_insert_append
table.insert(self.table_map, v) -> self.table_map[#self.table_map+1] = v
Impact: high
Show code
table.insert(self.table_map, id)
L43 🟢 uncached_globals_summary
Cache 2 globals in on_game_load
Impact: medium
Show code
L57: tostring L57: tostring L57: math.random L57: math.random
L406 🟢 uncached_globals_summary
Cache 2 globals in __init
Impact: medium
Show code
L446: tonumber L457: tonumber L447: tostring L458: tostring
L1180 🟢 uncached_globals_summary
Cache 2 globals in LoadLoadout
Impact: medium
Show code
L1186: tostring L1187: tostring L1198: tonumber L1198: tonumber
L1528 🟡 string_concat_in_loop
String concat in loop: str_stats = str_stats .. x
Impact: critical
Show code
str_stats = str_stats .. "%c[0,150,150,150]• %c[0,50,175,50]" .. game.translate_string("st_faction_" .. k) .. "\\n"
L1688 🟡 string_concat_in_loop
String concat in loop: loadout_str = loadout_str .. x
Impact: critical
Show code
loadout_str = loadout_str .. "," .. ci.section
L1252 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("sec: %s | points: %s | points left: %s", ci.section, points, self.points_left)
L307 🟡 unused_local_variable
Local variable 'sim' is assigned but never used
Impact: low
Show code
local sim = alife()
L1195 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, sec, value = ini_itm:r_line(self.selected_faction .. "_loadout" , i , "", "")
L1618 🟡 unused_local_variable
Local variable 'bind' is assigned but never used
Impact: low
Show code
local bind = dik_to_bind(dik)

ZLM_

1 file (🟢7 🟡1 🔴1 🔵11)

zml_loot.script

L256 🟢 string_len
string.len(Start) -> #Start
Impact: low
Show code
return string.sub(String,1,string.len(Start))==Start
L123 🟢 uncached_globals_summary
Cache 1 globals in create_item_random_uses
Impact: medium
Show code
L125: tostring L125: tostring
L162 🟢 uncached_globals_summary
Cache 1 globals in try_spawn_ammo
Impact: medium
Show code
L164: math.random L166: math.random
L184 🟢 uncached_globals_summary
Cache 2 globals in try_spawn_category
Impact: medium
Show code
L185: tostring L186: tostring L188: math.random L220: math.random
L260 🟢 uncached_globals_summary
Cache 2 globals in try_spawn_faction
Impact: medium
Show code
L261: tostring L262: tostring L264: math.random L294: math.random
L413 🟢 uncached_globals_summary
Cache 1 globals in roll_droptable_tier
Impact: medium
Show code
L415: tostring L426: tostring
L468 🟢 uncached_globals_summary
Cache 1 globals in create_ammo
Impact: medium
Show code
L471: math.random L475: math.random
L17 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L352 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! ZML : "..loottable.." doesn't exist, aborting by placing zml_bugitem instead!")
L383 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! ZLM t=nil error!")
L396 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! ZML itm=nil error!")
L400 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! ZML itm "..itm.." doesn't exist! Swapping for zml_bugitem!")
L419 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("! ZML "..genstring.."1 doesn't exist, aborting roll_droptable_tier!")
L656 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("# --ZLM 4.0--")
L657 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("# ZCP Loot Module revised succesfully activated.")
L660 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("# Additionnal NPC loot activated.")
L664 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("# Additionnal Stash loot activated.")
L667 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("# --May the loot be ever in your favor !--")
L12 🔴 global_write
Global write: ini_droptables
Impact: low
Show code
ini_droptables = ini_file("scripts\\zml_droptables.ltx")
L346 🟡 unused_local_variable
Local variable 'isbool' is assigned but never used
Impact: low
Show code
local loottable, isbool = roll_droptable_tier(category, ishuman, box)

[ Relax'ing ] The Movement Sound [ RMS ]

4 files (🟢0 🟡0 🔴30 🔵3)

eft_jump_sounds.script

L44 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
fake_ladders_woods = true, -- невидимая деревянная лестница
L55 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
jump_sound.volume = volume_setting
L88 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
material = ray:get(position ,direction).result.material_name
L2 🔴 global_write
Global write: available_materials
Impact: low
Show code
available_materials = {
L35 🔴 global_write
Global write: fake_materials
Impact: low
Show code
wooden_board = true, -- Деревянная доска (толщина 2-5см), деревянный вагон, ящик
L45 🔴 global_write
Global write: material
Impact: low
Show code
fake_slide = true, -- Материал для колижена (нет звука, следов от пуль, теней)
L47 🔴 global_write
Global write: jump_sound
Impact: low
L57 🔴 global_write
Global write: material
Impact: low
Show code
end
L59 🔴 global_write
Global write: land_sound
Impact: low
Show code
function actor_on_land(landing_speed)
L73 🔴 global_write
Global write: actor_position
Impact: low
Show code
-- material = ray_cast()
L74 🔴 global_write
Global write: position
Impact: low
Show code
-- -- printf("!Material name: %s", material)
L75 🔴 global_write
Global write: direction
Impact: low
Show code
-- end
L76 🔴 global_write
Global write: range
Impact: low
L77 🔴 global_write
Global write: flags
Impact: low
Show code
function ray_cast()
L78 🔴 global_write
Global write: ray
Impact: low
Show code
actor_position = vector():set(db.actor:position())
L83 🔴 global_write
Global write: material
Impact: low
Show code
ray = demonized_geometry_ray.geometry_ray({
L86 🔴 global_write
Global write: material
Impact: low
Show code
visualize = false
L89 🔴 global_write
Global write: position
Impact: low
L90 🔴 global_write
Global write: direction
Impact: low
Show code
if material then
L91 🔴 global_write
Global write: range
Impact: low
Show code
material = string.gsub(material, "materials\\" , "")
L92 🔴 global_write
Global write: ray
Impact: low
Show code
if fake_materials[material] and fake_materials[material] == true then
L97 🔴 global_write
Global write: material
Impact: low
Show code
ray = demonized_geometry_ray.geometry_ray({
L99 🔴 global_write
Global write: material
Impact: low
Show code
flags = flags,

eft_jump_sounds_mcm.script

L2 🔴 global_write
Global write: op
Impact: low
Show code
op ={ id= "eft_jump_sounds",sh=true ,gr =

footstep_according_moving_mode.script

L1 🔴 global_write
Global write: available_materials
Impact: low
Show code
available_materials = {
L39 🔴 global_write
Global write: possible_move_states
Impact: low
Show code
fake_ladders = { enable = false, sound_key = "", sound_total_count = 12, }, -- невидимая лестница
L50 🔴 global_write
Global write: current_move_state
Impact: low
L52 🔴 global_write
Global write: current_move_state
Impact: low
Show code
local material = string.gsub(material, "materials\\" , "")
L54 🔴 global_write
Global write: current_move_state
Impact: low
Show code
if IsMoveState('mcSprint') and possible_move_states.run == true then
L57 🔴 global_write
Global write: current_move_state
Impact: low
Show code
current_move_state = "crouch"
L64 🔴 global_write
Global write: sound
Impact: low

move_effects.script

L8 🔴 global_write
Global write: mvt_snd
Impact: low
Show code
mvt_snd = sound_object("anim_movements\\mvt_look_" .. math.random(1, 3))
L12 🔴 global_write
Global write: mvt_snd
Impact: low
Show code
mvt_snd = sound_object("anim_movements\\mvt_short_" .. math.random(1, 5))

[ Relax'ing ] The Rattle Weapon Sounds [ RWS ]

2 files (🟢1 🟡1 🔴13 🔵0)

Weapon_rattle.script

L5 🟢 table_insert_append
table.insert(sounds, v) -> sounds[#sounds+1] = v
Impact: high
Show code
table.insert(sounds, sound_object("weapons\\" .. prefix .. "_" .. i))
L11 🔴 global_write
Global write: total_sounds
Impact: low
Show code
total_sounds = 10 -- Adjust this to the number of sounds you have
L124 🟡 potential_nil_access
Potential nil access: 'actor' from db.actor() used without nil check
Impact: low
Show code
local wpn = actor:active_item()

rws_rattle.script

L10 🔴 global_write
Global write: wpn_kinds
Impact: low
Show code
wpn_kinds = {
L19 🔴 global_write
Global write: limit
Impact: low
Show code
limit = {
L57 🔴 global_write
Global write: count
Impact: low
Show code
count = 1
L63 🔴 global_write
Global write: count
Impact: low
Show code
count = count + 1
L64 🔴 global_write
Global write: count
Impact: low
Show code
if count > limit[class] then count = 1 end
L70 🔴 global_write
Global write: sec
Impact: low
Show code
sec = wpn:section()
L73 🔴 global_write
Global write: class
Impact: low
Show code
class = wpn_kinds[SYS_GetParam(0, sec, "kind")] or "rifle\\rifle_aim"
L74 🔴 global_write
Global write: weight
Impact: low
Show code
weight = ini_sys:r_string_ex(sec, "inv_weight") or 3.3
L75 🔴 global_write
Global write: aim_time
Impact: low
Show code
aim_time = ini_sys:r_string_ex(sec, "zoom_rotate_time") or 0.25
L76 🔴 global_write
Global write: volume
Impact: low
Show code
volume = (0.25 + weight*0.04)
L77 🔴 global_write
Global write: frequency
Impact: low
Show code
frequency = 1.3 - aim_time
L78 🔴 global_write
Global write: frequency
Impact: low
Show code
if frequency < 0.77 then frequency = 0.77 end

[Kmack] Mosin Trio

7 files (🟢5 🟡13 🔴21 🔵9)

animation_common.script

L31 🟢 table_insert_append
table.insert(anim_mutators, v) -> anim_mutators[#anim_mutators+1] = v
Impact: high
Show code
table.insert(anim_mutators, {functor=functor, priority=priority})
L88 🟢 repeated_item_section()
item:section() called 3x in actor_on_hud_animation_play
Impact: low
Show code
Cache item:section() result

aol_anim_transitions.script

L6 🟢 table_insert_append
table.insert(valid_anims, v) -> valid_anims[#valid_anims+1] = v
Impact: high
Show code
table.insert(valid_anims, anm_suffix)
L37 🟢 table_insert_append
table.insert(pattern_transitions[hud_section], v) -> pattern_transitions[hud_section][#pattern_transitions[hud_section]+1] = v
Impact: high
Show code
table.insert(pattern_transitions[hud_section], {
L99 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L128 🟡 string_concat_in_loop
String concat in loop: transition_anm = transition_anm .. x
Impact: critical
Show code
transition_anm = transition_anm .. anm_suffix
L15 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L32 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[ERROR] aol_anim_transitions: Could not add new transition (a parameter was nil)")
L3 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L10 🔴 global_write
Global write: transitions
Impact: low
Show code
transitions = {
L26 🔴 global_write
Global write: pattern_transitions
Impact: low
Show code
pattern_transitions = {
L162 🔴 global_write
Global write: valid_anims
Impact: low
Show code
valid_anims = {}
L51 🟡 unused_local_variable
Local variable 'result' is assigned but never used
Impact: low
Show code
local result, id, value = ini_items:r_line_ex(section,i,"","")

aol_sprint_cancel.script

L16 🔴 global_write
Global write: aol_anim_transitions_anm_transitions
Impact: low
Show code
aol_anim_transitions_anm_transitions = aol_anim_transitions.anm_transitions

lewd_lens_hider.script

L39 🟢 repeated_obj_section()
obj:section() called 3x in game_object_on_net_spawn
Impact: low
Show code
Cache obj:section() result
L68 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[LEWD LENS HIDER] ERROR | Game Object Net Spawn | Error with object with ID %s, the object was not found. Aborting...", id)
L191 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[LEWD LENS HIDER] ERROR | Get Information | Error with object with ID %s, the object was not found", id)
L197 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[LEWD LENS HIDER] ERROR | Get Information | Error with object with name %s, the object failed to cast as a weapon", obj:name())
L203 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[LEWD LENS HIDER] ERROR | Get Information | Error with object with name %s, the config %s was not defined", obj:name(), CONFIG_KEY_BONE_NAME)
L209 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[LEWD LENS HIDER] ERROR | Get Information | Error with object with name %s, the config %s should have %s elements, except it has %s", obj:name(), CONFIG_KEY_AIM_MODE, 3, size_table(aim_modes))
L236 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("[LEWD LENS HIDER] ERROR | Get Delays | Error with object with name %s, the config %s should have %s elements, except it has %s", obj:name(), CONFIG_KEY_AIM_MODE, 2, size_table(delays))
L256 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L45 🟡 potential_nil_access
Potential nil access: 'parent' from :parent() used without nil check
Impact: low
Show code
if not parent or parent:id() ~= AC_ID then

mosin_carbine_reload_script.script

L92 🔴 global_write
Global write: anm_handlers
Impact: low
Show code
anm_handlers = {
L115 🟡 potential_nil_access
Potential nil access: 'item' from :active_item() used without nil check
Impact: low
Show code
if not (item and SYS_GetParam(1, item:section(), "stripper_clip", false)) then
L136 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
if not (itm and IsWeapon(itm) and cache[itm:section()]) then
L139 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
local wpn = itm:cast_Weapon()
L147 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
local ammo_list = utils_item.get_ammo(nil,itm:id())
L148 🟡 potential_nil_access
Potential nil access: 'itm' from :active_item() used without nil check
Impact: low
Show code
local ammo_name = ammo_list[itm:get_ammo_type() + 1]
L7 🟡 unused_local_variable
Local variable 'play_holser_next' is assigned but never used
Impact: low
Show code
local play_holser_next = false
L9 🟡 unused_local_variable
Local variable 'hide_anim_time' is assigned but never used
Impact: low
Show code
local hide_anim_time = 0

shotgun_unjam_fix.script

L1 🔴 global_write
Global write: common
Impact: low
Show code
common = animation_common

uni_anim_detectors.script

L14 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = false
L18 🔴 global_write
Global write: fdda_anim_prepare
Impact: low
Show code
fdda_anim_prepare = enhanced_animations.anim_prepare
L20 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L24 🔴 global_write
Global write: fdda_call_my_slot_back
Impact: low
Show code
fdda_call_my_slot_back = enhanced_animations.call_my_slot_back
L28 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = false
L33 🔴 global_write
Global write: fdda_bp_call_my_slot_back
Impact: low
Show code
fdda_bp_call_my_slot_back = zzz_ea_addon_backpack.call_my_slot_back
L37 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = false
L50 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L63 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L71 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L85 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L98 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L113 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = true
L167 🔴 global_write
Global write: force_quick
Impact: low
Show code
force_quick = false
L122 🟡 potential_nil_access
Potential nil access: 'player_detector' from :active_detector() used without nil check
Impact: low
Show code
if player_detector and item:id() == player_detector:id() then
L160 🟡 potential_nil_access
Potential nil access: 'player_wpn' from :active_item() used without nil check
Impact: low
Show code
player_wpn and is_state_valid[player_wpn:get_state()]

demonized_craft_from_stashes

2 files (🟢4 🟡0 🔴2 🔵0)

craft_from_stashes_mcm.script

L2 🔴 global_write
Global write: op
Impact: low
Show code
op = {

zz_ui_workshop_craft_from_stashes.script

L18 🟢 table_insert_append
table.insert(self.objects, v) -> self.objects[#self.objects+1] = v
Impact: high
Show code
table.insert(self.objects, obj)
L22 🟢 table_insert_append
table.insert(self.objects, v) -> self.objects[#self.objects+1] = v
Impact: high
Show code
table.insert(self.objects, level.object_by_id(anomalous_stash.hidden_stash))
L74 🟢 table_insert_append
table.insert(ammoObjectsBySection[sec], v) -> ammoObjectsBySection[sec][#ammoObjectsBySection[sec]+1] = v
Impact: high
Show code
table.insert(ammoObjectsBySection[sec], obj)
L118 🟢 repeated_obj_id()
obj:id() called 4x in itr
Impact: low
Show code
Cache obj:id() result
L208 🔴 global_write
Global write: utils_item_collect_amount
Impact: low
Show code
utils_item_collect_amount = utils_item.collect_amount

ilrathCXV's Meat Spoiling Timer in Tooltips

1 file (🟢1 🟡0 🔴6 🔵0)

meat_spoiling.script

L67 🟢 repeated_obj_id()
obj:id() called 2x in actor_on_item_use
Impact: low
Show code
Cache obj:id() result
L16 🔴 global_write
Global write: expiration_time
Impact: low
Show code
expiration_time = nil
L17 🔴 global_write
Global write: expiration_table
Impact: low
Show code
expiration_table = {}
L20 🔴 global_write
Global write: meats
Impact: low
Show code
meats = utils_data.collect_section(ini_meat.ini, "meats", true)
L127 🔴 global_write
Global write: build_footer_base
Impact: low
Show code
build_footer_base = ui_item.build_desc_footer
L158 🔴 global_write
Global write: expiration_table
Impact: low
Show code
expiration_table = m_data.expiration_table or {}
L162 🔴 global_write
Global write: expiration_time
Impact: low
Show code
expiration_time = {

keep_ammo_highlighted

1 file (🟢1 🟡2 🔴0 🔵1)

d1sp_keep_ammo_highlighted_mcm.script

L371 🟢 repeated_obj_id()
obj:id() called 3x in handle_actor_item_to_slot
Impact: low
Show code
Cache obj:id() result
L158 🟡 string_concat_in_loop
String concat in loop: fmt = fmt .. x
Impact: critical
Show code
fmt = fmt .. string.format("%s, ", ammo[i])
L77 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("- [D1SP] | " .. fmt, ...)
L379 🟡 potential_nil_access
Potential nil access: 'item' from :item_in_slot() used without nil check
Impact: low
Show code
if item and (item:id() == obj:id()) then

npc_wound_tweak_v

2 files (🟢1 🟡0 🔴1 🔵0)

liz_wounded_redone.script

L125 🟢 repeated_npc_clsid()
npc:clsid() called 2x in npc_on_before_hit
Impact: low
Show code
Cache npc:clsid() result

y_npc_wounded_animation_fix_zombie_dont_drop_weapon.script

L2 🔴 global_write
Global write: orig_action_wounded_initialize
Impact: low
Show code
orig_action_wounded_initialize = xr_wounded.action_wounded.initialize

painterofthezone

7 files (🟢17 🟡29 🔴39 🔵5)

short_range_blood_bullet_time.script

L128 🟢 repeated_player_id()
player:id() called 4x in _on_before_hit_after_calcs
Impact: low
Show code
Cache player:id() result
L129 🟢 repeated_shooter_id()
shooter:id() called 3x in _on_before_hit_after_calcs
Impact: low
Show code
Cache shooter:id() result
L505 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L153 🔴 global_write
Global write: head_bones
Impact: low
Show code
head_bones = lookup:get_head_bones()
L164 🔴 global_write
Global write: tg
Impact: low
Show code
tg = time_global()
L167 🔴 global_write
Global write: grok_delay
Impact: low
Show code
grok_delay = tg + update_delay
L185 🔴 global_write
Global write: tg
Impact: low
Show code
tg = time_global()
L188 🔴 global_write
Global write: grok_delay
Impact: low
Show code
grok_delay = tg + update_delay
L211 🔴 global_write
Global write: tg
Impact: low
Show code
tg = time_global()
L214 🔴 global_write
Global write: grok_delay
Impact: low
Show code
grok_delay = tg + update_delay
L234 🔴 global_write
Global write: tg
Impact: low
Show code
tg = time_global()
L237 🔴 global_write
Global write: grok_delay
Impact: low
Show code
grok_delay = tg + update_delay
L374 🔴 global_write
Global write: tg
Impact: low
Show code
tg = time_global()
L414 🔴 global_write
Global write: tg
Impact: low
Show code
tg = time_global()
L128 🟡 potential_nil_access
Potential nil access: 'player' from db.actor() used without nil check
Impact: low
Show code
if target:id() == player:id() then return end
L129 🟡 potential_nil_access
Potential nil access: 'player' from db.actor() used without nil check
Impact: low
Show code
if shooter:id() ~= player:id() then return end
L131 🟡 potential_nil_access
Potential nil access: 'player' from db.actor() used without nil check
Impact: low
Show code
if not player:alive() then
L139 🟡 potential_nil_access
Potential nil access: 'player' from db.actor() used without nil check
Impact: low
Show code
if shooter:id() ~= player:id() then return true end
L149 🟡 potential_nil_access
Potential nil access: 'player' from db.actor() used without nil check
Impact: low
Show code
if shooter:id() ~= player:id() then return true end
L446 🟡 unused_local_variable
Local variable 'part_center' is assigned but never used
Impact: low
Show code
local part_center = particles_object("_samples_particles_\\flash_light")
L447 🟡 unused_local_variable
Local variable 'part_outside' is assigned but never used
Impact: low
Show code
local part_outside = {}

short_range_blood_dismemb.script

L178 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L21 🟡 potential_nil_access
Potential nil access: 'target_obj' from level.object_by_id() used without nil check
Impact: low
Show code
if target_obj and target_obj:get_bone_id(bone) then
L41 🟡 potential_nil_access
Potential nil access: 'player' from db.actor() used without nil check
Impact: low
Show code
if target:id() == player:id() then return end
L42 🟡 potential_nil_access
Potential nil access: 'player' from db.actor() used without nil check
Impact: low
Show code
if shooter:id() ~= player:id() then return end
L137 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
local wpn_pos = vector():set(wpn:bone_position("wpn_body"))
L15 🟡 unused_local_variable
Local variable 'mesh_map' is assigned but never used
Impact: low
Show code
local mesh_map = lookup:get_mesh_map()
L17 🟡 unused_local_variable
Local variable 'meshes_params' is assigned but never used
Impact: low
Show code
local meshes_params = lookup:get_meshes_params()

short_range_blood_lookup.script

L449 🟢 table_insert_append
table.insert(safe_cam_positions, v) -> safe_cam_positions[#safe_cam_positions+1] = v
Impact: high
Show code
table.insert(safe_cam_positions, cycle_cam_pos)
L450 🟢 table_insert_append
table.insert(safe_cam_directions, v) -> safe_cam_directions[#safe_cam_directions+1] = v
Impact: high
Show code
table.insert(safe_cam_directions, cycle_cam_dir)
L459 🟢 table_insert_append
table.insert(unsafe_cam_directions, v) -> unsafe_cam_directions[#unsafe_cam_directions+1] = v
Impact: high
Show code
table.insert(unsafe_cam_directions, reverse_cycle_cam_dir)
L460 🟢 table_insert_append
table.insert(unsafe_cam_positions, v) -> unsafe_cam_positions[#unsafe_cam_positions+1] = v
Impact: high
Show code
table.insert(unsafe_cam_positions, cycle_cam_pos)
L206 🟢 repeated_target_id()
target:id() called 4x in getGrokDefuckulatorKey
Impact: low
Show code
Cache target:id() result
L489 🟢 repeated_target_id()
target:id() called 4x in death_log_callback
Impact: low
Show code
Cache target:id() result
L520 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L16 🔴 global_write
Global write: n
Impact: low
Show code
n = floor(max(n or 1, 1))
L21 🔴 global_write
Global write: n
Impact: low
Show code
n = n - 1
L27 🔴 global_write
Global write: death_log
Impact: low
Show code
death_log = {}
L284 🔴 global_write
Global write: wpn
Impact: low
Show code
wpn = level.object_by_id(s_hit.weapon_id)
L285 🔴 global_write
Global write: sec
Impact: low
Show code
sec = wpn:section()
L302 🔴 global_write
Global write: silencer_boost
Impact: low
Show code
silencer_boost = 1.07
L304 🔴 global_write
Global write: silencer_boost
Impact: low
Show code
silencer_boost = 1
L308 🔴 global_write
Global write: silencer_boost
Impact: low
Show code
silencer_boost = 1.07
L331 🔴 global_write
Global write: ammo_mult
Impact: low
Show code
ammo_mult = 1.00
L334 🔴 global_write
Global write: ammo_mult
Impact: low
Show code
ammo_mult = 1.75
L206 🟡 potential_nil_access
Potential nil access: 'player' from db.actor() used without nil check
Impact: low
Show code
if target:id() == player:id() then return end
L207 🟡 potential_nil_access
Potential nil access: 'player' from db.actor() used without nil check
Impact: low
Show code
if shooter:id() ~= player:id() then return end
L281 🟡 potential_nil_access
Potential nil access: 'player' from db.actor() used without nil check
Impact: low
Show code
if target:id() == player:id() then return end
L282 🟡 potential_nil_access
Potential nil access: 'player' from db.actor() used without nil check
Impact: low
Show code
if shooter:id() ~= player:id() then return end
L285 🟡 potential_nil_access
Potential nil access: 'wpn' from level.object_by_id() used without nil check
Impact: low
Show code
sec = wpn:section()
L489 🟡 potential_nil_access
Potential nil access: 'player' from db.actor() used without nil check
Impact: low
Show code
if target:id() == player:id() then return end
L11 🟡 unused_local_variable
Local variable 'ltxOutfits' is assigned but never used
Impact: low
Show code
local ltxOutfits = ini_file("plugins\\wepl_hit_effect_outfits.ltx")
L317 🟡 unused_local_variable
Local variable 'wm_size' is assigned but never used
Impact: low
Show code
local wm_size = ini_sys:r_float_ex(ammo_section, "wm_size") or 0.05

short_range_blood_lookup_tables.script

L3 🔴 global_write
Global write: creatures_cls
Impact: low
Show code
creatures_cls = {
L22 🔴 global_write
Global write: creatures_kind
Impact: low
Show code
creatures_kind = {
L29 🔴 global_write
Global write: limb_map
Impact: low
Show code
limb_map = {
L1043 🔴 global_write
Global write: mesh_map
Impact: low
Show code
mesh_map = {
L1296 🔴 global_write
Global write: bone_groups
Impact: low
Show code
bone_groups = {
L1429 🔴 global_write
Global write: meshes_params
Impact: low
Show code
meshes_params = {
L1449 🔴 global_write
Global write: head_bones
Impact: low
Show code
head_bones = {
L1457 🔴 global_write
Global write: difficulty_multiplier
Impact: low
Show code
difficulty_multiplier = {
L1463 🔴 global_write
Global write: integrated_silencer
Impact: low
Show code
integrated_silencer = {
L1477 🔴 global_write
Global write: grok_headBones
Impact: low
Show code
grok_headBones = {
L1486 🔴 global_write
Global write: grok_head_bones
Impact: low
Show code
grok_head_bones = {
L1495 🔴 global_write
Global write: grok_upper_body_group
Impact: low
Show code
grok_upper_body_group = {
L1509 🔴 global_write
Global write: grok_lower_body_group
Impact: low
Show code
grok_lower_body_group = {

short_range_blood_particles.script

L276 🟢 table_insert_append
table.insert(playlist, v) -> playlist[#playlist+1] = v
Impact: high
Show code
table.insert(playlist, "dismemberment")
L288 🟢 table_insert_append
table.insert(playlist, v) -> playlist[#playlist+1] = v
Impact: high
Show code
table.insert(playlist, "headshot")
L297 🟢 table_insert_append
table.insert(playlist, v) -> playlist[#playlist+1] = v
Impact: high
Show code
table.insert(playlist, "hit")
L317 🟢 table_insert_append
table.insert(playlist, v) -> playlist[#playlist+1] = v
Impact: high
Show code
table.insert(playlist, "fingers")
L121 🟢 uncached_globals_summary
Cache 1 globals in play_hit_particle
Impact: medium
Show code
L124: math.random L130: math.random
L384 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L32 🔴 global_write
Global write: tg
Impact: low
Show code
tg = time_global()
L147 🔴 global_write
Global write: tg
Impact: low
Show code
tg = time_global()
L238 🔴 global_write
Global write: tg
Impact: low
Show code
tg = time_global()
L280 🔴 global_write
Global write: tg
Impact: low
Show code
tg = time_global()
L255 🟡 potential_nil_access
Potential nil access: 'player' from db.actor() used without nil check
Impact: low
Show code
if target:id() == player:id() then return true end
L256 🟡 potential_nil_access
Potential nil access: 'player' from db.actor() used without nil check
Impact: low
Show code
if shooter:id() ~= player:id() then return true end

short_range_blood_wm.script

L208 🟢 table_insert_append
table.insert(wms.enabled, v) -> wms.enabled[#wms.enabled+1] = v
Impact: high
Show code
table.insert(wms.enabled, wms.normal.name .. i)
L215 🟢 table_insert_append
table.insert(wms.enabled, v) -> wms.enabled[#wms.enabled+1] = v
Impact: high
Show code
table.insert(wms.enabled, wms.drip.name .. i)
L222 🟢 table_insert_append
table.insert(wms.enabled, v) -> wms.enabled[#wms.enabled+1] = v
Impact: high
Show code
table.insert(wms.enabled, wms.splash.name .. i)
L40 🟢 uncached_globals_summary
Cache 1 globals in draw_dismemberment_wm
Impact: medium
Show code
L69: math.random L70: math.random
L308 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L166 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
local ammo_list = utils_item.get_ammo(nil, wpn:id())
L167 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
local ammo_idx = wpn:get_ammo_type() + 1
L178 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
local wpn_pos = vector():set(wpn:bone_position("wpn_body"))
L265 🟡 potential_nil_access
Potential nil access: 'player' from db.actor() used without nil check
Impact: low
Show code
if target:id() == player:id() then return end
L266 🟡 potential_nil_access
Potential nil access: 'player' from db.actor() used without nil check
Impact: low
Show code
if shooter:id() ~= player:id() then return end
L298 🟡 potential_nil_access
Potential nil access: 'wpn' from :active_item() used without nil check
Impact: low
Show code
local wpn_pos = vector():set(wpn:bone_position("wpn_body"))

short_range_blood_wm_mcm.script

L1 🔴 global_write
Global write: op
Impact: low
Show code
op = {

xcvb's Guards Spawner

2 files (🟢6 🟡2 🔴2 🔵3)

emission_guard_patch.script

L1 🟢 uncached_globals_summary
Cache 1 globals in actor_on_first_update
Impact: medium
Show code
L4: tonumber L5: tonumber
L22 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ fixing squad IS guard: %s, cur_level: %s, send to %s", squad.id, squad_lname, smart_name)
L29 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf("~ fixing squad NOT guard, send to nil")

guards_spawner.script

L152 🟢 table_insert_append
table.insert(guarded_smarts[smart_name], v) -> guarded_smarts[smart_name][#guarded_smarts[smart_name]+1] = v
Impact: high
Show code
table.insert(guarded_smarts[smart_name], squad.id)
L108 🟢 uncached_globals_summary
Cache 1 globals in spawn_guard
Impact: medium
Show code
L135: math.random L137: math.random
L198 🟢 repeated_npc_id()
npc:id() called 4x in on_enemy_eval
Impact: low
Show code
Cache npc:id() result
L198 🟢 repeated_obj_id()
obj:id() called 3x in on_enemy_eval
Impact: low
Show code
Cache obj:id() result
L202 🟢 repeated_enemy_id()
enemy:id() called 3x in on_enemy_eval
Impact: low
Show code
Cache enemy:id() result
L292 🔵 debug_statement
Debug call: printf()
Impact: medium
Show code
printf(...)
L104 🔴 global_write
Global write: guarded_smarts
Impact: low
Show code
guarded_smarts = {}
L286 🔴 global_write
Global write: guarded_smarts
Impact: low
Show code
guarded_smarts = m_data.guarded_smarts or {}
L218 🟡 potential_nil_access
Potential nil access: 'npc_2' from level.object_by_id() used without nil check
Impact: low
Show code
if npc_2 and ( (npc:id() == obj:id() and npc_2:id() == enemy:id()) or (npc:id() == enemy:id() and npc_2:id() == obj:id()) ) then
L218 🟡 potential_nil_access
Potential nil access: 'npc_2' from level.object_by_id() used without nil check
Impact: low
Show code
if npc_2 and ( (npc:id() == obj:id() and npc_2:id() == enemy:id()) or (npc:id() == enemy:id() and npc_2:id() == obj:id()) ) then