Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
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
4 changes: 4 additions & 0 deletions code/__DEFINES/antagonists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#define APPRENTICE_ROBELESS "robeless"
#define APPRENTICE_HEALING "healing"

#define IS_INFERNAL_AGENT(mob) (mob?.mind?.has_antag_datum(/datum/antagonist/infernal_affairs))

//Blob
/// blob gets a free reroll every X time
Expand Down Expand Up @@ -57,6 +58,9 @@
/// because they have nothing else that supports an implant.
#define UPLINK_IMPLANT_TELECRYSTAL_COST 4

///Signal sent to a mob when they purchase an item from their uplink.
#define COMSIG_ON_UPLINK_PURCHASE "comsig_on_uplink_purchase"

//ERT Types
#define ERT_BLUE "Blue"
#define ERT_RED "Red"
Expand Down
44 changes: 0 additions & 44 deletions code/__DEFINES/contracts.dm

This file was deleted.

122 changes: 63 additions & 59 deletions code/__DEFINES/role_preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,58 +6,60 @@

//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_CLOWNOP "Clown Operative"
#define ROLE_CHANGELING "Changeling"
#define ROLE_WIZARD "Wizard"
#define ROLE_RAGINMAGES "Ragin Mages"
#define ROLE_BULLSHITMAGES "Bullshit Mages"
#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_HERETIC "Heretic"
#define ROLE_BLOB "Blob"
#define ROLE_NINJA "Space Ninja"
#define ROLE_MONKEY "Monkey"
#define ROLE_ABDUCTOR "Abductor"
#define ROLE_REVENANT "Revenant"
#define ROLE_SERVANT_OF_RATVAR "Servant of Ratvar"
#define ROLE_BROTHER "Blood Brother"
#define ROLE_BRAINWASHED "Brainwashed Victim"
#define ROLE_HIVE "Hivemind Host"
#define ROLE_OBSESSED "Obsessed"
#define ROLE_SENTIENCE "Sentient Creature"
#define ROLE_MOUSE "Mouse"
#define ROLE_MIND_TRANSFER "Mind Transfer Potion"
#define ROLE_POSIBRAIN "Posibrain"
#define ROLE_DRONE "Drone"
#define ROLE_DEATHSQUAD "Deathsquad"
#define ROLE_LAVALAND "Lavaland"
#define ROLE_FUGITIVE "Fugitive"
#define ROLE_SHADOWLING "Shadowling" // Yogs
#define ROLE_VAMPIRE "Vampire" // Yogs
#define ROLE_GANG "gangster" // Yogs
#define ROLE_DARKSPAWN "darkspawn" // Yogs
#define ROLE_HOLOPARASITE "Holoparasite" // Yogs
#define ROLE_HORROR "Eldritch Horror" // Yogs
#define ROLE_INFILTRATOR "Infiltrator" // Yogs
#define ROLE_ZOMBIE "Zombie"
#define ROLE_BLOODSUCKER "Bloodsucker"
#define ROLE_VAMPIRICACCIDENT "Vampiric Accident"
#define ROLE_BLOODSUCKERBREAKOUT "Bloodsucker Breakout"
#define ROLE_MONSTERHUNTER "Monster Hunter"
#define ROLE_SPACE_DRAGON "Space Dragon"
#define ROLE_GOLEM "Golem"
#define ROLE_SINFULDEMON "Demon of Sin"
#define ROLE_GHOSTBEACON "Ghost Beacon"
#define ROLE_NIGHTMARE "Nightmare"
#define ROLE_DISEASE "Disease"
#define ROLE_PIRATE "Pirate"
#define ROLE_SYNDICATE "Syndicate"
#define ROLE_TRAITOR "Traitor"
#define ROLE_OPERATIVE "Operative"
#define ROLE_CLOWNOP "Clown Operative"
#define ROLE_CHANGELING "Changeling"
#define ROLE_WIZARD "Wizard"
#define ROLE_INFERNAL_AFFAIRS "Infernal Affairs Agent"
#define ROLE_INFERNAL_AFFAIRS_DEVIL "Infernal Devil"
#define ROLE_RAGINMAGES "Ragin Mages"
#define ROLE_BULLSHITMAGES "Bullshit Mages"
#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_HERETIC "Heretic"
#define ROLE_BLOB "Blob"
#define ROLE_NINJA "Space Ninja"
#define ROLE_MONKEY "Monkey"
#define ROLE_ABDUCTOR "Abductor"
#define ROLE_REVENANT "Revenant"
#define ROLE_SERVANT_OF_RATVAR "Servant of Ratvar"
#define ROLE_BROTHER "Blood Brother"
#define ROLE_BRAINWASHED "Brainwashed Victim"
#define ROLE_HIVE "Hivemind Host"
#define ROLE_OBSESSED "Obsessed"
#define ROLE_SENTIENCE "Sentient Creature"
#define ROLE_MOUSE "Mouse"
#define ROLE_MIND_TRANSFER "Mind Transfer Potion"
#define ROLE_POSIBRAIN "Posibrain"
#define ROLE_DRONE "Drone"
#define ROLE_DEATHSQUAD "Deathsquad"
#define ROLE_LAVALAND "Lavaland"
#define ROLE_FUGITIVE "Fugitive"
#define ROLE_SHADOWLING "Shadowling" // Yogs
#define ROLE_VAMPIRE "Vampire" // Yogs
#define ROLE_GANG "gangster" // Yogs
#define ROLE_DARKSPAWN "darkspawn" // Yogs
#define ROLE_HOLOPARASITE "Holoparasite" // Yogs
#define ROLE_HORROR "Eldritch Horror" // Yogs
#define ROLE_INFILTRATOR "Infiltrator" // Yogs
#define ROLE_ZOMBIE "Zombie"
#define ROLE_BLOODSUCKER "Bloodsucker"
#define ROLE_VAMPIRICACCIDENT "Vampiric Accident"
#define ROLE_BLOODSUCKERBREAKOUT "Bloodsucker Breakout"
#define ROLE_MONSTERHUNTER "Monster Hunter"
#define ROLE_SPACE_DRAGON "Space Dragon"
#define ROLE_GOLEM "Golem"
#define ROLE_SINFULDEMON "Demon of Sin"
#define ROLE_GHOSTBEACON "Ghost Beacon"
#define ROLE_NIGHTMARE "Nightmare"
#define ROLE_DISEASE "Disease"
#define ROLE_PIRATE "Pirate"


//Missing assignment means it's not a gamemode specific role, IT'S NOT A BUG OR ERROR.
Expand All @@ -68,9 +70,11 @@ GLOBAL_LIST_INIT(special_roles, list(
ROLE_TRAITOR = /datum/antagonist/traitor,
ROLE_OPERATIVE = /datum/antagonist/nukeop,
ROLE_CLOWNOP = /datum/antagonist/nukeop/clownop,
ROLE_CHANGELING = /datum/antagonist/changeling,
ROLE_CHANGELING = /datum/antagonist/changeling,
ROLE_WIZARD = /datum/antagonist/wizard,
ROLE_RAGINMAGES = /datum/antagonist/wizard,
ROLE_INFERNAL_AFFAIRS = /datum/antagonist/infernal_affairs,
ROLE_INFERNAL_AFFAIRS_DEVIL = /datum/antagonist/devil,
ROLE_RAGINMAGES = /datum/antagonist/wizard,
ROLE_BULLSHITMAGES = /datum/antagonist/wizard,
ROLE_MALF = /datum/antagonist/traitor/malf,
ROLE_REV_HEAD = /datum/antagonist/rev/head,
Expand All @@ -79,7 +83,7 @@ GLOBAL_LIST_INIT(special_roles, list(
ROLE_HERETIC = /datum/antagonist/heretic,
ROLE_BLOB = /datum/antagonist/blob,
ROLE_NINJA = /datum/antagonist/ninja,
ROLE_MONKEY = /datum/antagonist/monkey,
ROLE_MONKEY = /datum/antagonist/monkey,
ROLE_ABDUCTOR = /datum/antagonist/abductor,
ROLE_REVENANT = /datum/antagonist/revenant,
ROLE_SERVANT_OF_RATVAR = /datum/antagonist/clockcult,
Expand All @@ -94,7 +98,7 @@ GLOBAL_LIST_INIT(special_roles, list(
ROLE_HOLOPARASITE = /datum/antagonist/guardian, // Yogs
ROLE_HORROR = /datum/antagonist/horror, // Yogs
ROLE_INFILTRATOR = /datum/antagonist/infiltrator, // Yogs
ROLE_ZOMBIE = /datum/antagonist/zombie,
ROLE_ZOMBIE = /datum/antagonist/zombie,
ROLE_BLOODSUCKER = /datum/antagonist/bloodsucker,
ROLE_MONSTERHUNTER = /datum/antagonist/monsterhunter,
ROLE_SPACE_DRAGON = /datum/antagonist/space_dragon,
Expand All @@ -108,6 +112,6 @@ GLOBAL_LIST_INIT(special_roles, list(
))

//Job defines for what happens when you fail to qualify for any job during job selection
#define BEOVERFLOW 1
#define BERANDOMJOB 2
#define RETURNTOLOBBY 3
#define BEOVERFLOW 1
#define BERANDOMJOB 2
#define RETURNTOLOBBY 3
1 change: 1 addition & 0 deletions code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@
#define GENETIC_MUTATION "genetic"
#define OBESITY "obesity"
#define MAGIC_TRAIT "magic"
#define DEVIL_TRAIT "devil"
#define TRAUMA_TRAIT "trauma"
#define DISEASE_TRAIT "disease"
#define SPECIES_TRAIT "species"
Expand Down
64 changes: 64 additions & 0 deletions code/controllers/subsystem/infernal_affairs.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/**
* ##infernal_affairs subsystem
*
* Supposed to handle the objectives of all Agents, ensuring they all have to kill eachother.
* Also keeps track of their Antag gear, to remove it when their soul is collected.
*/
SUBSYSTEM_DEF(infernal_affairs)
name = "Devil Affairs"
flags = SS_NO_INIT|SS_NO_FIRE

///List of all devils in-game. There is supposed to have only one, so this is in-case admins do some wacky shit.
var/list/datum/antagonist/devil/devils = list()
///List of all Agents in the loop and the gear they have.
var/list/datum/antagonist/infernal_affairs/agent_datums = list()

/**
* Enters a for() loop for all agents while assigning their target to be the first available agent.
*
* We assign all IAAs their position in the list to later assign them as objectives of one another.
* Lists starts at 1, so we will immediately imcrement to get their target.
* When the list goes over, we go back to the start AFTER incrementing the list, so they will have the first player as a target.
* We skip over Hellbound people, and when there's only one left alive, we'll end the loop.
*/
/datum/controller/subsystem/infernal_affairs/proc/update_objective_datums()
if(!agent_datums.len)
return
var/list_position = 1
for(var/datum/antagonist/infernal_affairs/agents as anything in agent_datums)
if(!agents.active_objective)
agents.active_objective = new(src)
var/objective_set = FALSE
while(!objective_set)
list_position++
if(list_position > agent_datums.len)
list_position = initial(list_position)
var/datum/antagonist/infernal_affairs/next_agent = agent_datums[list_position]
if(HAS_TRAIT(next_agent.owner, TRAIT_HELLBOUND))
continue
if(next_agent == agents)
end_loop(agents)
objective_set = TRUE
break
if(agents.active_objective.target != agent_datums[list_position])
agents.active_objective.target = agent_datums[list_position]
agents.active_objective.update_explanation_text()
agents.update_static_data(agents.owner.current)
objective_set = TRUE
break
return TRUE

/**
* ## end_loop
*
* We unregister signal to stop listening for people in the loop, as it's over.
* We will then give the last man standing their hijack objective, to end the subsystem off
* Args:
* - last_man_standing: The antag datum of the last remaining player left alive.
*/
/datum/controller/subsystem/infernal_affairs/proc/end_loop(datum/antagonist/infernal_affairs/last_one_standing)
var/datum/objective/hijack/hijack_objective = new()
hijack_objective.owner = last_one_standing.owner
hijack_objective.explanation_text = hijack_objective
last_one_standing.objectives += hijack_objective
last_one_standing.update_static_data(last_one_standing.owner.current)
6 changes: 6 additions & 0 deletions code/datums/achievements/achievements.dm
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,12 @@
desc = "As a revenant, complete your objectives"
id = GREENTEXT + 17

/datum/achievement/greentext/devil
name = "Eternal Infernal"
desc = "As a devil, ascend to your greatest power"
id = GREENTEXT + 17


//end-greentext

//start-redtext
Expand Down
28 changes: 14 additions & 14 deletions code/datums/mind.dm
Original file line number Diff line number Diff line change
Expand Up @@ -346,32 +346,32 @@

if(!uplink_loc) // We've looked everywhere, let's just implant you
implant = TRUE


var/datum/component/uplink/uplink_component

if(!implant)
. = uplink_loc
var/datum/component/uplink/U = uplink_loc.AddComponent(/datum/component/uplink, traitor_mob.key)
if(!U)
uplink_component = uplink_loc.AddComponent(/datum/component/uplink, traitor_mob.key)
if(!uplink_component)
CRASH("Uplink creation failed.")
U.setup_unlock_code()
uplink_component.setup_unlock_code()
if(!silent)
if(uplink_loc == R)
to_chat(traitor_mob, "[employer] has cunningly disguised a Syndicate Uplink as your [R.name]. Simply dial the frequency [format_frequency(U.unlock_code)] to unlock its hidden features.")
to_chat(traitor_mob, "[employer] has cunningly disguised a Syndicate Uplink as your [R.name]. Simply dial the frequency [format_frequency(uplink_component.unlock_code)] to unlock its hidden features.")
else if(uplink_loc == PDA)
to_chat(traitor_mob, "[employer] has cunningly disguised a Syndicate Uplink as your [PDA.name]. Simply enter the code \"[U.unlock_code]\" into the ringtone select to unlock its hidden features.")
to_chat(traitor_mob, "[employer] has cunningly disguised a Syndicate Uplink as your [PDA.name]. Simply enter the code \"[uplink_component.unlock_code]\" into the ringtone select to unlock its hidden features.")
else if(uplink_loc == P)
to_chat(traitor_mob, "[employer] has cunningly disguised a Syndicate Uplink as your [P.name]. Simply twist the top of the pen [english_list(U.unlock_code)] from its starting position to unlock its hidden features.")
to_chat(traitor_mob, "[employer] has cunningly disguised a Syndicate Uplink as your [P.name]. Simply twist the top of the pen [english_list(uplink_component.unlock_code)] from its starting position to unlock its hidden features.")
if(uplink_owner)
uplink_owner.antag_memory += U.unlock_note + "<br>"
uplink_owner.antag_memory += uplink_component.unlock_note + "<br>"
else
traitor_mob.mind.store_memory(U.unlock_note)
traitor_mob.mind.store_memory(uplink_component.unlock_note)
else
var/obj/item/implant/uplink/starting/I = new(traitor_mob)
I.implant(traitor_mob, null, silent = TRUE)
var/obj/item/implant/uplink/starting/I = new()
uplink_component = I.implant(traitor_mob, null, silent = TRUE)
if(!silent)
to_chat(traitor_mob, "<span class='boldnotice'>[employer] has cunningly implanted you with a Syndicate Uplink (although uplink implants cost valuable TC, so you will have slightly less). Simply trigger the uplink to access it.</span>")
return I


return uplink_component

//Link a new mobs mind to the creator of said mob. They will join any team they are currently on, and will only switch teams when their creator does.

Expand Down
Loading