attachment 
        
    
            
        
Base attachment. "_a" icons should be 5x5 pixels. See icons/obj/guns/attachment.dmi.
| Vars | |
| actions_list | List of actions to add to the gun when attached. See code/modules/projectiles/attachments/laser_sight.dm for example. | 
|---|---|
| attach_verb | "You slide the attachment into place on gun." | 
| attachment_type | Attachments that are not exclusive i.e. attaches to the side of the barrel should have an attachment_type of 0. Otherwise, use one or many bitflags to represent the exclusive space this attachment should occuy. | 
| icon_state | Attached sprite adds "_a" e.g. "iconname_a" | 
| is_on | If the attachment can be "turned on", it will use "_on" e.g. "iconname_on_a" and "iconname_on". It is important to note that not all attachments can be turned on, so you don't have to worry about this most of the time. | 
| Procs | |
| on_attach | Called when the attacment is attached to a weapon | 
| on_detach | Called when the attachment is detached from a weapon | 
Var Details
actions_list
            
        
    
            
        
        List of actions to add to the gun when attached. See code/modules/projectiles/attachments/laser_sight.dm for example.
attach_verb
            
        
    
            
        
        "You slide the attachment into place on gun."
attachment_type
            
        
    
            
        
        Attachments that are not exclusive i.e. attaches to the side of the barrel should have an attachment_type of 0. Otherwise, use one or many bitflags to represent the exclusive space this attachment should occuy.
icon_state
            
        
    
            
        
        Attached sprite adds "_a" e.g. "iconname_a"
is_on
            
        
    
            
        
        If the attachment can be "turned on", it will use "_on" e.g. "iconname_on_a" and "iconname_on". It is important to note that not all attachments can be turned on, so you don't have to worry about this most of the time.
Proc Details
on_attach
Called when the attacment is attached to a weapon
on_detach
Called when the attachment is detached from a weapon