forked from BeeStation/BeeStation-Hornet
-
Notifications
You must be signed in to change notification settings - Fork 1
/
carbon.dm
127 lines (108 loc) · 3.09 KB
/
carbon.dm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
/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
key = "R"
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/select_help_intent
key = "1"
name = "select_help_intent"
full_name = "Select help intent"
description = ""
category = CATEGORY_CARBON
keybind_signal = COMSIG_KB_CARBON_SELECTHELPINTENT_DOWN
/datum/keybinding/carbon/select_help_intent/down(client/user)
. = ..()
if(.)
return
user.mob?.a_intent_change(INTENT_HELP)
return TRUE
/datum/keybinding/carbon/select_disarm_intent
key = "2"
name = "select_disarm_intent"
full_name = "Select disarm intent"
description = ""
category = CATEGORY_CARBON
keybind_signal = COMSIG_KB_CARBON_SELECTDISARMINTENT_DOWN
/datum/keybinding/carbon/select_disarm_intent/down(client/user)
. = ..()
if(.)
return
if (!iscarbon(user.mob)) return
var/mob/living/carbon/C = user.mob
C.a_intent_change(INTENT_DISARM)
return TRUE
/datum/keybinding/carbon/select_grab_intent
key = "3"
name = "select_grab_intent"
full_name = "Select grab intent"
description = ""
category = CATEGORY_CARBON
keybind_signal = COMSIG_KB_CARBON_SELECTGRABINTENT_DOWN
/datum/keybinding/carbon/select_grab_intent/down(client/user)
. = ..()
if(.)
return
if (!iscarbon(user.mob)) return
var/mob/living/carbon/C = user.mob
C.a_intent_change(INTENT_GRAB)
return TRUE
/datum/keybinding/carbon/select_harm_intent
key = "4"
name = "select_harm_intent"
full_name = "Select harm intent"
description = ""
category = CATEGORY_CARBON
keybind_signal = COMSIG_KB_CARBON_SELECTHARMINTENT_DOWN
/datum/keybinding/carbon/select_harm_intent/down(client/user)
. = ..()
if(.)
return
user.mob?.a_intent_change(INTENT_HARM)
return TRUE
/datum/keybinding/carbon/hold_throw_mode
key = "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
key = "G"
name = "Give_Item"
full_name = "Give item"
description = "Give the item you're currently holding"
category = CATEGORY_CARBON
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