station/assets/scripts/furnace.rn

15 lines
421 B
Plaintext
Raw Normal View History

// Lighting the furnace is cosmetic for now, but burns a log.
pub fn toggle(ctx) {
if ctx.variant() == "lit" {
ctx.set_variant("");
ctx.message("You let the furnace cool down.");
return;
}
if !ctx.take_item("log", 1) {
ctx.message("You need a log to light the furnace.");
return false;
}
ctx.set_variant("lit");
ctx.message("The furnace roars to life.");
}