FueledLightSourceclass | fueled.t[35]

A FueledLightSource is a light source that stars out with a set amount of fuel, which is then consumed at one unit per turn. Once the fuel is exhausted the FueledLightSource goes out and can't be re-lit until it has been refueled. [PART OF FUELED EXTENSION]

`class FueledLightSource : object`

Superclass Tree (in declaration order)

`FueledLightSource`
`object`

Subclass Tree

(none)

Global Objects

(none)

Summary of Properties

`burnedOutMsg fuelDaemonID fuelLevel fuelSource plungedIntoDarknessMsg wontLightMsg`

Summary of Methods

`fuelDaemon makeLit removeFuelSource sayBurnedOut showWarning startFuelDaemon stopFuelDaemon`

Properties

`burnedOutMsg` | `fueled.t[123]`

If our going out has left the player character in darkness, say so.

`fuelDaemonID` | `fueled.t[49]`

A note of our fuelDaemon's ID, if one is running.

`fuelLevel` | `fueled.t[46]`

Our remaining fuel level. The default is a modest level but this can be overridden on particular instances.

`fuelSource` | `fueled.t[40]`

The source of our fuel. By default this is self, but it could be an external source such as a battery

`plungedIntoDarknessMsg` | `fueled.t[125]`

no description available

`wontLightMsg` | `fueled.t[159]`

The message to display when we can't be lit because we have no fuel. Most instances will probably want to override this to something more specific.

Methods

`fuelDaemon ( )` | `fueled.t[75]`

The fuelDaemon is executed every turn this object is lit

`makeLit (stat)` | `fueled.t[128]`

Modifications to the makeLit() method for FueledLightSource [FUELED EXTENSION]

`removeFuelSource ( )` | `fueled.t[166]`

If we have an external fuel source then removing or disabling it will have certain consequences, so code that, for example, you can call this method if a battery is removed from a flashlight.

`sayBurnedOut (fromDaemon?)` | `fueled.t[106]`

The message to display when we run out of fuel

`showWarning ( )` | `fueled.t[103]`

The showWarning() message can be used to display a message warning when this light source is about to go out. One way to do this would be via a switch statement that looks at the value of fuelSource.fuelLevel and displays warning messages when that reaches low values. There's no need for this message to display anything when the fuelLevel is zero, however, since that is handled by sayBurnedOut().

`startFuelDaemon ( )` | `fueled.t[55]`

Start our fuelDaemon running in a SenseDaemon (so no messages are displayed if the player character can't see us).

`stopFuelDaemon ( )` | `fueled.t[65]`

Stop the fuelDaemon; first check that we actually have one and then disable it.

Adv3Lite Library Reference Manual
Generated on 12/12/2022 from adv3Lite version 1.6