Class: SubstanceMixer
Extends: adventurejs.Atom
Defined in: adventure/SubstanceMixer.js, line 6
Todos: Solid+liquid->slurry.
Public Constructor:
var mixer = new adventurejs.SubstanceMixer( this.game.game_name )
SubstanceMixer is a special internal class that is instantiated whenever Substances are mixed together from two (or in theory, more) sources. For instance, if player pours a glass full of liquid into a bowl that also contains liquid, we make a new SubstanceMixer to handle the interaction. This is true even if both Vessels contain the same Substance. SubstanceMixer handles:
- temperature conversion, if SubstancesContainers are at different temperatures
- volume operations - comparing available volume in source and destination, removing part or all from source as needed
- mixwith handling, if two Substances are set to mix with each other to form a third Substance
- overflow of the target container if needed
Example:
Private Constructor:
var foo = new adventurejs.SubstanceMixer(game_name)
Parameters:
-
game_name
String
Name of top level game instance that is scoped to window.
Index
Methods:
- Inherited from Atom getInheritance
- Inherited from Atom getProperty
- Inherited from Atom hasClass
- Inherited from Atom hasProperty
- mix
- Inherited from Atom set
Properties:
- can_drain_target
- can_overflow_target
- Inherited from Atom class
- did_displace_substance
- did_fill_target
- did_mix_substances
- did_overflow_target
- Inherited from Atom game
- Inherited from Atom game_name
- Inherited from Atom id
- Inherited from Atom name
- output_substance_asset
- output_substance_id
- source_aspect
- source_asset
- source_input
- source_split
- source_substance_asset
- source_substance_id
- source_vessel
- source_volume
- source_volume_used
- target_already_full
- target_aspect
- target_asset
- target_freevolume
- target_input
- target_split
- target_substance_asset
- target_substance_id
- target_vessel
- target_volume
- Inherited from Atom UID
Methods Collapse all |
Defined in: adventure/Atom.js, line 238
Inherited from: adventurejs.Atom#getInheritance
Returns:
Array
Defined in: adventure/Atom.js, line 184
Inherited from: adventurejs.Atom#getProperty
Parameters:
-
prop
String
Name of the property to test for. Can include dot notation.
if(false === foo.bar.baz)
comparisons.
Returns:
Boolean
Defined in: adventure/Atom.js, line 216
Inherited from: adventurejs.Atom#hasClass
Parameters:
-
prop
String
Name of the classe to test for.
Returns:
Boolean
Defined in: adventure/Atom.js, line 148
Inherited from: adventurejs.Atom#hasProperty
Parameters:
-
prop
String
Name of the property to test for. Can include dot notation.
Returns:
Boolean
Defined in: adventure/SubstanceMixer.js, line 292
Returns:
boolean
Defined in: adventure/Atom.js, line 134
Inherited from: adventurejs.Atom#set
Parameters:
-
props
Object
A generic object containing properties to copy to the Object instance.
Returns:
Object
Returns the instance the method is called on (useful for chaining calls.)
Properties Collapse all |
Defined in: adventure/SubstanceMixer.js, line 231
Default value: false
Defined in: adventure/SubstanceMixer.js, line 248
Default value: false
Defined in: adventure/Atom.js, line 74
Inherited from: adventurejs.Atom#class
Defined in: adventure/SubstanceMixer.js, line 222
Default value: false
Defined in: adventure/SubstanceMixer.js, line 207
Default value: false
Defined in: adventure/SubstanceMixer.js, line 215
Default value: false
Defined in: adventure/SubstanceMixer.js, line 239
Default value: false
Defined in: adventure/Atom.js, line 123
Inherited from: adventurejs.Atom#game
this.game
.
Defined in: adventure/Atom.js, line 100
Inherited from: adventurejs.Atom#game_name
Defined in: adventure/Atom.js, line 86
Inherited from: adventurejs.Atom#id
Defined in: adventure/Atom.js, line 54
Inherited from: adventurejs.Atom#name
Defined in: adventure/SubstanceMixer.js, line 183
Default value: null
Defined in: adventure/SubstanceMixer.js, line 191
Default value: ""
Defined in: adventure/SubstanceMixer.js, line 65
Default value: ""
Defined in: adventure/SubstanceMixer.js, line 58
Default value: null
Defined in: adventure/SubstanceMixer.js, line 49
Default value: ""
Defined in: adventure/SubstanceMixer.js, line 94
Default value: null
Defined in: adventure/SubstanceMixer.js, line 80
Default value: null
Defined in: adventure/SubstanceMixer.js, line 87
Default value: ""
Defined in: adventure/SubstanceMixer.js, line 73
Default value: null
Defined in: adventure/SubstanceMixer.js, line 101
Default value: 0
Defined in: adventure/SubstanceMixer.js, line 108
Default value: 0
Defined in: adventure/SubstanceMixer.js, line 199
Default value: false
Defined in: adventure/SubstanceMixer.js, line 131
Default value: ""
Defined in: adventure/SubstanceMixer.js, line 124
Default value: null
Defined in: adventure/SubstanceMixer.js, line 176
Default value: 0.0
Defined in: adventure/SubstanceMixer.js, line 115
Default value: ""
Defined in: adventure/SubstanceMixer.js, line 162
Default value: null
Defined in: adventure/SubstanceMixer.js, line 146
Default value: null
Defined in: adventure/SubstanceMixer.js, line 154
Default value: ""
Defined in: adventure/SubstanceMixer.js, line 139
Default value: null
Defined in: adventure/SubstanceMixer.js, line 169
Default value: 0.0
Defined in: adventure/Atom.js, line 93
Inherited from: adventurejs.Atom#UID