+static uint8_t get_lowest_unused_id()
+{
+ uint8_t i = 0;
+ while (1)
+ {
+ if (!get_thing(world.things, i, 1))
+ {
+ return i;
+ }
+ exit_err(i == UINT8_MAX, "No unused ID available to add new thing.");
+ i++;
+ }
+}
+
+
+
+extern struct Thing * get_thing(struct Thing * ptr, uint8_t id, uint8_t deep)