Swarmer
Tiny machines made by an ancient civilization, they seek only to consume materials and replicate.
Tiny robots which, while not lethal, seek to destroy station components in order to recycle them into more swarmers. Sentient player swarmers spawn from a beacon spawned in maintenance and they can spawn melee swarmers to protect them. Swarmers have the following abilities:
- Can melee targets to deal stamina damage. Stuns cyborgs.
- Can teleport friend and foe alike away using ctrl + click. Applies binds to carbons, preventing them from immediate retaliation
- Can shoot lasers which deal stamina damage to carbons and direct damage to simple mobs
- Can self repair for free, completely healing themselves
- Can construct traps which stun targets, and walls which block non-swarmer entites and projectiles
- Can create swarmer drones, which lack the above abilities sans melee stunning targets. A swarmer can order its drones around by middle-clicking a tile.
Vars | |
dronelist | List used for player swarmers to keep track of their drones |
---|---|
last_alert | Prevents alert spam |
max_resources | Maximum amount of resources a swarmer can store |
resources | Resource points, generated by consuming metal/glass |
swarmer_flags | Bitflags to store boolean conditions, such as whether the light is on or off. |
Procs | |
AttackingTarget | CTRL CLICK FOR SWARMERS AND SWARMER_ACT()'S |
Fabricate | Called when a swarmer creates a structure or drone |
Integrate | Called when a swarmer attempts to consume an object |
contact_swarmers | Proc which is used for inputting a swarmer message |
create_barricade | Called when a swarmer attempts to create a barricade |
create_swarmer | Called when a swarmer attempts to create a drone |
create_trap | Called when a swarmer attempts to create a trap |
dis_integrate | Called when a swarmer attempts to destroy a structure |
dismantle_machine | Called when a swarmer attempts to disassemble a machine |
environment_check | /END CTRL CLICK FOR SWARMERS//// Checks whether a target atom is safe to deconstruct. |
prepare_target | Called when a swarmer attempts to teleport a living entity away |
remove_drone | Removes a drone from the swarmer's list. |
repair_self | Called when a swarmer attempts to repair itself |
swarmer_chat | Proc which is used for swarmer comms |
swarmer_type_to_create | Used to determine what type of swarmer a swarmer should create |
toggle_light | Called when a swarmer toggles its light |
Var Details
dronelist
List used for player swarmers to keep track of their drones
last_alert
Prevents alert spam
max_resources
Maximum amount of resources a swarmer can store
resources
Resource points, generated by consuming metal/glass
swarmer_flags
Bitflags to store boolean conditions, such as whether the light is on or off.
Proc Details
AttackingTarget
CTRL CLICK FOR SWARMERS AND SWARMER_ACT()'S
Fabricate
Called when a swarmer creates a structure or drone
Proc called whenever a swarmer creates a structure or drone Arguments:
- fabrication_object - The atom to create
- fabrication_cost - How many resources it costs for a swarmer to create the object
Integrate
Called when a swarmer attempts to consume an object
Proc which determines interaction between a swarmer and whatever it is attempting to consume Arguments:
- target - The material or object the swarmer is attempting to consume
contact_swarmers
Proc which is used for inputting a swarmer message
Proc which is used for a swarmer to input a message on a pop-up box, then attempt to send that message to the other swarmers
create_barricade
Called when a swarmer attempts to create a barricade
Proc used to allow a swarmer to create a barricade. Checks if a barricade is on the tile, then if the swarmer can afford it, and then will attempt to create a barricade after a second delay.
create_swarmer
Called when a swarmer attempts to create a drone
Proc used to allow a swarmer to create a drone. Checks if the swarmer can afford the drone, then creates it after 5 seconds, and also registers it to the creating swarmer so it can command it
create_trap
Called when a swarmer attempts to create a trap
Proc used to allow a swarmer to create a trap. Checks if a trap is on the tile, then if the swarmer can afford, and then places the trap.
dis_integrate
Called when a swarmer attempts to destroy a structure
Proc which determines interaction between a swarmer and a structure it is destroying Arguments:
- target - The material or object the swarmer is attempting to destroy
dismantle_machine
Called when a swarmer attempts to disassemble a machine
Proc called when a swarmer attempts to disassemble a machine. Destroys the machine, and gives the swarmer metal. Arguments:
- target - The machine the swarmer is attempting to disassemble
environment_check
/END CTRL CLICK FOR SWARMERS//// Checks whether a target atom is safe to deconstruct.
prepare_target
Called when a swarmer attempts to teleport a living entity away
Proc which finds a safe location to teleport a living entity to when a swarmer teleports it away. Also energy handcuffs carbons. Arguments:
- target - The entity the swarmer is trying to teleport away
remove_drone
Removes a drone from the swarmer's list.
Removes the drone from our list. Called specifically when a drone is about to be destroyed, so we don't have any null references. Arguments:
- mob/drone - The drone to be removed from the list.
repair_self
Called when a swarmer attempts to repair itself
Proc used to allow a swarmer self-repair. If the swarmer does not move after a period of time, then it will heal fully
swarmer_chat
Proc which is used for swarmer comms
Proc called which sends a message to all other swarmers. Arugments:
- msg - The message the swarmer is sending, gotten from ContactSwarmers()
swarmer_type_to_create
Used to determine what type of swarmer a swarmer should create
Returns the type of the swarmer to be created
toggle_light
Called when a swarmer toggles its light
Proc used to allow a swarmer to toggle its light on and off. If a swarmer has any drones, change their light settings to match their master's.