two_handed ![code/datums/components/twohanded.dm 7](git.png)
Two Handed Component
When applied to an item it will make it two handed Only one of the component can exist on an item.
Vars | |
attacksound | Boolean whether to play sound on attack, if wielded |
---|---|
force_multiplier | The multiplier applied to force when wielded, does not work with force_wielded, and force_unwielded |
force_unwielded | The force of the item when unweilded |
force_wielded | The force of the item when weilded |
icon_wielded | The icon that will be used when wielded |
offhand_item | Reference to the offhand created for the item |
require_twohands | Boolean on whether it has to be held in both hands |
sharpened_increase | The amount of increase recived from sharpening the item |
unwield_callback | A callback on the parent to be called when the item is unwielded |
unwieldsound | Boolean whether to play sound when unwielded |
wield_callback | A callback on the parent to be called when the item is wielded |
wielded | Are we holding the two handed item properly |
wieldsound | Boolean whether to play sound when wielded |
Procs | |
Initialize | Two Handed component |
on_attack | on_attack triggers on attack with the parent item |
on_attack_self | Triggered on attack self of the item containing the component |
on_destroy | Triggered on destroy of the component's offhand |
on_drop | Triggered on drop of item containing the component |
on_equip | Triggered on equip of the item containing the component |
on_moved | on_moved Triggers on item moved |
on_sharpen | on_sharpen Triggers on usage of a sharpening stone on the item |
on_swapping_hands | on_swap_hands Triggers on swapping hands, blocks swap if the other hand is busy |
on_update_icon | on_update_icon triggers on call to update parent items icon |
unwield | Unwield the two handed item |
wield | Wield the two handed item in both hands |
Var Details
attacksound ![code/datums/components/twohanded.dm 22](git.png)
Boolean whether to play sound on attack, if wielded
force_multiplier ![code/datums/components/twohanded.dm 12](git.png)
The multiplier applied to force when wielded, does not work with force_wielded, and force_unwielded
force_unwielded ![code/datums/components/twohanded.dm 16](git.png)
The force of the item when unweilded
force_wielded ![code/datums/components/twohanded.dm 14](git.png)
The force of the item when weilded
icon_wielded ![code/datums/components/twohanded.dm 26](git.png)
The icon that will be used when wielded
offhand_item ![code/datums/components/twohanded.dm 28](git.png)
Reference to the offhand created for the item
require_twohands ![code/datums/components/twohanded.dm 24](git.png)
Boolean on whether it has to be held in both hands
sharpened_increase ![code/datums/components/twohanded.dm 30](git.png)
The amount of increase recived from sharpening the item
unwield_callback ![code/datums/components/twohanded.dm 36](git.png)
A callback on the parent to be called when the item is unwielded
unwieldsound ![code/datums/components/twohanded.dm 20](git.png)
Boolean whether to play sound when unwielded
wield_callback ![code/datums/components/twohanded.dm 32](git.png)
A callback on the parent to be called when the item is wielded
wielded ![code/datums/components/twohanded.dm 10](git.png)
Are we holding the two handed item properly
wieldsound ![code/datums/components/twohanded.dm 18](git.png)
Boolean whether to play sound when wielded
Proc Details
Initialize
Two Handed component
vars:
- require_twohands (optional) Does the item need both hands to be carried
- wieldsound (optional) The sound to play when wielded
- unwieldsound (optional) The sound to play when unwielded
- attacksound (optional) The sound to play when wielded and attacking
- force_multiplier (optional) The force multiplier when wielded, do not use with force_wielded, and force_unwielded
- force_wielded (optional) The force setting when the item is wielded, do not use with force_multiplier
- force_unwielded (optional) The force setting when the item is unwielded, do not use with force_multiplier
- icon_wielded (optional) The icon to be used when wielded
on_attack
on_attack triggers on attack with the parent item
on_attack_self
Triggered on attack self of the item containing the component
on_destroy
Triggered on destroy of the component's offhand
on_drop
Triggered on drop of item containing the component
on_equip
Triggered on equip of the item containing the component
on_moved
on_moved Triggers on item moved
on_sharpen
on_sharpen Triggers on usage of a sharpening stone on the item
on_swapping_hands
on_swap_hands Triggers on swapping hands, blocks swap if the other hand is busy
on_update_icon
on_update_icon triggers on call to update parent items icon
Updates the icon using icon_wielded if set
unwield
Unwield the two handed item
vars:
- user The mob/living/carbon that is unwielding the item
- show_message (option) show a message to chat on unwield
- can_drop (option) whether 'dropItemToGround' can be called or not.
wield
Wield the two handed item in both hands
vars:
- user The mob/living/carbon that is wielding the item