/proc
{
InitItemLists()
{
for(var/T in typesof(/obj/item)){ //Get types of ALL items in game.
var/obj/item/I = new T // Create one
if(I.rarity == 1){ //Check rarity
world << "[I.name]"; //debug
}
}
}
Problem description:
Proc either isn't ending or takes ages to complete, without printing to world. A proc that executes after the shown proc doesn't get to completion. No errors on compile or at runtime - the expected messages to world don't show up either.
The intent here is to be able to create items in the code and have their types added to the proper lists at runtime without any manual maintenance whatsoever. If at all possible, without creating objects to reduce overhead.
EDIT: /obj/item/var/rarity = 1. In all cases, for testing purposes. I am attempting to modify existing code to be more flexible in the future.
(If this was too early, tell me and I'll avoid early bumps in the future.)