Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes fire resist spamming #5253

Merged
merged 3 commits into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions code/modules/mob/living/carbon/xenomorph/Xenomorph.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1011,22 +1011,21 @@
SPAN_NOTICE("We extinguish ourselves."), null, 5)

/mob/living/carbon/xenomorph/resist_restraints()
if(!legcuffed)
return
var/breakouttime = legcuffed.breakouttime

next_move = world.time + 100
last_special = world.time + 10
next_move = world.time + 10 SECONDS
last_special = world.time + 1 SECONDS

var/displaytime = max(1, round(breakouttime / 600)) //Minutes
to_chat(src, SPAN_WARNING("We attempt to remove [legcuffed]. (This will take around [displaytime] minute(s) and we must stand still)"))
for(var/mob/O in viewers(src))
O.show_message(SPAN_DANGER("<B>[usr] attempts to remove [legcuffed]!</B>"), SHOW_MESSAGE_VISIBLE)
if(!do_after(src, breakouttime, INTERRUPT_NO_NEEDHAND^INTERRUPT_RESIST, BUSY_ICON_HOSTILE))
visible_message(SPAN_DANGER("<b>[src] attempts to remove [legcuffed]!</b>"),
SPAN_WARNING("We attempt to remove [legcuffed]. (This will take around [displaytime] minute\s and we must stand still)"))
if(!do_after(src, breakouttime, INTERRUPT_NO_NEEDHAND ^ INTERRUPT_RESIST, BUSY_ICON_HOSTILE))
return
if(!legcuffed || buckled)
return // time leniency for lag which also might make this whole thing pointless but the server
for(var/mob/O in viewers(src))// lags so hard that 40s isn't lenient enough - Quarxink
O.show_message(SPAN_DANGER("<B>[src] manages to remove [legcuffed]!</B>"), SHOW_MESSAGE_VISIBLE)
to_chat(src, SPAN_NOTICE(" We successfully remove [legcuffed]."))
return
visible_message(SPAN_DANGER("<b>[src] manages to remove [legcuffed]!</b>"), SPAN_NOTICE("We successfully remove [legcuffed]."))
drop_inv_item_on_ground(legcuffed)

/mob/living/carbon/xenomorph/IgniteMob()
Expand Down
17 changes: 4 additions & 13 deletions code/modules/mob/living/living_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -170,25 +170,16 @@
return

//breaking out of handcuffs & putting out fires
if(!is_mob_incapacitated(TRUE))
if(mobility_flags & MOBILITY_MOVE)
if(on_fire)
resist_fire()

var/on_acid = FALSE
for(var/datum/effects/acid/A in effects_list)
on_acid = TRUE
break
if(on_acid)
if(is_type_in_list(/datum/effects/acid, effects_list))
resist_acid()
if(last_special <= world.time)
resist_restraints()

SEND_SIGNAL(src, COMSIG_MOB_RESISTED)

if(!iscarbon(src))
return
var/mob/living/carbon/C = src
if((C.handcuffed || C.legcuffed) && (C.mobility_flags & MOBILITY_MOVE) && (C.last_special <= world.time))
resist_restraints()

/mob/living/proc/resist_buckle()
buckled.manual_unbuckle(src)

Expand Down
Loading