diff --git a/src/mapper/mapper.cc b/src/mapper/mapper.cc index b74fbef..e5f20b6 100644 --- a/src/mapper/mapper.cc +++ b/src/mapper/mapper.cc @@ -8,13 +8,16 @@ #include "draw.h" #include "game_mouse.h" #include "inventory.h" +#include "mapper/mp_proto.h" #include "object.h" #include "proto.h" +#include "settings.h" #include "svga.h" #include "window_manager.h" namespace fallout { +static bool proto_user_is_librarian(); static void redraw_toolname(); static void clear_toolname(); static void update_high_obj_name(Object* obj); @@ -30,6 +33,17 @@ unsigned char* tool; // 0x6EC4AC int tool_win; +// 0x487784 +bool proto_user_is_librarian() +{ + if (!settings.mapper.librarian) { + return false; + } + + can_modify_protos = true; + return true; +} + // 0x48B16C void print_toolbar_name(int object_type) { diff --git a/src/mapper/mp_proto.cc b/src/mapper/mp_proto.cc new file mode 100644 index 0000000..3e89993 --- /dev/null +++ b/src/mapper/mp_proto.cc @@ -0,0 +1,8 @@ +#include "mapper/mp_proto.h" + +namespace fallout { + +// 0x559C60 +bool can_modify_protos = false; + +} // namespace fallout diff --git a/src/mapper/mp_proto.h b/src/mapper/mp_proto.h new file mode 100644 index 0000000..2bf6e8d --- /dev/null +++ b/src/mapper/mp_proto.h @@ -0,0 +1,10 @@ +#ifndef FALLOUT_MAPPER_MP_PROTO_H_ +#define FALLOUT_MAPPER_MP_PROTO_H_ + +namespace fallout { + +extern bool can_modify_protos; + +} // namespace fallout + +#endif /* FALLOUT_MAPPER_MP_PROTO_H_ */