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 = "
  • [VV_HREF_TARGET_1V(D, VV_HK_LIST_EDIT, "E", index)][VV_HREF_TARGET_1V(D, VV_HK_LIST_CHANGE, "C", index)][VV_HREF_TARGET_1V(D, VV_HK_LIST_REMOVE, "-", index)] " else header = "
  • [VV_HREF_TARGET_1V(D, VV_HK_BASIC_EDIT, "E", name)][VV_HREF_TARGET_1V(D, VV_HK_BASIC_CHANGE, "C", name)][VV_HREF_TARGET_1V(D, VV_HK_BASIC_MASSEDIT, "M", name)] " diff --git a/code/modules/paperwork/notepad.dm b/code/modules/paperwork/notepad.dm index 04a3d765ea1d..bbfec5428830 100644 --- a/code/modules/paperwork/notepad.dm +++ b/code/modules/paperwork/notepad.dm @@ -118,6 +118,9 @@ else to_chat(usr, SPAN_NOTICE("You need to hold it in your hands!")) +/obj/item/notepad/proc/operator[](index_num) + return contents[index_num] + /obj/item/notepad/verb/rename() set name = "Rename notepad" set category = "Object" diff --git a/code/modules/paperwork/paper_bundle.dm b/code/modules/paperwork/paper_bundle.dm index 78ba3c8a7e72..c0d9bee3aa85 100644 --- a/code/modules/paperwork/paper_bundle.dm +++ b/code/modules/paperwork/paper_bundle.dm @@ -175,6 +175,9 @@ else to_chat(usr, SPAN_NOTICE("You need to hold it in your hands!")) +/obj/item/paper_bundle/proc/operator[](index_num) + return contents[index_num] + /obj/item/paper_bundle/verb/rename() set name = "Rename bundle" set category = "Object"