home · contact · privacy
Server: Make objects definable as "consumable" to gain n hitpoints.
[plomrogue] / src / server / map_objects.c
index 97fbc323c736fa84e1070fefddb0570e12e1815d..f60cefeb3092b7df42c3b5c8c7a3ea7c78330a4c 100644 (file)
@@ -142,6 +142,9 @@ extern void init_map_object_defs()
         line[strlen(line) - 1] = '\0';
         mod->name = try_malloc(strlen(line) + 1, f_name);
         memcpy(mod->name, line, strlen(line) + 1);
+        err_try_fgets(line, linemax, file, context, "0nfi");
+        err_line(atoi(line) > UINT8_MAX, line, context, err_toolarge);
+        mod->consumable = atoi(line);
         * last_mod_ptr_ptr = mod;
         last_mod_ptr_ptr = &mod->next;
         err_try_fgets(line, linemax, file, context, "d");