A10. Controller source: lines 316-350
Object descriptions, pickups, drops and the door.
if noun.is_empty():
reply("Please name one thing: for example, LOOK KEY.")
elif not present(noun):
reply("You can't see that here.")
else:
act(verb, noun)func act(verb: String, noun: String) -> void:
if verb in ["look", "read"]:
var descriptions: Dictionary = {
"key":"A small brass key. It should fit the cabin door.",
"fuse":"A spare fuse, just right for the transmitter.",
"door":"A locked wooden door leading north.",
"note":"The note reads: 'Morgan has left the key on "
+ "the bench. Spare fuse inside. Send the warning.'",
"radio":"An old transmitter with an empty fuse holder.",
"morgan":"Morgan, the station operator, looks worried."
}
if noun == "door" and bool(Runtime.variables.ta_unlocked):
reply("The cabin door is unlocked.")
elif noun == "radio" and bool(Runtime.variables.ta_fuse_fitted):
reply("The fuse is fitted. The radio is ready to switch on.")
else:
reply(str(descriptions[noun]))
elif verb in ["take", "drop"] and noun in ["key", "fuse"]:
var item_id: String = "brass_key" if noun == "key" else "fuse"
if verb == "take":
if HasInventory(item_id):
reply("You already have it.")
return
Runtime.add_inventory(item_id)
Runtime.variables["ta_" + noun + "_room"] = "carried"
award("ta_found_" + noun, 1)
reply("Taken.")
elif HasInventory(item_id):Continue directly with the next source block.
