Cyborg
Vars | |
can_buckle | Hats that don't really work on borgos I am so very upset that this breaks things |
---|---|
disabled_modules | For checking which modules are disabled or not. |
has_limbs | used for displaying the prefix & getting the current module of cyborg |
ion_trail | Jetpack-like effect. |
ionpulse | Magboot-like effect. |
ionpulse_on | Jetpack-like effect. |
lampButton | Flag for if the lamp is on cooldown after being forcibly disabled |
lamp_color | Set lamp color |
lamp_cooldown | Lamp button reference |
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. |
lawupdate | So they can initialize sparks whenever/N |
lockcharge | Used to determine if a borg shows up on the robotics console. Setting to true hides them. |
low_power_mode | Ionpulse effect. |
magpulse | VTEC speed boost. |
previous_health | the last health before updating - to check net change in health |
robot_modules_background | Used to determine whether they have the module menu shown or not |
scrambledcodes | Cyborgs will sync their laws with their AI by default |
sensor_protection | Flash resistance |
shell | Used to determine cooldown for spin. |
spark_system | whether the robot has no charge left. |
toner | Boolean of whether the borg is locked down or not |
Procs | |
activate_module | Finds the first available slot and attemps to put item item_module in it. |
activated | Checks if the item is currently in a slot. |
add_to_upgrades | Use this to add upgrades to robots. It'll register signals for when the upgrade is moved or deleted, if not single use. |
break_all_cyborg_slots | Breaks all of a cyborg's slots. |
break_cyborg_slot | Breaks the slot number, changing the icon. |
cycle_modules | Cycles through the list of enabled modules, deselecting the current one and selecting the next one. |
deselect_module | Deselects the module in the slot module_num. Arguments |
equip_module_to_slot | What's the first free slot for the borg? Is passed an item and a module slot. Equips the item to that borg slot. |
get_active_held_item | Returns the thing in our active hand (whatever is in our active module-slot, in this case) |
get_selected_module | The number of module slots we're checking Returns the slot number of the selected module, or zero if no modules are selected. |
is_invalid_module_number | Checks if the provided module number is a valid number. |
logevent | Records an IC event log entry in the cyborg's internal tablet. |
movement_delay | the current percent health of the robot (-1 to 1) |
observer_screen_update | Updates the observers's screens with cyborg itemss. Arguments |
on_light_eater | Special handling for getting hit with a light eater |
on_upgrade_deleted | Called when an applied upgrade is deleted. |
remove_from_upgrades | Called when an upgrade is moved outside the robot. So don't call this directly, use forceMove etc. |
repair_all_cyborg_slots | Repairs all slots. Unbroken slots are unaffected. |
repair_cyborg_slot | Repairs the slot number, updating the icon. |
select_module | Selects the module in the slot module_num. Arguments |
smash_headlamp | Handles headlamp smashing |
toggle_headlamp | Handles headlamp toggling, disabling, and color setting. |
toggle_module | Toggles selection of the module in the slot module_num. Arguments |
uneq_active | Unequips the active held item, if there is one. Will always consider dropping gripper contents first. |
uneq_all | Unequips all held items. |
unequip_module_from_slot | Unequips item item_module from slot module_num. Deletes it if delete_after = TRUE. |
Var Details
can_buckle
Hats that don't really work on borgos I am so very upset that this breaks things
disabled_modules
For checking which modules are disabled or not.
has_limbs
used for displaying the prefix & getting the current module of cyborg
ion_trail
Jetpack-like effect.
ionpulse
Magboot-like effect.
ionpulse_on
Jetpack-like effect.
lampButton
Flag for if the lamp is on cooldown after being forcibly disabled
lamp_color
Set lamp color
lamp_cooldown
Lamp button reference
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.
lawupdate
So they can initialize sparks whenever/N
lockcharge
Used to determine if a borg shows up on the robotics console. Setting to true hides them.
low_power_mode
Ionpulse effect.
magpulse
VTEC speed boost.
previous_health
the last health before updating - to check net change in health
robot_modules_background
Used to determine whether they have the module menu shown or not
scrambledcodes
Cyborgs will sync their laws with their AI by default
sensor_protection
Flash resistance
shell
Used to determine cooldown for spin.
spark_system
whether the robot has no charge left.
toner
Boolean of whether the borg is locked down or not
Proc Details
activate_module
Finds the first available slot and attemps to put item item_module in it.
Arguments
- item_module - the item being equipped to a slot.
activated
Checks if the item is currently in a slot.
If the item is found in a slot, this returns TRUE. Otherwise, it returns FALSE Arguments
- item_module - the item being checked
add_to_upgrades
Use this to add upgrades to robots. It'll register signals for when the upgrade is moved or deleted, if not single use.
break_all_cyborg_slots
Breaks all of a cyborg's slots.
break_cyborg_slot
Breaks the slot number, changing the icon.
Arguments
- module_num - the slot number being repaired.
cycle_modules
Cycles through the list of enabled modules, deselecting the current one and selecting the next one.
deselect_module
Deselects the module in the slot module_num. Arguments
- module_num - the slot number being de-selected
equip_module_to_slot
What's the first free slot for the borg? Is passed an item and a module slot. Equips the item to that borg slot.
Arguments
- item_module - the item being equipped to a slot
- module_num - the slot number being equipped to.
get_active_held_item
Returns the thing in our active hand (whatever is in our active module-slot, in this case)
Arguments
- get_gripper - If the active module is a gripper, should we return the gripper or the contained item? (if the gripper contains nothing, returns the gripper anyways)
get_selected_module
The number of module slots we're checking Returns the slot number of the selected module, or zero if no modules are selected.
is_invalid_module_number
Checks if the provided module number is a valid number.
If the number is between 1 and 3 (if check_all_slots is true) or between 1 and the number of disabled modules (if check_all_slots is false), then it returns FALSE. Otherwise, it returns TRUE. Arguments
- module_num - the passed module num that is checked for validity.
- check_all_slots - TRUE = the proc checks all slots | FALSE = the proc only checks un-disabled slots
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.
movement_delay
the current percent health of the robot (-1 to 1)
observer_screen_update
Updates the observers's screens with cyborg itemss. Arguments
- item_module - the item being added or removed from the screen
- add - whether or not the item is being added, or removed.
on_light_eater
Special handling for getting hit with a light eater
on_upgrade_deleted
Called when an applied upgrade is deleted.
remove_from_upgrades
Called when an upgrade is moved outside the robot. So don't call this directly, use forceMove etc.
repair_all_cyborg_slots
Repairs all slots. Unbroken slots are unaffected.
repair_cyborg_slot
Repairs the slot number, updating the icon.
Arguments
- module_num - the module number being repaired.
select_module
Selects the module in the slot module_num. Arguments
- module_num - the slot number being selected
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.
toggle_module
Toggles selection of the module in the slot module_num. Arguments
- module_num - the slot number being toggled
uneq_active
Unequips the active held item, if there is one. Will always consider dropping gripper contents first.
uneq_all
Unequips all held items.
unequip_module_from_slot
Unequips item item_module from slot module_num. Deletes it if delete_after = TRUE.
Arguments
- item_module - the item being unequipped
- module_num - the slot number being unequipped.