Beispiel fuer call_out().
Change-Id: I82b6f797f0697380232608b9bf4b8ecd521314a3
diff --git a/README b/README
index baf40e3..e7308e4 100644
--- a/README
+++ b/README
@@ -73,6 +73,8 @@
13. Ein weiteres Beispiel fuer eine dynamische Langbeschreibung, dynamisches
Detail. Ausserdem ein NPC, der eine selbstdefinierte Prop benutzt.
room/huette13.c
+14. Ein Beispiel fuer einen Call_out.
+ room/huette14.c
B. Unser erster eigener NPC
diff --git a/room/huette14.c b/room/huette14.c
new file mode 100644
index 0000000..9aac6a3
--- /dev/null
+++ b/room/huette14.c
@@ -0,0 +1,36 @@
+inherit "/std/room";
+
+#include __PATH__(1)"defs.h"
+
+private void delayed();
+
+
+protected void create() {
+ ::create();
+
+ SetProp(P_INT_SHORT, "Eine schummrige Huette");
+ SetProp(P_INT_LONG, BSLF(
+ "Noch ein leerer Raum. Moment - nicht ganz, da ist ein haesslicher Fleck "
+ "auf dem Boden.");
+
+ SetProp(P_LIGHT, 1);
+ SetProp(P_INDOORS, 1);
+ SetProp(P_LIGHT_TYPE, LT_GLOWING);
+
+ AddDetail("fleck", function string() {
+ if (find_call_out(#'delayed) == -1)
+ call_out(#'delayed, 3);
+ else
+ return BSLF("Nicht so schnell hintereinander! Willst Du das Mud mit "
+ "Callouts fluten?");
+
+ return BSLF("Ja, dieser Fleck ist wirklich haesslich.");
+ });
+}
+
+private void delayed() {
+ if (ENV(TP) == TO)
+ tell_object(TP, BSPS(
+ "WER IST HIER HAESSLICH?!",
+ "Eine Stimme droehnt: "));
+}