mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-15 04:01:41 +00:00
* Adds a hotkey that puts you in throw mode aslong as you hold it (#57331) Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com> * Adds a hotkey that puts you in throw mode aslong as you hold it * a Co-authored-by: Qustinnus <Floydje123@hotmail.com> Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com> Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
59 lines
1.6 KiB
Plaintext
59 lines
1.6 KiB
Plaintext
/datum/keybinding/carbon
|
|
category = CATEGORY_CARBON
|
|
weight = WEIGHT_MOB
|
|
|
|
/datum/keybinding/carbon/can_use(client/user)
|
|
return iscarbon(user.mob)
|
|
|
|
/datum/keybinding/carbon/toggle_throw_mode
|
|
hotkey_keys = list("R", "Southwest") // END
|
|
name = "toggle_throw_mode"
|
|
full_name = "Toggle throw mode"
|
|
description = "Toggle throwing the current item or not."
|
|
category = CATEGORY_CARBON
|
|
keybind_signal = COMSIG_KB_CARBON_TOGGLETHROWMODE_DOWN
|
|
|
|
/datum/keybinding/carbon/toggle_throw_mode/down(client/user)
|
|
. = ..()
|
|
if(.)
|
|
return
|
|
var/mob/living/carbon/C = user.mob
|
|
C.toggle_throw_mode()
|
|
return TRUE
|
|
|
|
/datum/keybinding/carbon/hold_throw_mode
|
|
hotkey_keys = list("Space")
|
|
name = "hold_throw_mode"
|
|
full_name = "Hold throw mode"
|
|
description = "Hold this to turn on throw mode, and release it to turn off throw mode"
|
|
category = CATEGORY_CARBON
|
|
keybind_signal = COMSIG_KB_CARBON_HOLDTHROWMODE_DOWN
|
|
|
|
/datum/keybinding/carbon/hold_throw_mode/down(client/user)
|
|
. = ..()
|
|
if(.)
|
|
return
|
|
var/mob/living/carbon/carbon_user = user.mob
|
|
carbon_user.throw_mode_on(THROW_MODE_HOLD)
|
|
|
|
/datum/keybinding/carbon/hold_throw_mode/up(client/user)
|
|
. = ..()
|
|
if(.)
|
|
return
|
|
var/mob/living/carbon/carbon_user = user.mob
|
|
carbon_user.throw_mode_off(THROW_MODE_HOLD)
|
|
/datum/keybinding/carbon/give
|
|
hotkey_keys = list("G")
|
|
name = "Give_Item"
|
|
full_name = "Give item"
|
|
description = "Give the item you're currently holding"
|
|
keybind_signal = COMSIG_KB_CARBON_GIVEITEM_DOWN
|
|
|
|
/datum/keybinding/carbon/give/down(client/user)
|
|
. = ..()
|
|
if(.)
|
|
return
|
|
var/mob/living/carbon/carbon_user = user.mob
|
|
carbon_user.give()
|
|
return TRUE
|