X-Git-Url: https://jxself.org/git/?p=grue-hunter.git;a=blobdiff_plain;f=objects%2Flantern.inf;fp=objects%2Flantern.inf;h=8805f6bd7790aba4d7801b5c175b326c8f52c74b;hp=0000000000000000000000000000000000000000;hb=3861ae43ef5e739e26b5803297f8cf5a960e21dc;hpb=724ecd13809373c2e0f93c96d55b78987a4780eb diff --git a/objects/lantern.inf b/objects/lantern.inf new file mode 100644 index 0000000..8805f6b --- /dev/null +++ b/objects/lantern.inf @@ -0,0 +1,53 @@ +! This file is part of Grue Hunter. +! +! Grue Hunter is free software: you can redistribute it and/or modify it +! under the terms of the GNU Affero General Public License as published +! by the Free Software Foundation, either version 3 of the License, or +! (at your option) any later version. +! +! Grue Hunter is distributed in the hope that it will be useful, but +! WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +! Affero General Public License for more details. +! +! You should have received a copy of the GNU Affero General Public +! License along with Grue Hunter. If not, see +! . +!=================================================================== +Object lantern "copper lantern" backpack +with name 'lantern' 'copper' 'lamp' 'light', + description [; + print "This is an exceptionally beautiful lamp. About + eleven inches high, with a base of about 5 inches or so in diameter + and a large, brass-closed hook at the top. The glass in the lamp has a + fresnel type of design, which is used to distribute light widely. It + appears to have been damaged in your fall and "; + + if (fuel_left > 0) print "is leaking fuel. "; + else print "all the fuel has leaked out. "; + + print "The words ~Manufactured By The Frobozz Magic + Lantern Company~ are engraved in the base.^^"; + ], + + time_left, + time_out [; + if (lantern has on) print "The lantern has run out of fuel and is now off."; + fuel_left = 0; + give lantern ~on; + give lantern ~light; + ], + + after [; + SwitchOn: + if (fuel_left > 0) give lantern light; + else { + print "The lantern is out of fuel and cannot be turned on. + Perhaps there is a place to refuel?^"; + rtrue; + } + SwitchOff: + give lantern ~light; + ], + +has switchable;