Update to serial 210617
[snowed-in.git] / src / snowed-in.inf
index 30b804332afbb11607492f09a7e612c2ae4ac2dc..6929991915271571ab3a8b2dd6f100656702551b 100644 (file)
@@ -23,7 +23,7 @@ Constant Headline
     ^Ongoing development: https://jxself.org/git/?p=snowed-in.git
     ^Send bugs and feedback by email to j@@64jxself.org.
     ^IFID DE9FA2E5-4EC7-4166-9218-E56EFA1DF40F
-    ^Copyright (C) 2021 Jason Self
+    ^Copyright (C) 2021 Jason Self <j@@64jxself.org>
     ^You can change and share this game under the terms of the GNU 
     Affero General Public License as published by the Free Software 
     Foundation (FSF), either version 3 of the License, or (at your 
@@ -35,7 +35,8 @@ Constant Headline
 Include "parser";
 Include "verblib";
 Release 0;
-Serial "210501";
+Serial "210617";
+Include "src/forest.inf";
 
 Object  mainroom "Main Room"
   with  description 
@@ -158,8 +159,8 @@ Object  lantern "copper lantern" coffeetable
 Object  television "flat-screen TV" mainroom
   with  name 'TV' 'television' 'flat' 'screen' 'flat-screen',
   with  description 
-             "The flat-screen TV looks fairly modern but it's been 
-             broken in a fight and the screen is dangling out.",
+            "The flat-screen TV looks fairly modern but it's been 
+            broken in a fight and the screen is dangling out.",
         before [;
           Take, Pull, Push, PushDir, Turn:
             print_ret (The) self, " is firmly mounted to the wall.";
@@ -205,6 +206,7 @@ Object  lightsocket "light socket" mainroom
                 give kitchenette light;
                 give bedroom light;
                 give eastofcabin light;
+                give southofcabin light;
             }
         ],
   has   scenery container transparent open;
@@ -220,6 +222,7 @@ Object  lightbulb "light bulb" lightsocket
                     give kitchenette light;
                     give bedroom light;
                     give eastofcabin light;
+                    give southofcabin light;
                 }
                 else {
                     print_ret 
@@ -241,6 +244,7 @@ Object  lightbulb "light bulb" lightsocket
             give kitchenette ~light;
             give bedroom ~light;
             give eastofcabin ~light;
+            give southofcabin ~light;
         ],
   has   switchable on;
 
@@ -463,11 +467,10 @@ Object  snowsuit "snowsuit" suitcase
             kitchenette && location ~= bedroom && location ~= thedark &&
             snowsuit hasnt worn) {
                 body_temperature = --body_temperature;
-                print body_temperature;
             }
             if (location == mainroom || location == office || location ==
-            kitchenette || location == bedroom || location ~= thedark ||
-            snowsuit has worn && body_temperature < 20) {
+            kitchenette || location == bedroom || snowsuit has worn && body_temperature
+            < 20) {
                 body_temperature = ++body_temperature;
             }
             if (body_temperature == 0) {
@@ -547,45 +550,62 @@ Object  snowshoes "snowshoes" bedroom
         ],
   has   pluralname clothing;
 
-Object  southofcabin "South Of Cabin"
+Forest  southofcabin "South Of Cabin"
   with  description [;
             print "The wind is howling, and there's snow flying everywhere.";
             if (snowsuit hasnt worn)
                 print 
                     " It's really cold and 
                     you're not dressed for this weather.";
-            print 
-                " The snow stings your face and you 
-                can barely see three feet in front of you.^";
+            if (frontdoor has open) {
+                check_for_cabin_lighting();
+            }
         ],
         n_to frontdoor,
         e_to eastofcabin,
+        w_to westofcabin,
   has   light;
 
-Object  eastofcabin "East Of Cabin"
+[ check_for_cabin_lighting;
+    if (lightbulb has on) {
+        print 
+            "The light from inside the cabin only penetrates 
+            a few feet from the building. ";
+    }
+    else
+        if (lantern in player && lantern has on) {
+            print 
+                "The lantern provides the only source of 
+                light. ";
+        }
+    if (location has light)
+        print 
+            "The snow stings your face and you can barely see three feet in 
+            front of you. ";
+    if (snowshoes in player && snowshoes has worn) {
+        print 
+            "The snowshoes are doing their job by making sure 
+            you don't sink into the snow.^";
+    }
+];
+
+Forest  eastofcabin "East Of Cabin"
   with  description [;
             print "It's dark outside. ";
-            if (lightbulb has on) {
-                print 
-                    "The light from inside the cabin only penetrates 
-                    a few feet from the building. ";
-            }
-            else
-                if (lantern in player && lantern has on) {
-                    print 
-                        "The lantern provides the only source of 
-                        light. ";
-                }
-            if (snowshoes in player && snowshoes has worn) {
-                print 
-                    "The snowshoes are doing their job by making sure 
-                    you don't sink into the snow.^";
-            }
+            check_for_cabin_lighting();
         ],
         w_to window,
         s_to southofcabin,
   has   light;
 
+Forest  westofcabin "Westh Of Cabin"
+  with  description 
+            "The snow is falling so fast that you can barely see 
+            anything. You can't even be sure you're going in the right 
+            direction.",
+        s_to southofcabin,
+  has   light;
+
 [ Initialise;
     Location = mainroom;
     thedark.description = 
@@ -668,9 +688,9 @@ Object  grue "grue" thedark
                   4:
                     "^You hear the sound of shuffling feet outside.";
                   5:
-                    "^You hear a deep guttural sound from outside that sends a chill down your spine.";
-                  6:
                     "^You hear something sniffing around the cabin.";
+                  6:
+                    "^You hear a deep guttural sound from outside that sends a chill down your spine.";
                   7:
                     "^You hear something scratching on the cabin walls from outside.";
                   8:
@@ -698,6 +718,7 @@ Object  grue "grue" thedark
                 give kitchenette ~light;
                 give bedroom ~light;
                 give eastofcabin ~light;
+                give southofcabin ~light;
             }
             return true;
         ],