mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
[READY] Fixes Sentience Potion notifications and role management (#39994)
* -Fixed intelli potions requiring you to have Xeno toggled on in special preferences to be notified. -Split xenos, intelli potions, and mind transfer potions into separate roles for a more precise role management. * -Made sentience potions and mind transfer potion roles bannable from jobban panel. -Gave Sentience potion role its own toggle in game preferences. * Fixed bad reference * Cleaned up role references * Cleaned up a few defines * Cleaned up more defines
This commit is contained in:
committed by
yogstation13-bot
parent
46ac518fda
commit
05b9a683ca
@@ -6,27 +6,33 @@
|
||||
|
||||
//These are synced with the Database, if you change the values of the defines
|
||||
//then you MUST update the database!
|
||||
#define ROLE_SYNDICATE "Syndicate"
|
||||
#define ROLE_TRAITOR "traitor"
|
||||
#define ROLE_OPERATIVE "operative"
|
||||
#define ROLE_CHANGELING "changeling"
|
||||
#define ROLE_WIZARD "wizard"
|
||||
#define ROLE_MALF "malf AI"
|
||||
#define ROLE_REV "revolutionary"
|
||||
#define ROLE_REV_HEAD "Head Revolutionary"
|
||||
#define ROLE_ALIEN "xenomorph"
|
||||
#define ROLE_PAI "pAI"
|
||||
#define ROLE_CULTIST "cultist"
|
||||
#define ROLE_BLOB "blob"
|
||||
#define ROLE_NINJA "space ninja"
|
||||
#define ROLE_MONKEY "monkey"
|
||||
#define ROLE_ABDUCTOR "abductor"
|
||||
#define ROLE_REVENANT "revenant"
|
||||
#define ROLE_DEVIL "devil"
|
||||
#define ROLE_SERVANT_OF_RATVAR "servant of Ratvar"
|
||||
#define ROLE_BROTHER "blood brother"
|
||||
#define ROLE_BRAINWASHED "brainwashed victim"
|
||||
#define ROLE_OVERTHROW "syndicate mutineer"
|
||||
#define ROLE_SYNDICATE "Syndicate"
|
||||
#define ROLE_TRAITOR "traitor"
|
||||
#define ROLE_OPERATIVE "operative"
|
||||
#define ROLE_CHANGELING "changeling"
|
||||
#define ROLE_WIZARD "wizard"
|
||||
#define ROLE_MALF "malf AI"
|
||||
#define ROLE_REV "revolutionary"
|
||||
#define ROLE_REV_HEAD "Head Revolutionary"
|
||||
#define ROLE_ALIEN "xenomorph"
|
||||
#define ROLE_PAI "pAI"
|
||||
#define ROLE_CULTIST "cultist"
|
||||
#define ROLE_BLOB "blob"
|
||||
#define ROLE_NINJA "space ninja"
|
||||
#define ROLE_MONKEY "monkey"
|
||||
#define ROLE_ABDUCTOR "abductor"
|
||||
#define ROLE_REVENANT "revenant"
|
||||
#define ROLE_DEVIL "devil"
|
||||
#define ROLE_SERVANT_OF_RATVAR "servant of Ratvar"
|
||||
#define ROLE_BROTHER "blood brother"
|
||||
#define ROLE_BRAINWASHED "brainwashed victim"
|
||||
#define ROLE_OVERTHROW "syndicate mutineer"
|
||||
#define ROLE_SENTIENCE "sentience potion spawn"
|
||||
#define ROLE_MIND_TRANSFER "mind transfer potion"
|
||||
#define ROLE_POSIBRAIN "posibrain"
|
||||
#define ROLE_DRONE "drone"
|
||||
#define ROLE_DEATHSQUAD "deathsquad"
|
||||
#define ROLE_LAVALAND "lavaland"
|
||||
|
||||
//Missing assignment means it's not a gamemode specific role, IT'S NOT A BUG OR ERROR.
|
||||
//The gamemode specific ones are just so the gamemodes can query whether a player is old enough
|
||||
@@ -49,7 +55,8 @@ GLOBAL_LIST_INIT(special_roles, list(
|
||||
ROLE_ABDUCTOR,
|
||||
ROLE_DEVIL = /datum/game_mode/devil,
|
||||
ROLE_SERVANT_OF_RATVAR = /datum/game_mode/clockwork_cult,
|
||||
ROLE_OVERTHROW = /datum/game_mode/overthrow
|
||||
ROLE_OVERTHROW = /datum/game_mode/overthrow,
|
||||
ROLE_SENTIENCE
|
||||
))
|
||||
|
||||
//Job defines for what happens when you fail to qualify for any job during job selection
|
||||
|
||||
@@ -835,30 +835,35 @@
|
||||
|
||||
|
||||
//Drones
|
||||
if(jobban_isbanned(M, "drone"))
|
||||
dat += "<td width='20%'><a href='?src=[REF(src)];[HrefToken()];jobban3=drone;jobban4=[REF(M)]'><font color=red>Drone</font></a></td>"
|
||||
if(jobban_isbanned(M, ROLE_DRONE))
|
||||
dat += "<td width='20%'><a href='?src=[REF(src)];[HrefToken()];jobban3=[ROLE_DRONE];jobban4=[REF(M)]'><font color=red>Drone</font></a></td>"
|
||||
else
|
||||
dat += "<td width='20%'><a href='?src=[REF(src)];[HrefToken()];jobban3=drone;jobban4=[REF(M)]'>Drone</a></td>"
|
||||
dat += "<td width='20%'><a href='?src=[REF(src)];[HrefToken()];jobban3=[ROLE_DRONE];jobban4=[REF(M)]'>Drone</a></td>"
|
||||
|
||||
|
||||
//Positronic Brains
|
||||
if(jobban_isbanned(M, "posibrain"))
|
||||
dat += "<td width='20%'><a href='?src=[REF(src)];[HrefToken()];jobban3=posibrain;jobban4=[REF(M)]'><font color=red>Posibrain</font></a></td>"
|
||||
if(jobban_isbanned(M, ROLE_POSIBRAIN))
|
||||
dat += "<td width='20%'><a href='?src=[REF(src)];[HrefToken()];jobban3=[ROLE_POSIBRAIN];jobban4=[REF(M)]'><font color=red>Posibrain</font></a></td>"
|
||||
else
|
||||
dat += "<td width='20%'><a href='?src=[REF(src)];[HrefToken()];jobban3=posibrain;jobban4=[REF(M)]'>Posibrain</a></td>"
|
||||
dat += "<td width='20%'><a href='?src=[REF(src)];[HrefToken()];jobban3=[ROLE_POSIBRAIN];jobban4=[REF(M)]'>Posibrain</a></td>"
|
||||
|
||||
//Sentience Potion Spawn
|
||||
if(jobban_isbanned(M, ROLE_SENTIENCE))
|
||||
dat += "<td width='20%'><a href='?src=[REF(src)];[HrefToken()];jobban3=[ROLE_SENTIENCE];jobban4=[REF(M)]'><font color=red>Sentience Potion Spawn</font></a></td>"
|
||||
else
|
||||
dat += "<td width='20%'><a href='?src=[REF(src)];[HrefToken()];jobban3=[ROLE_SENTIENCE];jobban4=[REF(M)]'>Sentience Potion Spawn</a></td>"
|
||||
|
||||
//Deathsquad
|
||||
if(jobban_isbanned(M, "deathsquad"))
|
||||
dat += "<td width='20%'><a href='?src=[REF(src)];[HrefToken()];jobban3=deathsquad;jobban4=[REF(M)]'><font color=red>Deathsquad</font></a></td>"
|
||||
if(jobban_isbanned(M, ROLE_DEATHSQUAD))
|
||||
dat += "<td width='20%'><a href='?src=[REF(src)];[HrefToken()];jobban3=[ROLE_DEATHSQUAD];jobban4=[REF(M)]'><font color=red>Deathsquad</font></a></td>"
|
||||
else
|
||||
dat += "<td width='20%'><a href='?src=[REF(src)];[HrefToken()];jobban3=deathsquad;jobban4=[REF(M)]'>Deathsquad</a></td>"
|
||||
dat += "<td width='20%'><a href='?src=[REF(src)];[HrefToken()];jobban3=[ROLE_DEATHSQUAD];jobban4=[REF(M)]'>Deathsquad</a></td>"
|
||||
|
||||
//Lavaland roles
|
||||
if(jobban_isbanned(M, "lavaland"))
|
||||
dat += "<td width='20%'><a href='?src=[REF(src)];[HrefToken()];jobban3=lavaland;jobban4=[REF(M)]'><font color=red>Lavaland</font></a></td>"
|
||||
if(jobban_isbanned(M, ROLE_LAVALAND))
|
||||
dat += "<td width='20%'><a href='?src=[REF(src)];[HrefToken()];jobban3=[ROLE_LAVALAND];jobban4=[REF(M)]'><font color=red>Lavaland</font></a></td>"
|
||||
else
|
||||
dat += "<td width='20%'><a href='?src=[REF(src)];[HrefToken()];jobban3=lavaland;jobban4=[REF(M)]'>Lavaland</a></td>"
|
||||
dat += "<td width='20%'><a href='?src=[REF(src)];[HrefToken()];jobban3=[ROLE_LAVALAND];jobban4=[REF(M)]'>Lavaland</a></td>"
|
||||
|
||||
dat += "</tr></table>"
|
||||
|
||||
@@ -925,6 +930,16 @@
|
||||
else
|
||||
dat += "<td width='20%'><a href='?src=[REF(src)];[HrefToken()];jobban3=alien;jobban4=[REF(M)]'>Alien</a></td>"
|
||||
|
||||
//Other Roles (black)
|
||||
dat += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
||||
dat += "<tr bgcolor='000000'><th colspan='5'><a href='?src=[REF(src)];[HrefToken()];jobban3=otherroles;jobban4=[REF(M)]' style='color: white;'>Other Roles</a></th></tr><tr align='center'>"
|
||||
|
||||
//Mind Transfer Potion
|
||||
if(jobban_isbanned(M, ROLE_MIND_TRANSFER))
|
||||
dat += "<td width='20%'><a href='?src=[REF(src)];[HrefToken()];jobban3=[ROLE_MIND_TRANSFER];jobban4=[REF(M)]'><font color=red>Mind Transfer Potion</font></a></td>"
|
||||
else
|
||||
dat += "<td width='20%'><a href='?src=[REF(src)];[HrefToken()];jobban3=[ROLE_MIND_TRANSFER];jobban4=[REF(M)]'>Mind Transfer Potion</a></td>"
|
||||
|
||||
dat += "</tr></table>"
|
||||
usr << browse(dat, "window=jobban2;size=800x450")
|
||||
return
|
||||
@@ -984,11 +999,13 @@
|
||||
continue
|
||||
joblist += jobPos
|
||||
if("ghostroles")
|
||||
joblist += list(ROLE_PAI, "posibrain", "drone", "deathsquad", "lavaland")
|
||||
joblist += list(ROLE_PAI, ROLE_POSIBRAIN, ROLE_DRONE , ROLE_DEATHSQUAD, ROLE_LAVALAND, ROLE_SENTIENCE)
|
||||
if("teamantags")
|
||||
joblist += list(ROLE_OPERATIVE, ROLE_REV, ROLE_CULTIST, ROLE_SERVANT_OF_RATVAR, ROLE_ABDUCTOR, ROLE_ALIEN)
|
||||
if("convertantags")
|
||||
joblist += list(ROLE_REV, ROLE_CULTIST, ROLE_SERVANT_OF_RATVAR, ROLE_ALIEN)
|
||||
if("otherroles")
|
||||
joblist += list(ROLE_MIND_TRANSFER)
|
||||
else
|
||||
joblist += href_list["jobban3"]
|
||||
|
||||
|
||||
@@ -672,7 +672,7 @@
|
||||
to_chat(user, "<span class='notice'>You offer [src] to [SM]...</span>")
|
||||
being_used = TRUE
|
||||
|
||||
var/list/candidates = pollCandidatesForMob("Do you want to play as [SM.name]?", ROLE_ALIEN, null, ROLE_ALIEN, 50, SM, POLL_IGNORE_SENTIENCE_POTION) // see poll_ignore.dm
|
||||
var/list/candidates = pollCandidatesForMob("Do you want to play as [SM.name]?", ROLE_SENTIENCE, null, ROLE_SENTIENCE, 50, SM, POLL_IGNORE_SENTIENCE_POTION) // see poll_ignore.dm
|
||||
if(LAZYLEN(candidates))
|
||||
var/mob/dead/observer/C = pick(candidates)
|
||||
SM.key = C.key
|
||||
@@ -726,11 +726,11 @@
|
||||
if(SM.sentience_type != animal_type)
|
||||
to_chat(user, "<span class='warning'>You cannot transfer your consciousness to [SM].</span>" )
|
||||
return ..()
|
||||
var/jb = jobban_isbanned(user, ROLE_ALIEN)
|
||||
var/jb = jobban_isbanned(user, ROLE_MIND_TRANSFER)
|
||||
if(QDELETED(src) || QDELETED(M) || QDELETED(user))
|
||||
return
|
||||
|
||||
if(jb) //ideally sentience and trasnference potions should be their own unique role.
|
||||
if(jb)
|
||||
to_chat(user, "<span class='warning'>Your mind goes blank as you attempt to use the potion.</span>")
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user