diff --git a/code/__pragmas.dm b/code/__pragmas.dm index 84fcc0dfc307..309883fbda20 100644 --- a/code/__pragmas.dm +++ b/code/__pragmas.dm @@ -21,6 +21,7 @@ #pragma InvalidOverride error #pragma DanglingVarType error #pragma MissingInterpolatedExpression error +#pragma InvalidIndexOperation error //3000-3999 #pragma EmptyBlock error diff --git a/code/datums/components/_component.dm b/code/datums/components/_component.dm index f356fc5c1077..24cf93ed119f 100644 --- a/code/datums/components/_component.dm +++ b/code/datums/components/_component.dm @@ -362,7 +362,8 @@ var/datum/component/C = dc[c_type] if(C) if(length(C)) - C = C[1] + var/list/component_list = C + C = component_list[1] if(C.type == c_type) return C return null diff --git a/code/game/machinery/vending/cm_vending.dm b/code/game/machinery/vending/cm_vending.dm index d4f56504be72..db173e7b1608 100644 --- a/code/game/machinery/vending/cm_vending.dm +++ b/code/game/machinery/vending/cm_vending.dm @@ -1307,7 +1307,8 @@ GLOBAL_LIST_INIT(cm_vending_gear_corresponding_types_list, list( var/obj/item/item_ref = myprod[3] var/priority = myprod[priority_index] if(islist(item_ref)) // multi-vending - item_ref = item_ref[1] + var/list/ref_list = item_ref + item_ref = ref_list[1] var/is_category = item_ref == null diff --git a/code/modules/admin/view_variables/debug_variables.dm b/code/modules/admin/view_variables/debug_variables.dm index f099db67c717..356843918f2d 100644 --- a/code/modules/admin/view_variables/debug_variables.dm +++ b/code/modules/admin/view_variables/debug_variables.dm @@ -4,11 +4,12 @@ var/header if(D) if(islist(D)) + var/list/var_list = D var/index = name if (value) - name = D[name] //name is really the index until this line + name = var_list[name] //name is really the index until this line else - value = D[name] + value = var_list[name] header = "