From: Jason Self Date: Mon, 30 May 2022 02:27:25 +0000 (-0700) Subject: Add check of lantern_fuel_left > 0 for throw_rock X-Git-Tag: r2~7 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=5dba16f603d4f0b0f7e699957f22b51ac858b26e;p=snowed-in.git Add check of lantern_fuel_left > 0 for throw_rock This avoids a bug where the grue can break the lantern multiple times. --- diff --git a/src/snowed-in.inf b/src/snowed-in.inf index 42b27c3..0c4ce1a 100644 --- a/src/snowed-in.inf +++ b/src/snowed-in.inf @@ -573,8 +573,9 @@ Object southofcabin "South Of Cabin" check_for_cabin_lighting(); ! } if (snowshoes has worn && lantern in player && eastofcabin hasnt - visited) { + visited && lantern_fuel_left > 0) { throw_rock(); + print "^"; } ], n_to frontdoor, @@ -868,8 +869,10 @@ Object eastofcabin "East Of Cabin" with description [; print "It's dark outside. "; check_for_cabin_lighting(); - if (cabin_has_electricity == 1 && lantern in player) { + if (cabin_has_electricity == 1 && lantern in player && lantern_fuel_left + > 0) { throw_rock(); + print "^"; } ], w_to window,