|
238 | 238 | span_notice("Вы трясёте [name], пытаясь разбудить [genderize_ru(gender, "его", "её", "его", "их")]."),\
|
239 | 239 | )
|
240 | 240 |
|
241 |
| - else if(on_fire) |
242 |
| - var/self_message = span_warning("Вы пытаетесь потушить [name].") |
243 |
| - if(prob(30) && ishuman(M)) // 30% chance of burning your hands |
244 |
| - var/mob/living/carbon/human/H = M |
245 |
| - var/protected = FALSE // Protected from the fire |
246 |
| - if((H.gloves?.max_heat_protection_temperature > 360) || HAS_TRAIT(H, TRAIT_RESIST_HEAT)) |
247 |
| - protected = TRUE |
248 |
| - if(!protected) |
249 |
| - H.apply_damage(5, BURN, def_zone = H.hand ? BODY_ZONE_PRECISE_L_HAND : BODY_ZONE_PRECISE_R_HAND) |
250 |
| - self_message = span_danger("Вы обжигаете свои руки, пытаясь потушить [name]!") |
251 |
| - H.update_icons() |
252 |
| - |
253 |
| - M.visible_message(span_warning("[M] пыта[pluralize_ru(M.gender, "ет", "ют")]ся потушить [name]."), self_message) |
254 |
| - playsound(get_turf(src), 'sound/weapons/thudswoosh.ogg', 50, 1, -1) |
255 |
| - adjust_fire_stacks(-0.5) |
256 |
| - |
257 | 241 | // BEGIN HUGCODE - N3X
|
258 | 242 | else
|
259 | 243 | playsound(get_turf(src), 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
|
275 | 259 | else if(H.w_uniform)
|
276 | 260 | H.w_uniform.add_fingerprint(M)
|
277 | 261 |
|
| 262 | +/** |
| 263 | + * Handles patting out a fire on someone. |
| 264 | + * |
| 265 | + * Removes 0.5 fire stacks per pat, with a 30% chance of the user burning their hand if they don't have adequate heat resistance. |
| 266 | + * Arguments: |
| 267 | + * * src - The mob doing the patting |
| 268 | + * * target - The mob who is currently on fire |
| 269 | + */ |
| 270 | +/mob/living/carbon/proc/pat_out(mob/living/target) |
| 271 | + if(target == src) // stop drop and roll, no trying to put out fire on yourself for free. |
| 272 | + to_chat(src, "<span class='warning'>Stop drop and roll!</span>") |
| 273 | + return |
| 274 | + var/self_message = span_warning("Вы пытаетесь потушить [name].") |
| 275 | + if(prob(30) && ishuman(src)) // 30% chance of burning your hands |
| 276 | + var/mob/living/carbon/human/H = src |
| 277 | + var/protected = FALSE // Protected from the fire |
| 278 | + if((H.gloves?.max_heat_protection_temperature > 360) || HAS_TRAIT(H, TRAIT_RESIST_HEAT)) |
| 279 | + protected = TRUE |
| 280 | + |
| 281 | + var/obj/item/organ/external/active_hand = H.get_active_hand() |
| 282 | + if(active_hand && !protected) // Wouldn't really work without a hand |
| 283 | + active_hand.external_receive_damage(0, 5) |
| 284 | + self_message = span_danger("Вы обжигаете свои руки, пытаясь потушить [name]!") |
| 285 | + H.update_icons() |
| 286 | + |
| 287 | + target.visible_message(span_warning("[target] пыта[pluralize_ru(target.gender, "ет", "ют")]ся потушить [name]."), self_message) |
| 288 | + playsound(target, 'sound/weapons/thudswoosh.ogg', 50, TRUE, -1) |
| 289 | + target.adjust_fire_stacks(-0.5) |
278 | 290 |
|
279 | 291 | /mob/living/carbon/proc/check_self_for_injuries()
|
280 | 292 | var/mob/living/carbon/human/H = src
|
|
0 commit comments