Add proto_user_is_librarian

This commit is contained in:
Alexander Batalov 2023-07-23 10:10:09 +03:00
parent c652312157
commit 4eaea0e3c0
3 changed files with 32 additions and 0 deletions

View File

@ -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)
{

8
src/mapper/mp_proto.cc Normal file
View File

@ -0,0 +1,8 @@
#include "mapper/mp_proto.h"
namespace fallout {
// 0x559C60
bool can_modify_protos = false;
} // namespace fallout

10
src/mapper/mp_proto.h Normal file
View File

@ -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_ */