mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 19:17:50 +01:00
Refactors revolution code to be a little less of a mess (#20327)
* Refactors revolution code * Ad comment to transit_z * Add heads check to transit_z * Rename parameter in transit_z * Fix duplicate definition of latespawn * Remove unused check_counter var * Apply suggestions from code review from Sirryan2002 Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> * Added early return to conversion proc * Apply suggestions from code review Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com> Co-authored-by: Farie82 <farie82@users.noreply.github.com> --------- Co-authored-by: adrermail@gmail.com <adrermail@gmail.com> Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com> Co-authored-by: Farie82 <farie82@users.noreply.github.com>
This commit is contained in:
co-authored by
Ryan
SteelSlayer
Farie82
adrermail@gmail.com <adrermail@gmail.com>
parent
b33d6aa080
commit
732914dda7
@@ -104,7 +104,7 @@
|
||||
if(targeted)
|
||||
if(M.flash_eyes(1, 1))
|
||||
M.AdjustConfused(power)
|
||||
terrible_conversion_proc(M, user)
|
||||
revolution_conversion(M, user)
|
||||
M.drop_l_hand()
|
||||
M.drop_r_hand()
|
||||
visible_message("<span class='disarm'>[user] blinds [M] with [src]!</span>")
|
||||
@@ -155,29 +155,15 @@
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/flash/proc/terrible_conversion_proc(mob/M, mob/user)
|
||||
if(ishuman(M) && ishuman(user) && M.stat != DEAD)
|
||||
if(user.mind && (user.mind in SSticker.mode.head_revolutionaries))
|
||||
if(M.client)
|
||||
if(M.stat == CONSCIOUS)
|
||||
M.mind_initialize() //give them a mind datum if they don't have one.
|
||||
var/resisted
|
||||
if(!ismindshielded(M))
|
||||
if(user.mind in SSticker.mode.head_revolutionaries)
|
||||
if(SSticker.mode.add_revolutionary(M.mind))
|
||||
times_used -- //Flashes less likely to burn out for headrevs when used for conversion
|
||||
else
|
||||
resisted = 1
|
||||
else
|
||||
resisted = 1
|
||||
|
||||
if(resisted)
|
||||
to_chat(user, "<span class='warning'>This mind seems resistant to [src]!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>They must be conscious before you can convert [M.p_them()]!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>This mind is so vacant that it is not susceptible to influence!</span>")
|
||||
|
||||
/obj/item/flash/proc/revolution_conversion(mob/M, mob/user)
|
||||
if(!ishuman(M) || !(user.mind in SSticker.mode.head_revolutionaries))
|
||||
return
|
||||
if(M.stat != CONSCIOUS)
|
||||
to_chat(user, "<span class='warning'>They must be conscious before you can convert [M.p_them()]!</span>")
|
||||
else if(SSticker.mode.add_revolutionary(M.mind))
|
||||
times_used-- //Flashes less likely to burn out for headrevs when used for conversion
|
||||
else
|
||||
to_chat(user, "<span class='warning'>This mind seems resistant to [src]!</span>")
|
||||
|
||||
/obj/item/flash/cyborg
|
||||
origin_tech = null
|
||||
|
||||
Reference in New Issue
Block a user