mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-13 08:03:43 +01:00
Fixes some issues with revs (#22308)
* fixes to revs * Update code/game/objects/items/weapons/implants/implant_mindshield.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> * UH OH. --------- Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
// To add a rev to the list of revolutionaries, make sure it's rev (with if(ticker.mode.name == "revolution)),
|
||||
// then call ticker.mode:add_revolutionary(_THE_PLAYERS_MIND_)
|
||||
// then call SSticker.mode.add_revolutionary(_THE_PLAYERS_MIND_)
|
||||
// nothing else needs to be done, as that proc will check if they are a valid target.
|
||||
// Just make sure the converter is a head before you call it!
|
||||
// To remove a rev (from brainwashing or w/e), call ticker.mode:remove_revolutionary(_THE_PLAYERS_MIND_),
|
||||
// To remove a rev (from brainwashing or w/e), call SSticker.mode.remove_revolutionary(_THE_PLAYERS_MIND_),
|
||||
// this will also check they're not a head, so it can just be called freely
|
||||
// If the game somtimes isn't registering a win properly, then ticker.mode.check_win() isn't being called somewhere.
|
||||
// If the game somtimes isn't registering a win properly, then SSticker.mode.check_win() isn't being called somewhere.
|
||||
|
||||
#define REV_VICTORY 1
|
||||
#define STATION_VICTORY 2
|
||||
@@ -243,10 +242,10 @@
|
||||
var/comcount = 0
|
||||
var/revcount = 0
|
||||
var/loycount = 0
|
||||
for(var/datum/mind/M in SSticker.mode:head_revolutionaries)
|
||||
for(var/datum/mind/M in SSticker.mode.head_revolutionaries)
|
||||
if(M.current && M.current.stat != DEAD)
|
||||
foecount++
|
||||
for(var/datum/mind/M in SSticker.mode:revolutionaries)
|
||||
for(var/datum/mind/M in SSticker.mode.revolutionaries)
|
||||
if(M.current && M.current.stat != DEAD)
|
||||
revcount++
|
||||
|
||||
@@ -284,13 +283,13 @@
|
||||
return dat
|
||||
|
||||
/proc/is_revolutionary(mob/living/M)
|
||||
return istype(M) && (M?.mind in SSticker?.mode?.revolutionaries)
|
||||
return istype(M) && M?.mind?.has_antag_datum(/datum/antagonist/rev, FALSE)
|
||||
|
||||
/proc/is_headrev(mob/living/M)
|
||||
return istype(M) && (M?.mind in SSticker?.mode?.head_revolutionaries)
|
||||
return istype(M) && M?.mind?.has_antag_datum(/datum/antagonist/rev/head)
|
||||
|
||||
/proc/is_any_revolutionary(mob/living/M)
|
||||
return is_revolutionary(M) || is_headrev(M)
|
||||
return istype(M) && M?.mind?.has_antag_datum(/datum/antagonist/rev)
|
||||
|
||||
#undef REV_VICTORY
|
||||
#undef STATION_VICTORY
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
implant_state = "implant-nanotrasen"
|
||||
|
||||
/obj/item/implant/mindshield/can_implant(mob/source, mob/user)
|
||||
if(source.mind in SSticker.mode.head_revolutionaries)
|
||||
if(source.mind?.has_antag_datum(/datum/antagonist/rev/head))
|
||||
source.visible_message("<span class='biggerdanger'>[source] seems to resist [src]!</span>",
|
||||
"<span class='warning'>You feel something interfering with your mental conditioning, but you resist it!</span>")
|
||||
return FALSE
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
var/sec_diminish = (8 - sec) / 3 // 2 seccies = 2, 5 seccies = 1, 8 seccies = 0
|
||||
|
||||
var/potential = round(heads - sec_diminish) // more sec, increases. more heads, increases
|
||||
var/how_many_more_headrevs = clamp(potential, clamp_at, head_revolutionaries - max_headrevs)
|
||||
var/how_many_more_headrevs = clamp(potential, clamp_at, max_headrevs - head_revolutionaries)
|
||||
|
||||
return how_many_more_headrevs
|
||||
|
||||
|
||||
Reference in New Issue
Block a user