Cyborg
Vars | |
ident | Random serial number generated for each cyborg upon its initialization |
---|---|
lampButton | Lamp button reference |
lamp_color | Set lamp color |
lamp_enabled | If the lamp is turned on |
lamp_functional | If the lamp isn't broken. |
lamp_intensity | Lamp brightness. Starts at 3, but can be 1 - 5. |
modularInterface | The reference to the built-in tablet that borgs carry. |
opened | If this is a path, this gets created as an object in Initialize. |
Procs | |
Exited | Checking Exited() to detect if a hat gets up and walks off. Drones and pAIs might do this, after all. |
deploy_init | deploy_init: Deploys AI unit into AI shell |
logevent | Records an IC event log entry in the cyborg's internal tablet. |
make_shell | make_shell: Makes an AI shell out of a cyborg unit |
revert_shell | revert_shell: Reverts AI shell back into a normal cyborg unit |
set_lockcharge | Reports the event of the change in value of the lockcharge variable. |
smash_headlamp | Handles headlamp smashing |
toggle_headlamp | Handles headlamp toggling, disabling, and color setting. |
Var Details
ident
Random serial number generated for each cyborg upon its initialization
lampButton
Lamp button reference
lamp_color
Set lamp color
lamp_enabled
If the lamp is turned on
lamp_functional
If the lamp isn't broken.
lamp_intensity
Lamp brightness. Starts at 3, but can be 1 - 5.
modularInterface
The reference to the built-in tablet that borgs carry.
opened
If this is a path, this gets created as an object in Initialize.
Proc Details
Exited
Checking Exited() to detect if a hat gets up and walks off. Drones and pAIs might do this, after all.
deploy_init
deploy_init: Deploys AI unit into AI shell
Arguments:
- AI - AI unit that initiated the deployment into the AI shell
logevent
Records an IC event log entry in the cyborg's internal tablet.
Creates an entry in the borglog list of the cyborg's internal tablet, listing the current in-game time followed by the message given. These logs can be seen by the cyborg in their BorgUI tablet app. By design, logging fails if the cyborg is dead.
Arguments: arg1: a string containing the message to log.
make_shell
make_shell: Makes an AI shell out of a cyborg unit
Arguments:
- board - B.O.R.I.S. module board used for transforming the cyborg into AI shell
revert_shell
revert_shell: Reverts AI shell back into a normal cyborg unit
set_lockcharge
Reports the event of the change in value of the lockcharge variable.
smash_headlamp
Handles headlamp smashing
When called (such as by the shadowperson lighteater's attack), this proc will break the borg's headlamp and then call toggle_headlamp to disable the light. It also plays a sound effect of glass breaking, and tells the borg what happened to its chat. Broken lights can be repaired by using a flashlight on the borg.
toggle_headlamp
Handles headlamp toggling, disabling, and color setting.
The initial if statment is a bit long, but the gist of it is that should the lamp be on AND the update_color arg be true, we should simply change the color of the lamp but not disable it. Otherwise, should the turn_off arg be true, the lamp already be enabled, any of the normal reasons the lamp would turn off happen, or the update_color arg be passed with the lamp not on, we should set the lamp off. The update_color arg is only ever true when this proc is called from the borg tablet, when the color selection feature is used.
Arguments:
- arg1 - turn_off, if enabled will force the lamp into an off state (rather than toggling it if possible)
- arg2 - update_color, if enabled, will adjust the behavior of the proc to change the color of the light if it is already on.