0
10
Look at
Drop
Fill
Drink from
Empty
if (this.full = this.capacity) {
msg ("It is already full.")
}
else if (not GetBoolean(game.pov.parent, "watersource")) {
msg ("Nothing to fill it with here.")
}
else {
if (this.full > 0 and not this.liquidtype = game.pov.parent.liquidtype) {
MixLiquid(this, game.pov.parent.liquidtype)
}
else {
msg ("You fill it with " + game.pov.parent.liquidtype + ".")
this.liquidtype = game.pov.parent.liquidtype
}
this.full = this.capacity
}
if (this.full = 0) {
msg ("It is already empty.")
}
else if (HasScript(game.pov.parent, "handle_emptying")) {
game.pov.parent.emptiedliquidtype = this.liquidtype
this.full = 0
do(game.pov.parent, "handle_emptying")
}
else {
msg ("You empty it.")
this.full = 0
}
if (this.full = 0) {
msg ("It is empty.")
}
else {
DrinkLiquid(this.liquidtype)
this.full = this.full - 1
}
msg ("You fill it with " + game.pov.parent.liquidtype + ".")
container.liquidtype = liquidtype
msg ("You take a drink from it.")
fill
fill
"You can't fill " + object.article + "."
empty
empty
"You can't empty " + object.article + "."
drinkfrom
drink from
"You can't drink from " + object.article + "."
_ObjectEditor
Liquids
dropdowntypes
Type
*=None; liquidcontainer=Container
150
editor_object
number
Maximum capacity
capacity
100
liquidcontainer
0
number
Starting volume
full
100
liquidcontainer
0
textbox
Name of starting liquid
liquidtype
liquidcontainer
checkbox
Source of liquid here
watersource
editor_room
textbox
Name of liquid
liquidtype
editor_room
script
Run this script when a container is emptied (the "emptiedliquidtype" attribute of the room will be set)
handle_emptying
editor_room