robot 
The Shrinkening
Vars | |
| ai_lockdown | Boolean of whether the borg was locked by its AI or nothing |
|---|---|
| alert_control | Station alert datum for showing alerts UI |
| cell | If this is a path, this gets created as an object in Initialize. |
| cyborg_appearance_active | Which part slots the borg has turned on, by slot |
| cyborg_appearance_allowed | Whether or not the parts may show at all - the config, the character's genitals toggle and the player's ERP preference together |
| cyborg_appearance_applied_size | The size factor we last applied to the transform, so a change undoes only ours |
| cyborg_appearance_arousal | The arousal state of each part slot, by slot. A slot that isn't here is none |
| cyborg_appearance_base_choices | The sprite for each part slot from the character's preferences, for layouts that don't carry their own |
| cyborg_appearance_character_allowed | Whether or not the spawn character allows genitals |
| cyborg_appearance_choices | The sprite each part slot shows, from the current layout or else the character's preferences |
| cyborg_appearance_holder | The image holder that shows the parts to viewers |
| cyborg_appearance_layout | The layout the body shows now - its chassis's saved default, or else the active layout |
| cyborg_appearance_model | Catalog id of the chassis the current layout was picked for |
| cyborg_appearance_owner | Ckey of the player whose preferences the spawn snapshot came from |
| cyborg_appearance_requested_size | The body size the character's preferences ask for |
| cyborg_appearance_revision | Goes up with every change that needs the parts redrawn, and is part of the holder's render key |
| cyborg_appearance_slot | The character slot the spawn snapshot came from |
| cyborg_appearance_store | The spawn snapshot of the character's layouts (see cyborg_body_snapshot()), null when the slot holds a newer schema |
| cyborg_customization_message | What the borg's own part controls tell it, like why they can't be used |
| disabled_modules | For checking which modules are disabled or not. |
| disabled_time | If we've been forcibly disabled for a temporary amount of time. |
| eye_flash_timer | Holds a reference to the timer taking care of blinking lights on dead cyborgs |
| eye_lights_enabled | The condition of the Borg's eyes |
| ion_trail | Ionpulse effect. |
| ionpulse | Jetpack-like effect. |
| ionpulse_on | Jetpack-like effect. |
| lamp_color | Set lamp color |
| lamp_doom | Set to true if a doomsday event is locking our lamp to on and RED |
| 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. |
| lamp_power_consumption | Power consumption of the light per lamp_intensity. |
| lawupdate | Cyborgs will sync their laws with their AI by default |
| lockcharge | Boolean of whether the borg is locked down or not |
| lockdown_timer | Timer that allows the borg to self-unlock after a set amount of time |
| low_power_mode | Whether the robot has no charge left. |
| model | Represents the cyborg's model (engineering, medical, etc.) |
| previous_health | the last health before updating - to check net change in health |
| robot_suit | Used for deconstruction to remember what the borg was constructed out of. |
| scrambledcodes | Used to determine if a borg shows up on the robotics console. Setting to TRUE hides them. |
| smoke_particles | Smoke particle type for brute damage |
| spark_particles | Spark particle type for burn damage |
| spark_system | So they can initialize sparks whenever/N |
Procs | |
| Exited | Checking Exited() to detect if a hat gets up and walks off. Drones and pAIs might do this, after all. |
| Login | Applies the silicon prefs when a player takes the body over without a mind transfer - ghost control, admin direct control |
| 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 | Moves the upgrade inside the robot and registers relevant signals. |
| after_righted | Redraws the parts once the borg is back on its feet |
| after_tip_over | Redraws the parts once the borg is tipped over, which hides them |
| apply_upgrade | Called when a mob uses an upgrade on an open borg. Checks to make sure the upgrade can be applied |
| borg_emag_end | A async proc called from [emag_act] that gives the borg a lot of flavortext, and applies the syndicate lawset after a delay. |
| break_all_cyborg_slots | Breaks all of a cyborg's slots. |
| break_cyborg_slot | Breaks the slot number, changing the icon. |
| can_rest | Safe check of the cyborg's model_features list. |
| cyborg_appearance_model_default | The body's saved default for a chassis, or null. A body that kept save text decodes each one the first time it is asked for. |
| cyborg_customization_apply_size | Applies the character's body size to the borg's transform, undoing only our last factor |
| cyborg_customization_pose | Returns the pose the borg's resting state shows, like rest or sit, or idle |
| cyborg_customization_refresh_model | Called when the borg's chassis may have changed - takes its saved default, or else the active layout, then resizes and redraws |
| cyborg_customization_sync_permissions | Keep a body bound to its spawn profile even if the creator selects another slot. |
| cyborg_customization_update_render | Redraws the borg's parts, making their image holder the first time |
| cyborg_deconstruct | Completely deconstructs the borg, dropping the MMI/posibrain, removing applied upgrades and stripping the exoskeleton of all limbs, while also burning out the flashes and prying out the cabling and the cell used in construction |
| cyborg_runtime_action | Runtime controls change body usage state only; saved configuration belongs to setup. |
| cyborg_runtime_data | Returns what the borg's own part controls show, or null when it has no spawn snapshot |
| cycle_modules | Cycles through the list of enabled modules, deselecting the current one and selecting the next one. |
| deploy_init | deploy_init: Deploys AI unit into AI shell |
| deselect_module | Deselects the module in the slot module_num. Arguments |
| draw_power | Draw power from the robot |
| dump_into_mmi | Dumps the current occupant of the cyborg into an MMI at the passed location Returns the borg's MMI on success |
| get_active_held_item | Returns the thing in our active hand (whatever is in our active module-slot, in this case) |
| get_selected_module | Returns the slot number of the selected module, or zero if no modules are selected. |
| is_empty_shell | Is this an AI shell with no AI currently piloting it? |
| is_invalid_module_number | Checks if the provided module number is a valid number. |
| lockdown_override | Allows the borg to unlock themselves after a lenghty period of time. |
| make_shell | make_shell: Makes an AI shell out of a cyborg unit |
| observer_screen_update | |
| on_light_eater | Special handling for getting hit with a light eater |
| on_saboteur | special handling for getting shot with a light disruptor/saboteur e.g. the fisher |
| 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. |
| revert_shell | revert_shell: Reverts AI shell back into a normal cyborg unit |
| select_module | Selects the module in the slot module_num. Arguments |
| set_lockcharge | Reports the event of the change in value of the lockcharge variable. |
| set_modularInterface_theme | Sets the tablet theme and icon |
| setup_default_name | Used to setup the a basic and (somewhat) unique name for the robot. |
| smash_headlamp | Handles headlamp smashing |
| toggle_cover | Toggles the Cyborg's cover lock, user is provided only if it's someone else doing it (not the borg itself) |
| toggle_headlamp | Handles headlamp toggling, disabling, and color setting. |
| toggle_module | Toggles selection of the module in the slot module_num. Arguments |
| transfer_cyborg_customization_pref | Called through transfer_silicon_prefs(), which covers job spawns, ghost roles and mind transfers. |
| uneq_active | Unequips the active held item, if there is one. |
Var Details
ai_lockdown 
Boolean of whether the borg was locked by its AI or nothing
alert_control 
Station alert datum for showing alerts UI
cell 
If this is a path, this gets created as an object in Initialize.
cyborg_appearance_active 
Which part slots the borg has turned on, by slot
cyborg_appearance_allowed 
Whether or not the parts may show at all - the config, the character's genitals toggle and the player's ERP preference together
cyborg_appearance_applied_size 
The size factor we last applied to the transform, so a change undoes only ours
cyborg_appearance_arousal 
The arousal state of each part slot, by slot. A slot that isn't here is none
cyborg_appearance_base_choices 
The sprite for each part slot from the character's preferences, for layouts that don't carry their own
cyborg_appearance_character_allowed 
Whether or not the spawn character allows genitals
cyborg_appearance_choices 
The sprite each part slot shows, from the current layout or else the character's preferences
cyborg_appearance_holder 
The image holder that shows the parts to viewers
cyborg_appearance_layout 
The layout the body shows now - its chassis's saved default, or else the active layout
cyborg_appearance_model 
Catalog id of the chassis the current layout was picked for
cyborg_appearance_owner 
Ckey of the player whose preferences the spawn snapshot came from
cyborg_appearance_requested_size 
The body size the character's preferences ask for
cyborg_appearance_revision 
Goes up with every change that needs the parts redrawn, and is part of the holder's render key
cyborg_appearance_slot 
The character slot the spawn snapshot came from
cyborg_appearance_store 
The spawn snapshot of the character's layouts (see cyborg_body_snapshot()), null when the slot holds a newer schema
cyborg_customization_message 
What the borg's own part controls tell it, like why they can't be used
disabled_modules 
For checking which modules are disabled or not.
disabled_time 
If we've been forcibly disabled for a temporary amount of time.
eye_flash_timer 
Holds a reference to the timer taking care of blinking lights on dead cyborgs
eye_lights_enabled 
The condition of the Borg's eyes
ion_trail 
Ionpulse effect.
ionpulse 
Jetpack-like effect.
ionpulse_on 
Jetpack-like effect.
lamp_color 
Set lamp color
lamp_doom 
Set to true if a doomsday event is locking our lamp to on and RED
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.
lamp_power_consumption 
Power consumption of the light per lamp_intensity.
lawupdate 
Cyborgs will sync their laws with their AI by default
lockcharge 
Boolean of whether the borg is locked down or not
lockdown_timer 
Timer that allows the borg to self-unlock after a set amount of time
low_power_mode 
Whether the robot has no charge left.
model 
Represents the cyborg's model (engineering, medical, etc.)
previous_health 
the last health before updating - to check net change in health
robot_suit 
Used for deconstruction to remember what the borg was constructed out of.
scrambledcodes 
Used to determine if a borg shows up on the robotics console. Setting to TRUE hides them.
smoke_particles 
Smoke particle type for brute damage
spark_particles 
Spark particle type for burn damage
spark_system 
So they can initialize sparks whenever/N
Proc Details
Exited
Checking Exited() to detect if a hat gets up and walks off. Drones and pAIs might do this, after all.
Login
Applies the silicon prefs when a player takes the body over without a mind transfer - ghost control, admin direct control
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
Moves the upgrade inside the robot and registers relevant signals.
after_righted
Redraws the parts once the borg is back on its feet
after_tip_over
Redraws the parts once the borg is tipped over, which hides them
apply_upgrade
Called when a mob uses an upgrade on an open borg. Checks to make sure the upgrade can be applied
borg_emag_end
A async proc called from [emag_act] that gives the borg a lot of flavortext, and applies the syndicate lawset after a delay.
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.
can_rest
Safe check of the cyborg's model_features list.
model_features is defined in modular_nova\modules\altborgs\code\modules\mob\living\silicon\robot\robot_model.dm.
cyborg_appearance_model_default
The body's saved default for a chassis, or null. A body that kept save text decodes each one the first time it is asked for.
cyborg_customization_apply_size
Applies the character's body size to the borg's transform, undoing only our last factor
cyborg_customization_pose
Returns the pose the borg's resting state shows, like rest or sit, or idle
cyborg_customization_refresh_model
Called when the borg's chassis may have changed - takes its saved default, or else the active layout, then resizes and redraws
cyborg_customization_sync_permissions
Keep a body bound to its spawn profile even if the creator selects another slot.
cyborg_customization_update_render
Redraws the borg's parts, making their image holder the first time
cyborg_deconstruct
Completely deconstructs the borg, dropping the MMI/posibrain, removing applied upgrades and stripping the exoskeleton of all limbs, while also burning out the flashes and prying out the cabling and the cell used in construction
cyborg_runtime_action
Runtime controls change body usage state only; saved configuration belongs to setup.
cyborg_runtime_data
Returns what the borg's own part controls show, or null when it has no spawn snapshot
cycle_modules
Cycles through the list of enabled modules, deselecting the current one and selecting the next one.
deploy_init
deploy_init: Deploys AI unit into AI shell
Arguments:
- AI - AI unit that initiated the deployment into the AI shell
deselect_module
Deselects the module in the slot module_num. Arguments
- module_num - the slot number being de-selected
draw_power
Draw power from the robot
dump_into_mmi
Dumps the current occupant of the cyborg into an MMI at the passed location Returns the borg's MMI on success
get_active_held_item
Returns the thing in our active hand (whatever is in our active module-slot, in this case)
get_selected_module
Returns the slot number of the selected module, or zero if no modules are selected.
is_empty_shell
Is this an AI shell with no AI currently piloting it?
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
lockdown_override
Allows the borg to unlock themselves after a lenghty period of time.
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
observer_screen_update
Please do not use
Updates the observers's screens with cyborg items. Currently inventory code handling for observers is tied to carbon (get_held_overlays), meaning this snowflake code for borgs is necessary so observers watching borgs don't bug out. Once that's moved to the living, replace this with it. Removing from the screen is handled by 'doUnEquip' Arg:
- item_module - the item being added to the screen.
on_light_eater
Special handling for getting hit with a light eater
on_saboteur
special handling for getting shot with a light disruptor/saboteur e.g. the fisher
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.
revert_shell
revert_shell: Reverts AI shell back into a normal cyborg unit
select_module
Selects the module in the slot module_num. Arguments
- module_num - the slot number being selected
set_lockcharge
Reports the event of the change in value of the lockcharge variable.
set_modularInterface_theme
Sets the tablet theme and icon
These variables are based on if the borg is a syndicate type or is emagged. This gets used in model change code and also borg emag code.
setup_default_name
Used to setup the a basic and (somewhat) unique name for the robot.
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_cover
Toggles the Cyborg's cover lock, user is provided only if it's someone else doing it (not the borg itself)
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
transfer_cyborg_customization_pref
Called through transfer_silicon_prefs(), which covers job spawns, ghost roles and mind transfers.
uneq_active
Unequips the active held item, if there is one.