diff --git a/config/fxdata/objects.cfg b/config/fxdata/objects.cfg index 858a1d0f28..cc3275e446 100644 --- a/config/fxdata/objects.cfg +++ b/config/fxdata/objects.cfg @@ -27,6 +27,8 @@ LightUnaffected = 0 LightIntensity = 0 ; The range of the light in subtiles. 0~255. LightRadius = 0 +; Unknown light properties. Possible flag values 0~255, where powers of 2 are unique properties. +LightFlags = 0 ; The type of light. 0: disabled, 1: enabled. LightIsDynamic = 0 ; The icon that represents the icon on the map. -1 is used for custom. @@ -98,6 +100,7 @@ FallAcceleration = 0 LightUnaffected = 1 LightIntensity = 50 LightRadius = 6 +LightFlags = 5 LightIsDynamic = 0 AmbienceSound = 78 RandomStartFrame = 1 @@ -151,6 +154,7 @@ FallAcceleration = 20 LightUnaffected = 1 LightIntensity = 47 LightRadius = 7 +LightFlags = 5 LightIsDynamic = 0 AmbienceSound = 78 RandomStartFrame = 0 @@ -181,6 +185,7 @@ LightUnaffected = 0 MapIcon = 512 LightIntensity = 36 LightRadius = 14 +LightFlags = 5 LightIsDynamic = 1 RandomStartFrame = 0 DrawClass = 2 @@ -737,6 +742,7 @@ FallAcceleration = 0 LightUnaffected = 1 LightIntensity = 46 LightRadius = 6 +LightFlags = 5 LightIsDynamic = 0 AmbienceSound = 78 RandomStartFrame = 1 @@ -1234,6 +1240,7 @@ FallAcceleration = 0 LightUnaffected = 1 LightIntensity = 40 LightRadius = 10 +LightFlags = 5 LightIsDynamic = 0 AmbienceSound = 973 RandomStartFrame = 0 diff --git a/src/config_objects.c b/src/config_objects.c index 86aa559cd0..f015582863 100644 --- a/src/config_objects.c +++ b/src/config_objects.c @@ -83,6 +83,7 @@ const struct NamedCommand objects_object_commands[] = { {"FLAMEANIMATIONSIZE", 35}, {"FLAMEANIMATIONOFFSET", 36}, {"FLAMETRANSPARENCYFLAGS", 37}, + {"LIGHTFLAGS", 38}, {NULL, 0}, }; @@ -763,6 +764,19 @@ TbBool parse_objects_object_blocks(char *buf, long len, const char *config_textn CONFWRNLOG("Incorrect value of \"%s\" parameter in [%s] block of %s file.", COMMAND_TEXT(cmd_num), block_buf, config_textname); } + case 38: // LIGHTFLAGS + if (get_conf_parameter_single(buf, &pos, len, word_buf, sizeof(word_buf)) > 0) + { + k = atoi(word_buf); + objst->ilght.flags = k; + n++; + } + if (n <= 0) + { + CONFWRNLOG("Incorrect value of \"%s\" parameter in [%s] block of %s file.", + COMMAND_TEXT(cmd_num), block_buf, config_textname); + } + break; case 0: // comment break; case -1: // end of buffer @@ -961,15 +975,6 @@ int get_required_room_capacity_for_object(RoomRole room_role, ThingModel objmode return 0; } -void init_objects(void) -{ - game.conf.object_conf.object_cfgstats[ObjMdl_Torch].ilght.flags = 5; - game.conf.object_conf.object_cfgstats[ObjMdl_HeroGate].ilght.flags = 5; - game.conf.object_conf.object_cfgstats[ObjMdl_StatueLit].ilght.flags = 5; - game.conf.object_conf.object_cfgstats[ObjMdl_SoulCountainer].ilght.flags = 5; - game.conf.object_conf.object_cfgstats[ObjMdl_Candlestick].ilght.flags = 5; -} - /******************************************************************************/ #ifdef __cplusplus } diff --git a/src/config_objects.h b/src/config_objects.h index 179ae9dc70..875948a6a0 100644 --- a/src/config_objects.h +++ b/src/config_objects.h @@ -135,7 +135,6 @@ ThingClass crate_to_workshop_item_class(ThingModel tngmodel); ThingModel crate_to_workshop_item_model(ThingModel tngmodel); ThingClass crate_thing_to_workshop_item_class(const struct Thing *thing); ThingModel crate_thing_to_workshop_item_model(const struct Thing *thing); -void init_objects(void); int get_required_room_capacity_for_object(RoomRole room_role, ThingModel objmodel, ThingModel relmodel); void update_all_object_stats(); /******************************************************************************/ diff --git a/src/main.cpp b/src/main.cpp index 1caaec9361..f39399d870 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1012,7 +1012,6 @@ void init_keeper(void) SYNCDBG(8,"Starting"); engine_init(); init_iso_3d_conversion_tables(); - init_objects(); init_colours(); init_spiral_steps(); init_key_to_strings();