[Package Index | Mudlib Index | Effect Index]

File /obj/meltable.c


This is an inheritable for frozen food which melts, based on the temperature of the room environment in which it finds itself.

It performs just as normal food, apart from the following:

- It cannot be cured or dried

- It does not decay

- It cannot be forced to behave as a liquid

- When applied or eaten, it will cause a brief decrease in temperature of the user.

It will melt into a liquid, which can be set using set_melt_result() and queried using query_melt_result(). It defaults to water.

The melt level can be checked using query_melt_level(). This starts at a value of ten times the original weight of the meltable food.

The rate of melting adjusts itself regularly, based on the temperature. This can be checked with query_melt_rate().

The level of melting is shown in the long and short of the object. These are created using query_short_rotten_adjective and query_long_decay_level, and calculated using the melt level and the original melt level. The level of melting is independent of the amount of the food that has been eaten or cut up.

(Technical note: the melt level and original melt level are not adjusted when a meltable object is cut into pieces, nor when part of it is eaten. This doesn't affect anything except that the messages in the long and short which tell you how melted something is will change more slowly than they would otherwise, ie if the food had been smaller to start with.)

Written by Carmine

Inherits

This class inherits the following classes /obj/food.c

Includes

This class includes the following files /include/weather.h and /include/bits_controller.h