/
fish.dm
206 lines (152 loc) · 5.64 KB
/
fish.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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
/obj/item/reagent_containers/food/snacks/fish
abstract_type = /obj/item/reagent_containers/food/snacks/fish
name = "base fish fillet"
desc = "A fillet of fish."
icon_state = "fishfillet"
color = "#ff4040"
filling_color = "#ff4040"
center_of_mass = "x=17;y=13"
bitesize = 6
var/fish_type = "fish"
/obj/item/reagent_containers/food/snacks/fish/Initialize()
. = ..()
if (. == INITIALIZE_HINT_QDEL)
return
reagents.add_reagent(/datum/reagent/nutriment/protein, 6)
name = "[fish_type] fillet"
/obj/item/reagent_containers/food/snacks/fish/use_tool(obj/item/item, mob/living/user, list/click_params)
if (istype(item, /obj/item/reagent_containers/syringe) || !item.sharp)
return ..()
var/turf/turf = get_turf(src)
if (turf != loc || !(locate(/obj/structure/table) in turf))
to_chat(user, SPAN_WARNING("You need a table to cut \the [src]."))
return TRUE
var/list/toxins = reagents.get_reagent_amount_list(/datum/reagent/toxin)
for (var/toxin_type in toxins)
if (user.skill_fail_prob(SKILL_COOKING, 90, SKILL_MASTER))
continue
reagents.remove_reagent(toxin_type, toxins[toxin_type])
var/transfer = floor(reagents.total_volume * 0.3)
for(var/i = 1 to 3)
var/obj/item/reagent_containers/food/snacks/sashimi/sashimi = new (turf, fish_type, color)
reagents.trans_to(sashimi, transfer)
user.visible_message(SPAN_ITALIC("\The [user] slices \the [src] into thin strips."))
qdel(src)
return TRUE
/// fish/generated permits arbitrary fish type and contents setting through new (loc, "type", list(/type = amount), 1/0)
/obj/item/reagent_containers/food/snacks/fish/generated/Initialize(_mapload, _fish_type, list/_reagents, _replace_reagents)
. = ..()
if (_fish_type)
fish_type = _fish_type
name = "[fish_type] fillet"
if (_replace_reagents)
reagents.clear_reagents()
for (var/reagent in _reagents)
reagents.add_reagent(reagent, _reagents[reagent])
/obj/item/reagent_containers/food/snacks/fish/space_carp
fish_type = "space carp"
color = "#e657aa"
filling_color = "#e657aa"
/obj/item/reagent_containers/food/snacks/fish/space_carp/Initialize()
. = ..()
reagents.add_reagent(/datum/reagent/toxin/carpotoxin, 6)
/obj/item/reagent_containers/food/snacks/fish/space_pike
fish_type = "space pike"
color = "#f73fd6"
filling_color = "#f73fd6"
/obj/item/reagent_containers/food/snacks/fish/space_pike/Initialize()
. = ..()
reagents.add_reagent(/datum/reagent/toxin/carpotoxin, 11)
/obj/item/reagent_containers/food/snacks/fish/space_shark
fish_type = "cosmoshark"
color = "#8925d4"
filling_color = "#8925d4"
/obj/item/reagent_containers/food/snacks/fish/space_shark/Initialize()
. = ..()
reagents.add_reagent(/datum/reagent/nutriment/protein, 5)
reagents.add_reagent(/datum/reagent/drugs/hextro, 1)
reagents.add_reagent(/datum/reagent/toxin/phoron, 1)
/obj/item/reagent_containers/food/snacks/fish/cod
fish_type = "cod"
color = "#ecc69e"
filling_color = "#ecc69e"
/obj/item/reagent_containers/food/snacks/fish/hake
fish_type = "hake"
color = "#ecc69e"
filling_color = "#ecc69e"
/obj/item/reagent_containers/food/snacks/fish/bream
fish_type = "bream"
color = "#ecc69e"
filling_color = "#ecc69e"
/obj/item/reagent_containers/food/snacks/fish/salmon
fish_type = "salmon"
color = "#e69457"
filling_color = "#e69457"
/obj/item/reagent_containers/food/snacks/fish/tuna
fish_type = "tuna"
/obj/item/reagent_containers/food/snacks/fish/mackerel
fish_type = "mackerel"
color = "#ecc69e"
filling_color = "#ecc69e"
/obj/item/reagent_containers/food/snacks/fish/trout
fish_type = "trout"
color = "#e69457"
filling_color = "#e69457"
/obj/item/reagent_containers/food/snacks/fish/tilapia
fish_type = "tilapia"
color = "#ecc69e"
filling_color = "#ecc69e"
/obj/item/reagent_containers/food/snacks/fish/bass
fish_type = "bass"
color = "#ecc69e"
filling_color = "#ecc69e"
/obj/item/reagent_containers/food/snacks/fish/shark
fish_type = "shark"
/obj/item/reagent_containers/food/snacks/fish/squid
fish_type = "squid"
color = "#dbd6d0"
filling_color = "#dbd6d0"
/obj/item/reagent_containers/food/snacks/fish/octopus
fish_type = "octopus"
color = "#dbd6d0"
filling_color = "#dbd6d0"
/obj/item/reagent_containers/food/snacks/fish/eel
fish_type = "eel"
color = "#ecc69e"
filling_color = "#ecc69e"
/obj/item/reagent_containers/food/snacks/fish/carp
fish_type = "carp"
color = "#e66457"
filling_color = "#e66457"
/obj/item/reagent_containers/food/snacks/fish/catfish
fish_type = "catfish"
color = "#dbd6d0"
filling_color = "#dbd6d0"
/obj/item/reagent_containers/food/snacks/fish/unknown
fish_type = "suspicious"
color = "#ecc69e"
filling_color = "#ecc69e"
/obj/random/fish
name = "random fish fillet"
desc = "This is a random fish fillet."
icon = 'icons/obj/food/food.dmi'
icon_state = "fishfillet"
color = "#ff4040"
/obj/random/fish/spawn_choices()
return list(
/obj/item/reagent_containers/food/snacks/fish/cod = 4,
/obj/item/reagent_containers/food/snacks/fish/hake = 4,
/obj/item/reagent_containers/food/snacks/fish/bream = 4,
/obj/item/reagent_containers/food/snacks/fish/tilapia = 4,
/obj/item/reagent_containers/food/snacks/fish/bass = 4,
/obj/item/reagent_containers/food/snacks/fish/salmon = 3,
/obj/item/reagent_containers/food/snacks/fish/tuna = 3,
/obj/item/reagent_containers/food/snacks/fish/mackerel = 3,
/obj/item/reagent_containers/food/snacks/fish/trout = 3,
/obj/item/reagent_containers/food/snacks/fish/shark = 3,
/obj/item/reagent_containers/food/snacks/fish/squid = 3,
/obj/item/reagent_containers/food/snacks/fish/octopus = 2,
/obj/item/reagent_containers/food/snacks/fish/eel = 2,
/obj/item/reagent_containers/food/snacks/fish/carp = 2,
/obj/item/reagent_containers/food/snacks/fish/catfish = 1
)