/
tools.dm
118 lines (80 loc) · 2.98 KB
/
tools.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
/// True when this atom can be used as a wrench.
/atom/proc/IsWrench()
return FALSE
/// Defines the base wrench as useable as a wrench.
/obj/item/wrench/IsWrench()
return TRUE
/// True when A exists and can be used as a wrench.
#define isWrench(A) (A?.IsWrench())
/// True when this atom can be used as a Welder.
/atom/proc/IsWelder()
return FALSE
/// Defines the base welder as useable as a welder.
/obj/item/weldingtool/IsWelder()
return TRUE
/// True when A exists and can be used as a welder.
#define isWelder(A) (A?.IsWelder())
/// True when this atom can be used as a cable coil.
/atom/proc/IsCoil()
return FALSE
/// Defines the base coil as useable as a cable coil.
/obj/item/stack/cable_coil/IsCoil()
return TRUE
/// True when A exists and can be used as a cable coil.
#define isCoil(A) (A?.IsCoil())
/// True when this atom can be used as a wirecutter.
/atom/proc/IsWirecutter()
return FALSE
/// Defines the base wirecutter as useable as a wirecutter.
/obj/item/wirecutters/IsWirecutter()
return TRUE
/// True when A exists and can be used as a wirecutter.
#define isWirecutter(A) (A?.IsWirecutter())
/// True when this atom can be used as a screwdriver.
/atom/proc/IsScrewdriver()
return FALSE
/// Defines the base screwdriver as useable as a screwdriver.
/obj/item/screwdriver/IsScrewdriver()
return TRUE
/// True when A exists and can be used as a screwdriver.
#define isScrewdriver(A) (A?.IsScrewdriver())
/// True when this atom can be used as a multitool.
/atom/proc/IsMultitool()
return FALSE
/// Defines the base multitool as useable as a multitool.
/obj/item/device/multitool/IsMultitool()
return TRUE
/// True when A exists and can be used as a multitool.
#define isMultitool(A) (A?.IsMultitool())
/// True when this atom can be used as a crowbar.
/atom/proc/IsCrowbar()
return FALSE
/// Defines the base crowbar as useable as a crowbar.
/obj/item/crowbar/IsCrowbar()
return TRUE
/// True when A exists and can be used as a crowbar.
#define isCrowbar(A) (A?.IsCrowbar())
/// True when this atom can be used as a hatchet.
/atom/proc/IsHatchet()
return FALSE
/// Defines the base hatchet as useable as a hatchet.
/obj/item/material/hatchet/IsHatchet()
return TRUE
/// True when A exists and can be used as a hatchet.
#define isHatchet(A) (A?.IsHatchet())
/// True when this atom can be used as a flame source. This is for open flames.
/atom/proc/IsFlameSource()
return FALSE
/// True when A exists and can be used as a flame source.
#define isFlameSource(A) (A?.IsFlameSource())
/**
* Returns an integer value of temperature when this atom can be used as a heat source. This is for hot objects.
*
* Defaults to `1000` if `IsFlameSource()` returns `TRUE`, otherwise `0`.
*/
/atom/proc/IsHeatSource()
return IsFlameSource() ? 1000 : 0
/// 0 if A does not exist, or the heat value of A
#define isHeatSource(A) (A ? A.IsHeatSource() : 0)
/// True when A exists and is either a flame or heat source
#define isFlameOrHeatSource(A) (A && (A.IsFlameSource() || !!A.IsHeatSource()))