mission
Vars | |
bound_atoms | Assoc list of atoms "bound" to this mission; each atom is associated with a 2-element list. The first entry in that list is a bool that determines if the mission should fail when the atom qdeletes; the second is a callback to be invoked upon the atom's qdeletion. |
---|---|
dur_mod_range | The maximum deviation of the mission's true duration from the base value, as a proportion. |
dur_value_scaling | Should mission value scale proportionally to the deviation from the mission's base duration? |
duration | The amount of time in which to complete the mission. |
servant | The ship that accepted this mission. Passed in accept(). |
source_outpost | The outpost that issued this mission. Passed in New(). |
val_mod_range | The maximum deviation of the mission's true value from the base value, as a proportion. |
value | The mission's payout. |
weight | The relative probability of this mission being selected. 0-weight missions are never selected. |
Procs | |
bound_deleted | Signal handler for the qdeletion of bound atoms. |
recall_bound | Removes the given atom from the mission's bound items, then qdeletes it. Does not invoke the callback or fail the mission; optionally creates sparks. |
remove_bound | Removes the given bound atom from the list of bound atoms. Does not invoke the associated callback or fail the mission. |
spawn_bound | Spawns a "bound" atom of the given type at the given location. When the "bound" atom is qdeleted, the passed-in callback is invoked, and, by default, the mission fails. |
Var Details
bound_atoms
Assoc list of atoms "bound" to this mission; each atom is associated with a 2-element list. The first entry in that list is a bool that determines if the mission should fail when the atom qdeletes; the second is a callback to be invoked upon the atom's qdeletion.
dur_mod_range
The maximum deviation of the mission's true duration from the base value, as a proportion.
dur_value_scaling
Should mission value scale proportionally to the deviation from the mission's base duration?
duration
The amount of time in which to complete the mission.
servant
The ship that accepted this mission. Passed in accept().
source_outpost
The outpost that issued this mission. Passed in New().
val_mod_range
The maximum deviation of the mission's true value from the base value, as a proportion.
value
The mission's payout.
weight
The relative probability of this mission being selected. 0-weight missions are never selected.
Proc Details
bound_deleted
Signal handler for the qdeletion of bound atoms.
recall_bound
Removes the given atom from the mission's bound items, then qdeletes it. Does not invoke the callback or fail the mission; optionally creates sparks.
Arguments:
- bound - The bound atom to recall.
- sparks - Whether to spawn sparks on the turf the bound atom is located on. Default TRUE.
remove_bound
Removes the given bound atom from the list of bound atoms. Does not invoke the associated callback or fail the mission.
Arguments:
- bound - The bound atom to remove.
spawn_bound
Spawns a "bound" atom of the given type at the given location. When the "bound" atom is qdeleted, the passed-in callback is invoked, and, by default, the mission fails.
Intended to be used to spawn mission-linked atoms that can have references saved without causing harddels.
Arguments:
- a_type - The type of the atom to be spawned. Must be of type /atom/movable.
- a_loc - The location to spawn the bound atom at.
- destroy_cb - The callback to invoke when the bound atom is qdeleted. Default is null.
- fail_on_delete - Bool; whether the mission should fail when the bound atom is qdeleted. Default TRUE.
- sparks - Whether to spawn sparks after spawning the bound atom. Default TRUE.