Skip to content

Commit 2810e28

Browse files
committed
ахуеть, у нас всё это время был механ тушения жопы кента
1 parent 14f8dbe commit 2810e28

File tree

3 files changed

+38
-21
lines changed

3 files changed

+38
-21
lines changed

code/modules/mob/living/carbon/alien/alien_defense.dm

+8-5
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,22 @@
4747

4848
/mob/living/carbon/alien/attack_hand(mob/living/carbon/human/M)
4949
if(..()) //to allow surgery to return properly.
50-
return 0
50+
return FALSE
5151

5252
switch(M.a_intent)
5353
if(INTENT_HELP)
54-
help_shake_act(M)
54+
if(M.on_fire)
55+
pat_out(M)
56+
else
57+
help_shake_act(M)
5558
if(INTENT_GRAB)
5659
grabbedby(M)
5760
if(INTENT_HARM)
5861
M.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
5962
if(INTENT_DISARM)
6063
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
61-
return 1
62-
return 0
64+
return TRUE
65+
return FALSE
6366

6467

6568
/mob/living/carbon/alien/attack_animal(mob/living/simple_animal/M)
@@ -70,7 +73,7 @@
7073

7174

7275
/mob/living/carbon/alien/acid_act(acidpwr, acid_volume)
73-
return 0 //aliens are immune to acid.
76+
return FALSE //aliens are immune to acid.
7477

7578
/mob/living/carbon/alien/attack_slime(mob/living/simple_animal/slime/M)
7679
if(..()) //successful slime attack

code/modules/mob/living/carbon/carbon.dm

+28-16
Original file line numberDiff line numberDiff line change
@@ -238,22 +238,6 @@
238238
span_notice("Вы трясёте [name], пытаясь разбудить [genderize_ru(gender, "его", "её", "его", "их")]."),\
239239
)
240240

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-
257241
// BEGIN HUGCODE - N3X
258242
else
259243
playsound(get_turf(src), 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
@@ -275,6 +259,34 @@
275259
else if(H.w_uniform)
276260
H.w_uniform.add_fingerprint(M)
277261

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)
278290

279291
/mob/living/carbon/proc/check_self_for_injuries()
280292
var/mob/living/carbon/human/H = src

code/modules/mob/living/carbon/human/species/_species.dm

+2
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,8 @@
487487
/datum/species/proc/help(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
488488
if(attacker_style && attacker_style.help_act(user, target) == TRUE)//adminfu only...
489489
return TRUE
490+
if(target.on_fire)
491+
user.pat_out(target)
490492
else if(target.health >= HEALTH_THRESHOLD_CRIT && !HAS_TRAIT(target, TRAIT_FAKEDEATH) && target.stat != DEAD)
491493
target.help_shake_act(user)
492494
return TRUE

0 commit comments

Comments
 (0)