bayonet_attachable ![code/datums/components/bayonet_attachable.dm 5](git.png)
Component which allows you to attach a bayonet to an item, be it a piece of clothing or a tool.
Vars | |
allow_sawnoff | If this component allows sawing off the parent gun/should be deleted when the parent gun is sawn off |
---|---|
bayonet | Currently attached bayonet |
bayonet_icon_state | If passed, we wil simply update our item's icon_state when a bayonet is attached. Formatted as parent_base_state-[bayonet_icon_state-state] |
bayonet_overlay | If passed, we will use a specific overlay instead of using the knife itself The state to take from the bayonet overlay icon if supplied. |
bayonet_overlay_icon | This is the icon file it grabs the overlay from. |
offset_x | Offsets for the bayonet overlay |
removable | Whenever we can remove the bayonet with a screwdriver |
valid_bayonets | Static typecache of all knives that can become bayonets |
Var Details
allow_sawnoff ![code/datums/components/bayonet_attachable.dm 20](git.png)
If this component allows sawing off the parent gun/should be deleted when the parent gun is sawn off
bayonet ![code/datums/components/bayonet_attachable.dm 24](git.png)
Currently attached bayonet
bayonet_icon_state ![code/datums/components/bayonet_attachable.dm 10](git.png)
If passed, we wil simply update our item's icon_state when a bayonet is attached. Formatted as parent_base_state-[bayonet_icon_state-state]
bayonet_overlay ![code/datums/components/bayonet_attachable.dm 13](git.png)
If passed, we will use a specific overlay instead of using the knife itself The state to take from the bayonet overlay icon if supplied.
bayonet_overlay_icon ![code/datums/components/bayonet_attachable.dm 15](git.png)
This is the icon file it grabs the overlay from.
offset_x ![code/datums/components/bayonet_attachable.dm 17](git.png)
Offsets for the bayonet overlay
removable ![code/datums/components/bayonet_attachable.dm 7](git.png)
Whenever we can remove the bayonet with a screwdriver
valid_bayonets ![code/datums/components/bayonet_attachable.dm 26](git.png)
Static typecache of all knives that can become bayonets