blob: 42345a43962d48422f0b16694b1176cb2105a2ee [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001// MorgenGrauen MUDlib
2//
3// mini_props.c -- Abgespeckte Verwaltung von Props
4// Aus Sicherheitsgruenden darf hier nicht die "Vollversion"
5// mit echten Properties stehen
6//
7// $Id$
8#pragma strict_types,save_types
9#pragma no_clone
10#pragma no_shadow
11#pragma pedantic,range_check,warn_deprecated
12
13#define NEED_PROTOTYPES
14#include <thing/properties.h>
15#undef NEED_PROTOTYPES
16
17nosave mapping prop;
18
19private void InitProps()
20{
21 prop = m_allocate(2,1);
22}
23
24
25public varargs mixed Query( string str, int type )
26{
27 if ( !mappingp(prop) )
28 InitProps();
29
30 return prop[str];
31}
32
33public varargs mixed Set(string name, mixed value, int type, int extern)
34{
35 if ( !mappingp(prop) )
36 InitProps();
37
38 return prop[name] = value;
39}
40