- struct Monster * other_monster;
- for (other_monster = world->monster;
- other_monster != 0;
- other_monster = other_monster->map_obj.next)
+ update_log("\nYou drop an object.");
+ world.inventory_sel = world.inventory_sel - (0 < world.inventory_sel);
+}
+
+
+
+static void playerbonus_pick(uint8_t picked)
+{
+ if (picked)
+ {
+ update_log("\nYou pick up an object.");
+ return;
+ }
+ update_log("\nYou try to pick up an object, but there is none.");
+}
+
+
+
+static void playerbonus_use(uint8_t no_object, uint8_t wrong_object)
+{
+ if (no_object)
+ {
+ update_log("\nYou try to use an object, but you own none.");
+ return;
+ }
+ else if (wrong_object)
+ {
+ update_log("\nYou try to use this object, but fail.");
+ return;
+ }
+ update_log("\nYou consume MAGIC MEAT.");
+ world.inventory_sel = world.inventory_sel - (0 < world.inventory_sel);
+}
+
+
+
+extern void init_map_object_actions()
+{
+ char * f_name = "init_map_object_actions()";
+ char * path = "config/map_object_actions";
+ FILE * file = try_fopen(path, "r", f_name);
+ uint16_t linemax = textfile_sizes(file, NULL);
+ char line[linemax + 1];
+ struct MapObjAct ** moa_ptr_ptr = &world.map_obj_acts;
+ char * delim = " ";
+ while (fgets(line, linemax + 1, file))