GroundWired
public interface TechLibrary extends CMLibrary
idConverter
Modifier and Type | Method | Description |
---|---|---|
void |
addManufacturer(Manufacturer manufacturer) |
Adds and saves a new manufacturer to the list.
|
void |
delManufacturer(Manufacturer manufacturer) |
Removes a new manufacturer from the list.
|
void |
executeMsg(java.lang.String oldKey,
Technical.TechCommand command,
Environmental myHost,
CMMsg msg) |
For objects connected ONLY via their electronics, this will allow
tech messages to be transferred between them.
|
void |
fixItemTechLevel(Technical I,
int newTechLevel) |
"Fixes" the tech level of the given item by making sure
it's manufacturer is non-random, and by assigning a random
tech level within the valid range, and modifying its name
and displaytext to reflect the new tech level
|
java.util.Iterator<Room> |
getComputerRooms(java.lang.String key) |
Return all the rooms containing computers in the
given circuit key.
|
java.util.Iterator<Computer> |
getComputers(java.lang.String key) |
Return all the computers in the given circuit key.
|
Manufacturer |
getDefaultManufacturer() |
Retrieves the default manufacturer for new products
|
java.lang.String |
getElectronicsKey(CMObject o) |
Returns the appropriate electronics key for this electronic item,
area, or room.
|
int |
getGlobalTechLevel() |
Returns the global tech level
|
java.util.List<Electronics> |
getMakeRegisteredElectronics(java.lang.String key) |
For the given key, return an eclusive list of all the electronics
that belong to that key.
|
java.util.List<java.lang.String> |
getMakeRegisteredKeys() |
Returns a new exclusive list of all the registered electronics
keys being processed.
|
Manufacturer |
getManufacturer(java.lang.String name) |
Retrieves the manufacturer of the given name, or null
if it is not found.
|
Manufacturer |
getManufacturerOf(Technical E,
java.lang.String name) |
Retrieves the manufacturer of the given name, or null
if it is not found.
|
int |
getRandomGlobalTechLevel() |
Returns a random gaussian-distributed tech level from the
current low tech level bound to bound+10.
|
boolean |
isCurrentActive(java.lang.String key) |
Returns whether the currents at the given key are still
active.
|
java.util.Iterator<Manufacturer> |
manufacterers() |
Returns an iterator of manufacturers
|
boolean |
okMessage(java.lang.String oldKey,
Technical.TechCommand command,
Environmental myHost,
CMMsg msg) |
For objects connected ONLY via their electronics, this will allow
tech messages to be transferred between them.
|
java.lang.String |
registerElectrics(Electronics E,
java.lang.String oldKey) |
Registers an electronic component that belongs
in a complex circuitry, like a panel or a
generator
|
java.lang.String |
registerElectrics(Electronics E,
java.lang.String oldKey,
Technical.TechCommand[] listenFors) |
Registers an electronic component that belongs
in a complex circuitry, like a panel or a
generator.
|
boolean |
seekBatteryPower(ElecPanel E,
java.lang.String key) |
Certain Key Systems may automatically force batteries in their circuit
to activate in order to provide that system with power.
|
void |
unregisterAllElectronics(java.lang.String oldKey) |
Unregisters all electronic components that belonged
in a complex circuitry, like a panel or a
generator, of the given key.
|
void |
unregisterElectronics(Electronics E,
java.lang.String oldKey) |
Unregisters an electronic component that belonged
in a complex circuitry, like a panel or a
generator.
|
void |
updateManufacturer(Manufacturer manufacturer) |
Updates a new manufacturer in the list.
|
activate, getServiceClient, L, propertiesLoaded, shutdown
copyOf, ID, initializeClass, name, newInstance
java.lang.String getElectronicsKey(CMObject o)
o
- the object to inspectvoid unregisterElectronics(Electronics E, java.lang.String oldKey)
E
- the electronic component to unregisteroldKey
- the last key registered to this devicevoid unregisterAllElectronics(java.lang.String oldKey)
oldKey
- the last key registered to this devicejava.lang.String registerElectrics(Electronics E, java.lang.String oldKey)
E
- the electronic component to registeroldKey
- the last key registered to this devicejava.lang.String registerElectrics(Electronics E, java.lang.String oldKey, Technical.TechCommand[] listenFors)
E
- the electronic component to registeroldKey
- the last key registered to this devicelistenFors
- TechCommands to listen for, or nullboolean isCurrentActive(java.lang.String key)
key
- the current keyjava.util.List<java.lang.String> getMakeRegisteredKeys()
java.util.List<Electronics> getMakeRegisteredElectronics(java.lang.String key)
key
- the key to return electronics forboolean okMessage(java.lang.String oldKey, Technical.TechCommand command, Environmental myHost, CMMsg msg)
oldKey
- the electronics keycommand
- the tech command in questionmyHost
- message hostmsg
- the message to sendexecuteMsg(String, TechCommand, Environmental, CMMsg)
void executeMsg(java.lang.String oldKey, Technical.TechCommand command, Environmental myHost, CMMsg msg)
oldKey
- the electronics keycommand
- the tech command in questionmyHost
- message hostmsg
- the message to sendokMessage(String, TechCommand, Environmental, CMMsg)
boolean seekBatteryPower(ElecPanel E, java.lang.String key)
E
- the key device to seek powerkey
- this devices keyManufacturer getDefaultManufacturer()
void addManufacturer(Manufacturer manufacturer)
manufacturer
- the one to addvoid delManufacturer(Manufacturer manufacturer)
manufacturer
- the one to removevoid updateManufacturer(Manufacturer manufacturer)
manufacturer
- the one to updateManufacturer getManufacturer(java.lang.String name)
name
- the manufacturer to fetchManufacturer getManufacturerOf(Technical E, java.lang.String name)
E
- for random manufacturers, the item to checkname
- the manufacturer to fetchjava.util.Iterator<Manufacturer> manufacterers()
java.util.Iterator<Room> getComputerRooms(java.lang.String key)
key
- the circuit keyjava.util.Iterator<Computer> getComputers(java.lang.String key)
key
- the circuit keyint getRandomGlobalTechLevel()
int getGlobalTechLevel()
void fixItemTechLevel(Technical I, int newTechLevel)
I
- An electronics item that needs fixingnewTechLevel
- the new tech level