diff --git a/code/_DATASTRUCTURES/linked_lists.dm b/code/_DATASTRUCTURES/linked_lists.dm
deleted file mode 100644
index eccc3c422a8..00000000000
--- a/code/_DATASTRUCTURES/linked_lists.dm
+++ /dev/null
@@ -1,191 +0,0 @@
-
-//Ok so it's technically a double linked list, bite me.
-
-/datum/linked_list
- var/datum/linked_node/head
- var/datum/linked_node/tail
- var/node_amt = 0
-
-
-/datum/linked_node
- var/value = null
- var/datum/linked_list/linked_list = null
- var/datum/linked_node/next_node = null
- var/datum/linked_node/previous_node = null
-
-
-/datum/linked_list/proc/IsEmpty()
- . = (node_amt <= 0)
-
-
-//Add a linked_node (or value, creating a linked_node) at position
-//the added node BECOMES the position-th element,
-//eg: add("Test",5), the 5th node is now "Test", the previous 5th moves up to become the 6th
-/datum/linked_list/proc/Add(node, position)
- var/datum/linked_node/adding
- if(istype(node, /datum/linked_node))
- adding = node
- else
- adding = new()
- adding.value = node
-
- if(!adding.linked_list || (adding.linked_list && (adding.linked_list != src)))
- node_amt++
-
- adding.linked_list = src
-
- if(position && position < node_amt)
- //Replacing head
- if(position == 1)
- if(head)
- head.previous_node = adding
- adding.next_node = head
- head = adding
-
- //Replacing any middle node
- else
- var/location = 0
- var/datum/linked_node/at
- while((location != position) && (location <= node_amt))
- if(at)
- if(at.next_node)
- at = at.next_node
- else
- break
- else
- at = head
- location++
-
- //Push at up and assume it's place as the position-th element
- if(at && at.previous_node)
- at.previous_node.next_node = adding
- adding.previous_node = at.previous_node
- at.previous_node = adding
- adding.next_node = at
- return
-
- //Replacing tail
- if(tail)
- tail.next_node = adding
- adding.previous_node = tail
- if(!tail.previous_node)
- head = tail
- tail = adding
-
-
-
-//Remove a linked_node or the linked_node of a value
-//If you specify a value the FIRST ONE is removed
-/datum/linked_list/proc/Remove(node)
- var/datum/linked_node/removing
- if(istype(node,/datum/linked_node))
- removing = node
- else
- //optimise removing head and tail, no point looping for them, especially the tail
- if(removing == head)
- removing = head
- else if(removing == tail)
- removing = tail
- else
- var/location = 1
- var/current_value = null
- var/datum/linked_node/at = null
- while((current_value != node) && (location <= node_amt))
- if(at)
- if(at.next_node)
- at = at.next_node
- else
- at = head
- location++
- if(at)
- current_value = at.value
- if(current_value == node)
- removing = at
- break
-
- //Adjust pointers of where removing -was- in the chain.
- if(removing)
- if(removing.previous_node)
- if(removing == tail)
- tail = removing.previous_node
- if(removing.next_node)
- if(removing == head)
- head = removing.next_node
- removing.next_node.previous_node = removing.previous_node
- removing.previous_node.next_node = removing.next_node
- else
- removing.previous_node.next_node = null
- else
- if(removing.next_node)
- if(removing == head)
- head = removing.next_node
- removing.next_node.previous_node = null
-
- //if this is still true at this point, there's no more nodes to replace them with
- if(removing == head)
- head = null
- if(removing == tail)
- tail = null
-
- removing.next_node = null
- removing.previous_node = null
- if(removing.linked_list == src)
- node_amt--
- removing.linked_list = null
-
- return removing
- return 0
-
-
-//Removes and deletes a node or value
-/datum/linked_list/proc/RemoveDelete(node)
- var/datum/linked_node/dead = Remove(node)
- if(dead)
- qdel(dead)
- return 1
- return 0
-
-
-//Empty the linked_list, deleting all nodes
-/datum/linked_list/proc/Empty()
- var/datum/linked_node/n = head
- while(n)
- var/next = n.next_node
- Remove(n)
- qdel(n)
- n = next
- node_amt = 0
-
-
-//Some debugging tools
-/datum/linked_list/proc/CheckNodeLinks()
- var/datum/linked_node/n = head
- while(n)
- . = "|[n.value]|"
- if(n.previous_node)
- . = "[n.previous_node.value]<-" + .
- if(n.next_node)
- . += "->[n.next_node.value]"
- n = n.next_node
- . += "
"
-
-
-/datum/linked_list/proc/DrawNodeLinks()
- . = "|<-"
- var/datum/linked_node/n = head
- while(n)
- if(n.previous_node)
- . += "<-"
- . += "[n.value]"
- if(n.next_node)
- . += "->"
- n = n.next_node
- . += "->|"
-
-
-/datum/linked_list/proc/ToList()
- . = list()
- var/datum/linked_node/n = head
- while(n)
- . += n
- n = n.next_node
\ No newline at end of file
diff --git a/code/_DATASTRUCTURES/priority_queue.dm b/code/_DATASTRUCTURES/priority_queue.dm
deleted file mode 100644
index 8689a19f4e4..00000000000
--- a/code/_DATASTRUCTURES/priority_queue.dm
+++ /dev/null
@@ -1,83 +0,0 @@
-
-//////////////////////
-//PriorityQueue object
-//////////////////////
-
-//an ordered list, using the cmp proc to weight the list elements
-/PriorityQueue
- var/list/L //the actual queue
- var/cmp //the weight function used to order the queue
-
-/PriorityQueue/New(compare)
- L = new()
- cmp = compare
-
-/PriorityQueue/proc/IsEmpty()
- return !L.len
-
-//return the index the element should be in the priority queue using dichotomic search
-/PriorityQueue/proc/FindElementIndex(atom/A)
- var/i = 1
- var/j = L.len
- var/mid
-
- while(i < j)
- mid = round((i+j)/2)
-
- if(call(cmp)(L[mid],A) < 0)
- i = mid + 1
- else
- j = mid
-
- if(i == 1 || i == L.len) //edge cases
- return (call(cmp)(L[i],A) > 0) ? i : i+1
- else
- return i
-
-
-//add an element in the list,
-//immediatly ordering it to its position using dichotomic search
-/PriorityQueue/proc/Enqueue(atom/A)
- if(!L.len)
- L.Add(A)
- return
-
- L.Insert(FindElementIndex(A),A)
-
-//removes and returns the first element in the queue
-/PriorityQueue/proc/Dequeue()
- if(!L.len)
- return 0
- . = L[1]
-
- Remove(.)
-
-//removes an element
-/PriorityQueue/proc/Remove(atom/A)
- return L.Remove(A)
-
-//returns a copy of the elements list
-/PriorityQueue/proc/List()
- . = L.Copy()
-
-//return the position of an element or 0 if not found
-/PriorityQueue/proc/Seek(atom/A)
- . = L.Find(A)
-
-//return the element at the i_th position
-/PriorityQueue/proc/Get(i)
- if(i > L.len || i < 1)
- return 0
- return L[i]
-
-//replace the passed element at it's right position using the cmp proc
-/PriorityQueue/proc/ReSort(atom/A)
- var/i = Seek(A)
- if(i == 0)
- return
- while(i < L.len && call(cmp)(L[i],L[i+1]) > 0)
- L.Swap(i,i+1)
- i++
- while(i > 1 && call(cmp)(L[i],L[i-1]) <= 0) //last inserted element being first in case of ties (optimization)
- L.Swap(i,i-1)
- i--
\ No newline at end of file
diff --git a/code/__DEFINES/antagonists.dm b/code/__DEFINES/antagonists.dm
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/code/_globalvars/station.dm b/code/_globalvars/station.dm
index d9e53d96834..2d635996b30 100644
--- a/code/_globalvars/station.dm
+++ b/code/_globalvars/station.dm
@@ -3,8 +3,4 @@ var/global/datum/datacore/data_core = null
var/CELLRATE = 0.002 // multiplier for watts per tick <> cell storage (eg: .002 means if there is a load of 1000 watts, 20 units will be taken from a cell per second)
var/CHARGELEVEL = 0.001 // Cap for how fast cells charge, as a percentage-per-tick (.001 means cellcharge is capped to 1% per second)
-// this is not strictly unused although the whole modules datum thing is unused
-// To remove this you need to remove that
-var/datum/moduletypes/mods = new()
-
var/map_name = "Unknown" //The name of the map that is loaded. Assigned in world/New()
\ No newline at end of file
diff --git a/code/controllers/subsystem/machinery.dm b/code/controllers/subsystem/machinery.dm
index 8f914202dcf..a3e4d4bdb0c 100644
--- a/code/controllers/subsystem/machinery.dm
+++ b/code/controllers/subsystem/machinery.dm
@@ -44,8 +44,8 @@ SUBSYSTEM_DEF(machines)
if(O)
var/datum/powernet/newPN = new() // create a new powernet...
propagate_network(O, newPN)//... and propagate it to the other side of the cable
- else
- deferred_powernet_rebuilds.Remove(O)
+
+ deferred_powernet_rebuilds.Remove(O)
if(MC_TICK_CHECK)
return
diff --git a/code/datums/antagonists/antag_datum.dm b/code/datums/antagonists/antag_datum.dm
new file mode 100644
index 00000000000..51ca4e5d39c
--- /dev/null
+++ b/code/datums/antagonists/antag_datum.dm
@@ -0,0 +1,113 @@
+GLOBAL_LIST_EMPTY(antagonists)
+
+/datum/antagonist
+ var/name = "Antagonist"
+ var/roundend_category = "other antagonists" //Section of roundend report, datums with same category will be displayed together, also default header for the section
+ var/show_in_roundend = TRUE //Set to false to hide the antagonists from roundend report
+ var/datum/mind/owner //Mind that owns this datum
+ var/silent = FALSE //Silent will prevent the gain/lose texts to show
+ var/can_coexist_with_others = TRUE //Whether or not the person will be able to have more than one datum
+ var/list/typecache_datum_blacklist = list() //List of datums this type can't coexist with
+ var/delete_on_mind_deletion = TRUE
+ var/job_rank
+ var/replace_banned = TRUE //Should replace jobbaned player with ghosts if granted.
+ var/list/objectives = list()
+ var/antag_memory = ""//These will be removed with antag datum
+ var/antag_moodlet //typepath of moodlet that the mob will gain with their status
+
+ //Antag panel properties
+ var/show_in_antagpanel = TRUE //This will hide adding this antag type in antag panel, use only for internal subtypes that shouldn't be added directly but still show if possessed by mind
+ var/antagpanel_category = "Uncategorized" //Antagpanel will display these together, REQUIRED
+ var/show_name_in_check_antagonists = FALSE //Will append antagonist name in admin listings - use for categories that share more than one antag type
+
+
+
+/datum/antagonist/New()
+ GLOB.antagonists += src
+ typecache_datum_blacklist = typecacheof(typecache_datum_blacklist)
+
+/datum/antagonist/Destroy()
+ GLOB.antagonists -= src
+ if(owner)
+ LAZYREMOVE(owner.antag_datums, src)
+ owner = null
+ return ..()
+
+/datum/antagonist/proc/can_be_owned(datum/mind/new_owner)
+ . = TRUE
+ var/datum/mind/tested = new_owner || owner
+ if(tested.has_antag_datum(type))
+ return FALSE
+ for(var/i in tested.antag_datums)
+ var/datum/antagonist/A = i
+ if(is_type_in_typecache(src, A.typecache_datum_blacklist))
+ return FALSE
+
+//This will be called in add_antag_datum before owner assignment.
+//Should return antag datum without owner.
+/datum/antagonist/proc/specialization(datum/mind/new_owner)
+ return src
+
+/datum/antagonist/proc/on_body_transfer(mob/living/old_body, mob/living/new_body)
+ remove_innate_effects(old_body)
+ apply_innate_effects(new_body)
+
+//This handles the application of antag huds/special abilities
+/datum/antagonist/proc/apply_innate_effects(mob/living/mob_override)
+ return
+
+//This handles the removal of antag huds/special abilities
+/datum/antagonist/proc/remove_innate_effects(mob/living/mob_override)
+ return
+
+//Assign default team and creates one for one of a kind team antagonists
+/datum/antagonist/proc/create_team(datum/team/team)
+ return
+
+//Proc called when the datum is given to a mind.
+/datum/antagonist/proc/on_gain()
+ if(owner && owner.current)
+ if(!silent)
+ greet()
+ apply_innate_effects()
+ if(is_banned(owner.current) && replace_banned)
+ replace_banned_player()
+
+/datum/antagonist/proc/is_banned(mob/M)
+ if(!M)
+ return FALSE
+ . = (jobban_isbanned(M, ROLE_SYNDICATE) || (job_rank && jobban_isbanned(M, job_rank)))
+
+/datum/antagonist/proc/replace_banned_player()
+ set waitfor = FALSE
+
+ var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as a [name]?", job_rank, TRUE, 50)
+ if(LAZYLEN(candidates))
+ var/mob/dead/observer/C = pick(candidates)
+ to_chat(owner, "Your mob has been taken over by a ghost! Appeal your job ban if you want to avoid this in the future!")
+ message_admins("[key_name_admin(C)] has taken control of ([key_name_admin(owner.current)]) to replace a jobbaned player.")
+ owner.current.ghostize(0)
+ owner.current.key = C.key
+
+/datum/antagonist/proc/on_removal()
+ remove_innate_effects()
+ if(owner)
+ LAZYREMOVE(owner.antag_datums, src)
+ if(!silent && owner.current)
+ farewell()
+ owner.objectives -= objectives
+ var/datum/team/team = get_team()
+ if(team)
+ team.remove_member(owner)
+ qdel(src)
+
+/datum/antagonist/proc/greet()
+ return
+
+/datum/antagonist/proc/farewell()
+ return
+
+
+//Returns the team antagonist belongs to if any.
+/datum/antagonist/proc/get_team()
+ return
\ No newline at end of file
diff --git a/code/datums/antagonists/antag_helpers.dm b/code/datums/antagonists/antag_helpers.dm
new file mode 100644
index 00000000000..134ba1d7d90
--- /dev/null
+++ b/code/datums/antagonists/antag_helpers.dm
@@ -0,0 +1,19 @@
+//Returns MINDS of the assigned antags of given type/subtypes
+/proc/get_antag_minds(antag_type, specific = FALSE)
+ . = list()
+ for(var/datum/antagonist/A in GLOB.antagonists)
+ if(!A.owner)
+ continue
+ if(!antag_type || !specific && istype(A, antag_type) || specific && A.type == antag_type)
+ . += A.owner
+
+//Get all teams [of type team_type]
+/proc/get_all_teams(team_type)
+ . = list()
+ for(var/V in GLOB.antagonists)
+ var/datum/antagonist/A = V
+ if(!A.owner)
+ continue
+ var/datum/team/T = A.get_team()
+ if(!team_type || istype(T, team_type))
+ . |= T
\ No newline at end of file
diff --git a/code/datums/antagonists/antag_team.dm b/code/datums/antagonists/antag_team.dm
new file mode 100644
index 00000000000..9dcec5894ee
--- /dev/null
+++ b/code/datums/antagonists/antag_team.dm
@@ -0,0 +1,24 @@
+//A barebones antagonist team.
+/datum/team
+ var/list/datum/mind/members = list()
+ var/name = "team"
+ var/member_name = "member"
+ var/list/objectives = list() //common objectives, these won't be added or removed automatically, subtypes handle this, this is here for bookkeeping purposes.
+
+/datum/team/New(starting_members)
+ . = ..()
+ if(starting_members)
+ if(islist(starting_members))
+ for(var/datum/mind/M in starting_members)
+ add_member(M)
+ else
+ add_member(starting_members)
+
+/datum/team/proc/is_solo()
+ return members.len == 1
+
+/datum/team/proc/add_member(datum/mind/new_member)
+ members |= new_member
+
+/datum/team/proc/remove_member(datum/mind/member)
+ members -= member
diff --git a/code/datums/computerfiles.dm b/code/datums/computerfiles.dm
deleted file mode 100644
index 14cd7e38612..00000000000
--- a/code/datums/computerfiles.dm
+++ /dev/null
@@ -1,7 +0,0 @@
-datum
- computer
- var/name
- folder
- var/list/datum/computer/contents = list()
-
- file
\ No newline at end of file
diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm
index 96c663fb703..1a22131d55f 100644
--- a/code/datums/datacore.dm
+++ b/code/datums/datacore.dm
@@ -255,7 +255,7 @@ var/record_id_num = 1001
if(PDA_Manifest.len)
PDA_Manifest.Cut()
- if(H.mind && (H.mind.assigned_role != "MODE"))
+ if(H.mind && (H.mind.assigned_role != H.mind.special_role))
var/assignment
if(H.mind.role_alt_title)
assignment = H.mind.role_alt_title
diff --git a/code/datums/mind.dm b/code/datums/mind.dm
index edf9792a3d4..8bc1034206e 100644
--- a/code/datums/mind.dm
+++ b/code/datums/mind.dm
@@ -38,8 +38,8 @@
var/memory
- var/assigned_role
- var/special_role
+ var/assigned_role //assigned role is what job you're assigned to when you join the station.
+ var/special_role //special roles are typically reserved for antags or roles like ERT. If you want to avoid a character being automatically announced by the AI, on arrival (becuase they're an off station character or something); ensure that special_role and assigned_role are equal.
var/list/restricted_roles = list()
var/list/spell_list = list() // Wizard mode & "Give Spell" badmin button.
@@ -54,6 +54,7 @@
var/has_been_rev = 0//Tracks if this mind has been a rev or not
var/miming = 0 // Mime's vow of silence
+ var/list/antag_datums
var/speech_span // What span any body this mind has talks in.
var/datum/faction/faction //associated faction
var/datum/changeling/changeling //changeling holder
@@ -72,17 +73,29 @@
var/brigged_since = -1
var/suicided = FALSE
- New(var/key)
- src.key = key
-
//put this here for easier tracking ingame
var/datum/money_account/initial_account
//zealot_master is a reference to the mob that converted them into a zealot (for ease of investigation and such)
var/mob/living/carbon/human/zealot_master = null
+/datum/mind/New(var/key)
+ src.key = key
+
+
+/datum/mind/Destroy()
+ ticker.minds -= src
+ if(islist(antag_datums))
+ for(var/i in antag_datums)
+ var/datum/antagonist/antag_datum = i
+ if(antag_datum.delete_on_mind_deletion)
+ qdel(i)
+ antag_datums = null
+ return ..()
+
/datum/mind/proc/transfer_to(mob/living/new_character)
var/datum/atom_hud/antag/hud_to_transfer = antag_hud //we need this because leave_hud() will clear this list
+ var/mob/living/old_current = current
if(!istype(new_character))
log_runtime(EXCEPTION("transfer_to(): Some idiot has tried to transfer_to() a non mob/living mob."), src)
if(current) //remove ourself from our old body's mind variable
@@ -95,6 +108,9 @@
new_character.mind.current = null
current = new_character //link ourself to our new body
new_character.mind = src //and link our new body to ourself
+ for(var/a in antag_datums) //Makes sure all antag datums effects are applied in the new body
+ var/datum/antagonist/A = a
+ A.on_body_transfer(old_current, current)
transfer_antag_huds(hud_to_transfer) //inherit the antag HUD
transfer_actions(new_character)
@@ -525,8 +541,8 @@
new_objective = new objective_path
new_objective.owner = src
new_objective:target = new_target:mind
- //Will display as special role if the target is set as MODE. Ninjas/commandos/nuke ops.
- new_objective.explanation_text = "[objective_type] [new_target:real_name], the [new_target:mind:assigned_role=="MODE" ? (new_target:mind:special_role) : (new_target:mind:assigned_role)]."
+ //Will display as special role if assigned mode is equal to special role.. Ninjas/commandos/nuke ops.
+ new_objective.explanation_text = "[objective_type] [new_target:real_name], the [new_target:mind:assigned_role == new_target:mind:special_role ? (new_target:mind:special_role) : (new_target:mind:assigned_role)]."
if("destroy")
var/list/possible_targets = active_ais(1)
@@ -1212,6 +1228,54 @@
edit_memory()
+
+// Datum antag mind procs
+/datum/mind/proc/add_antag_datum(datum_type, on_gain = TRUE)
+ if(!datum_type)
+ return
+ if(!can_hold_antag_datum(datum_type))
+ return
+ var/datum/antagonist/A = new datum_type(src)
+ antag_datums += A
+ if(on_gain)
+ A.on_gain()
+
+/datum/mind/proc/remove_antag_datum(datum_type)
+ if(!datum_type)
+ return
+ var/datum/antagonist/A = has_antag_datum(datum_type)
+ if(A)
+ A.on_removal()
+ return TRUE
+
+/datum/mind/proc/remove_all_antag_datums() //For the Lazy amongst us.
+ for(var/a in antag_datums)
+ var/datum/antagonist/A = a
+ A.on_removal()
+
+/datum/mind/proc/has_antag_datum(datum_type, check_subtypes = TRUE)
+ if(!datum_type)
+ return
+ . = FALSE
+ for(var/a in antag_datums)
+ var/datum/antagonist/A = a
+ if(check_subtypes && istype(A, datum_type))
+ return A
+ else if(A.type == datum_type)
+ return A
+
+/datum/mind/proc/can_hold_antag_datum(datum_type)
+ if(!datum_type)
+ return
+ . = TRUE
+ if(has_antag_datum(datum_type))
+ return FALSE
+ for(var/i in antag_datums)
+ var/datum/antagonist/A = i
+ if(is_type_in_typecache(A, A.typecache_datum_blacklist))
+ return FALSE
+
+
/datum/mind/proc/find_syndicate_uplink()
var/list/L = current.get_contents()
for(var/obj/item/I in L)
@@ -1242,7 +1306,7 @@
else
current.real_name = "[syndicate_name()] Operative #[ticker.mode.syndicates.len-1]"
special_role = SPECIAL_ROLE_NUKEOPS
- assigned_role = "MODE"
+ assigned_role = SPECIAL_ROLE_NUKEOPS
to_chat(current, "You are a [syndicate_name()] agent!")
ticker.mode.forge_syndicate_objectives(src)
ticker.mode.greet_syndicate(src)
@@ -1277,7 +1341,7 @@
if(!(src in ticker.mode.wizards))
ticker.mode.wizards += src
special_role = SPECIAL_ROLE_WIZARD
- assigned_role = "MODE"
+ assigned_role = SPECIAL_ROLE_WIZARD
//ticker.mode.learn_basic_spells(current)
if(!wizardstart.len)
current.loc = pick(latejoin)
@@ -1483,7 +1547,7 @@
var/datum/objective/protect/mindslave/MS = new
MS.owner = src
MS.target = missionary.mind
- MS.explanation_text = "Obey every order from and protect [missionary.real_name], the [missionary.mind.assigned_role=="MODE" ? (missionary.mind.special_role) : (missionary.mind.assigned_role)]."
+ MS.explanation_text = "Obey every order from and protect [missionary.real_name], the [missionary.mind.assigned_role == missionary.mind.special_role ? (missionary.mind.special_role) : (missionary.mind.assigned_role)]."
objectives += MS
for(var/datum/objective/objective in objectives)
to_chat(current, "Objective #1: [objective.explanation_text]")
diff --git a/code/datums/modules.dm b/code/datums/modules.dm
deleted file mode 100644
index d01bded3254..00000000000
--- a/code/datums/modules.dm
+++ /dev/null
@@ -1,63 +0,0 @@
-// module datum.
-// this is per-object instance, and shows the condition of the modules in the object
-// actual modules needed is referenced through modulestypes and the object type
-
-/datum/module
- var/status // bits set if working, 0 if broken
- var/installed // bits set if installed, 0 if missing
-
-// moduletypes datum
-// this is per-object type, and shows the modules needed for a type of object
-
-/datum/moduletypes
- var/list/modcount = list() // assoc list of the count of modules for a type
-
-
-var/list/modules = list( // global associative list
-"/obj/machinery/power/apc" = "card_reader,power_control,id_auth,cell_power,cell_charge")
-
-
-/datum/module/New(var/obj/O)
-
- var/type = O.type // the type of the creating object
-
- var/mneed = mods.inmodlist(type) // find if this type has modules defined
-
- if(!mneed) // not found in module list?
- qdel(src) // delete self, thus ending proc
- return
-
- var/needed = mods.getbitmask(type) // get a bitmask for the number of modules in this object
- status = needed
- installed = needed
-
-/datum/moduletypes/proc/addmod(var/type, var/modtextlist)
- modules += type // index by type text
- modules[type] = modtextlist
-
-/datum/moduletypes/proc/inmodlist(var/type)
- return ("[type]" in modules)
-
-/datum/moduletypes/proc/getbitmask(var/type)
- var/count = modcount["[type]"]
- if(count)
- return 2**count-1
-
- var/modtext = modules["[type]"]
- var/num = 1
- var/pos = 1
-
- while(1)
- pos = findtext(modtext, ",", pos, 0)
- if(!pos)
- break
- else
- pos++
- num++
-
- modcount += "[type]"
- modcount["[type]"] = num
-
- return 2**num-1
-
-
diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm
index 8058ff6e5c9..0c609c818b4 100644
--- a/code/game/gamemodes/gameticker.dm
+++ b/code/game/gamemodes/gameticker.dm
@@ -368,7 +368,7 @@ var/round_start_time = 0
if(player && player.mind && player.mind.assigned_role)
if(player.mind.assigned_role == "Captain")
captainless=0
- if(player.mind.assigned_role != "MODE")
+ if(player.mind.assigned_role != player.mind.special_role)
job_master.EquipRank(player, player.mind.assigned_role, 0)
EquipCustomItems(player)
if(captainless)
diff --git a/code/game/gamemodes/heist/heist.dm b/code/game/gamemodes/heist/heist.dm
index 0693ca9b279..3b908952de7 100644
--- a/code/game/gamemodes/heist/heist.dm
+++ b/code/game/gamemodes/heist/heist.dm
@@ -51,7 +51,7 @@ var/global/list/obj/cortical_stacks = list() //Stacks for 'leave nobody behind'
raider_num--
for(var/datum/mind/raider in raiders)
- raider.assigned_role = "MODE"
+ raider.assigned_role = SPECIAL_ROLE_RAIDER
raider.special_role = SPECIAL_ROLE_RAIDER
..()
return 1
diff --git a/code/game/gamemodes/intercept_report.dm b/code/game/gamemodes/intercept_report.dm
index 6cb2956d3ee..50b749a62a2 100644
--- a/code/game/gamemodes/intercept_report.dm
+++ b/code/game/gamemodes/intercept_report.dm
@@ -91,7 +91,7 @@
var/list/dudes = list()
for(var/mob/living/carbon/human/man in player_list)
if(!man.mind) continue
- if(man.mind.assigned_role=="MODE") continue
+ if(man.mind.assigned_role == man.mind.special_role) continue
dudes += man
if(dudes.len==0)
return null
@@ -210,14 +210,14 @@
var/prob_right_job = rand(prob_correct_job_lower, prob_correct_job_higher)
if(prob(prob_right_job))
if(correct_person)
- if(correct_person:assigned_role=="MODE")
+ if(correct_person:assigned_role == correct_person:special_role)
changeling_job = pick(joblist)
else
changeling_job = correct_person:assigned_role
else
changeling_job = pick(joblist)
if(prob(prob_right_dude) && ticker.mode == "changeling")
- if(correct_person:assigned_role=="MODE")
+ if(correct_person:assigned_role == correct_person:special_role)
changeling_name = correct_person:current
else
changeling_name = src.pick_mob()
diff --git a/code/game/gamemodes/miniantags/abduction/abduction.dm b/code/game/gamemodes/miniantags/abduction/abduction.dm
index b54b18335ef..1c6dc7d3022 100644
--- a/code/game/gamemodes/miniantags/abduction/abduction.dm
+++ b/code/game/gamemodes/miniantags/abduction/abduction.dm
@@ -74,11 +74,11 @@
agent = preset_agent
- scientist.assigned_role = "MODE"
+ scientist.assigned_role = SPECIAL_ROLE_ABDUCTOR_SCIENTIST
scientist.special_role = SPECIAL_ROLE_ABDUCTOR_SCIENTIST
log_game("[key_name(scientist)] has been selected as an abductor team [team_number] scientist.")
- agent.assigned_role = "MODE"
+ agent.assigned_role = SPECIAL_ROLE_ABDUCTOR_AGENT
agent.special_role = SPECIAL_ROLE_ABDUCTOR_AGENT
log_game("[key_name(agent)] has been selected as an abductor team [team_number] agent.")
diff --git a/code/game/gamemodes/miniantags/morph/morph_event.dm b/code/game/gamemodes/miniantags/morph/morph_event.dm
index d9e26597a2b..ab875832451 100644
--- a/code/game/gamemodes/miniantags/morph/morph_event.dm
+++ b/code/game/gamemodes/miniantags/morph/morph_event.dm
@@ -19,7 +19,7 @@
return kill()
var/mob/living/simple_animal/hostile/morph/S = new /mob/living/simple_animal/hostile/morph(pick(xeno_spawn))
player_mind.transfer_to(S)
- player_mind.assigned_role = "Morph"
+ player_mind.assigned_role = SPECIAL_ROLE_MORPH
player_mind.special_role = SPECIAL_ROLE_MORPH
ticker.mode.traitors |= player_mind
to_chat(S, S.playstyle_string)
diff --git a/code/game/gamemodes/miniantags/revenant/revenant.dm b/code/game/gamemodes/miniantags/revenant/revenant.dm
index fa659b50c43..953e6e91762 100644
--- a/code/game/gamemodes/miniantags/revenant/revenant.dm
+++ b/code/game/gamemodes/miniantags/revenant/revenant.dm
@@ -392,7 +392,7 @@
var/datum/mind/player_mind = new /datum/mind(key_of_revenant)
player_mind.active = 1
player_mind.transfer_to(R)
- player_mind.assigned_role = "revenant"
+ player_mind.assigned_role = SPECIAL_ROLE_REVENANT
player_mind.special_role = SPECIAL_ROLE_REVENANT
ticker.mode.traitors |= player_mind
message_admins("[key_of_revenant] has been [client_to_revive ? "re":""]made into a revenant by reforming ectoplasm.")
diff --git a/code/game/gamemodes/miniantags/revenant/revenant_spawn_event.dm b/code/game/gamemodes/miniantags/revenant/revenant_spawn_event.dm
index 859f863b03c..a70114d8f5e 100644
--- a/code/game/gamemodes/miniantags/revenant/revenant_spawn_event.dm
+++ b/code/game/gamemodes/miniantags/revenant/revenant_spawn_event.dm
@@ -43,7 +43,7 @@
return kill()
var/mob/living/simple_animal/revenant/revvie = new /mob/living/simple_animal/revenant/(pick(spawn_locs))
player_mind.transfer_to(revvie)
- player_mind.assigned_role = "revenant"
+ player_mind.assigned_role = SPECIAL_ROLE_REVENANT
player_mind.special_role = SPECIAL_ROLE_REVENANT
ticker.mode.traitors |= player_mind
message_admins("[key_of_revenant] has been made into a revenant by an event.")
diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm
index b2f06a7913a..feffadcf9ab 100644
--- a/code/game/gamemodes/nuclear/nuclear.dm
+++ b/code/game/gamemodes/nuclear/nuclear.dm
@@ -49,7 +49,7 @@ proc/issyndicate(mob/living/M as mob)
agent_number--
for(var/datum/mind/synd_mind in syndicates)
- synd_mind.assigned_role = "MODE" //So they aren't chosen for other jobs.
+ synd_mind.assigned_role = SPECIAL_ROLE_NUKEOPS //So they aren't chosen for other jobs.
synd_mind.special_role = SPECIAL_ROLE_NUKEOPS
return 1
diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm
index c9ad5ce69e4..151f7606351 100644
--- a/code/game/gamemodes/objective.dm
+++ b/code/game/gamemodes/objective.dm
@@ -515,7 +515,7 @@ var/list/potential_theft_objectives = subtypesof(/datum/theft_objective) - /datu
var/list/priority_targets = list()
for(var/datum/mind/possible_target in ticker.minds)
- if(possible_target != owner && ishuman(possible_target.current) && (possible_target.current.stat != DEAD) && (possible_target.assigned_role != "MODE"))
+ if(possible_target != owner && ishuman(possible_target.current) && (possible_target.current.stat != DEAD) && (possible_target.assigned_role != possible_target.special_role))
possible_targets += possible_target
for(var/role in roles)
if(possible_target.assigned_role == role)
diff --git a/code/game/gamemodes/wizard/wizard.dm b/code/game/gamemodes/wizard/wizard.dm
index 3294f1f3a0b..40c303ea36f 100644
--- a/code/game/gamemodes/wizard/wizard.dm
+++ b/code/game/gamemodes/wizard/wizard.dm
@@ -27,7 +27,7 @@
wizards += wizard
modePlayer += wizard
- wizard.assigned_role = "MODE" //So they aren't chosen for other jobs.
+ wizard.assigned_role = SPECIAL_ROLE_WIZARD //So they aren't chosen for other jobs.
wizard.special_role = SPECIAL_ROLE_WIZARD
wizard.original = wizard.current
if(wizardstart.len == 0)
diff --git a/code/game/jobs/job_objective.dm b/code/game/jobs/job_objective.dm
index 8860cdf4931..036d289a848 100644
--- a/code/game/jobs/job_objective.dm
+++ b/code/game/jobs/job_objective.dm
@@ -49,7 +49,7 @@
if(!employee.job_objectives.len)//If the employee had no objectives, don't need to process this.
continue
- if(!employee.assigned_role=="MODE")//If the employee is a gamemode thing, skip.
+ if(employee.assigned_role == employee.special_role) //If the character is an offstation character, skip them.
continue
var/tasks_completed=0
diff --git a/code/game/mecha/mecha_topic.dm b/code/game/mecha/mecha_topic.dm
index 6c455c673f3..2ce732f83ed 100644
--- a/code/game/mecha/mecha_topic.dm
+++ b/code/game/mecha/mecha_topic.dm
@@ -298,6 +298,7 @@
var/newname = strip_html_simple(input(occupant,"Choose new exosuit name","Rename exosuit",initial(name)) as text, MAX_NAME_LEN)
if(newname && trim(newname))
name = newname
+ log_game("[key_name(occupant)] has renamed an exosuit [newname]")
else
alert(occupant, "nope.avi")
return
diff --git a/code/game/objects/effects/barsign.dm b/code/game/objects/effects/barsign.dm
deleted file mode 100644
index fd66f8028d1..00000000000
--- a/code/game/objects/effects/barsign.dm
+++ /dev/null
@@ -1,8 +0,0 @@
-/obj/effect/sign/double/barsign
- icon = 'icons/obj/barsigns.dmi'
- icon_state = "empty"
- anchored = 1
-
- New()
- var/list/valid_states = list("pinkflamingo", "magmasea", "limbo", "rustyaxe", "armokbar", "brokendrum", "meadbay", "thedamnwall", "thecavern", "cindikate", "theorchard", "thesaucyclown", "theclownshead", "whiskeyimplant", "carpecarp", "robustroadhouse", "greytide", "theredshirt")
- src.icon_state = "[pick(valid_states)]"
diff --git a/code/game/objects/items/weapons/implants/implant_traitor.dm b/code/game/objects/items/weapons/implants/implant_traitor.dm
index 68ef65664c7..adf988c2dee 100644
--- a/code/game/objects/items/weapons/implants/implant_traitor.dm
+++ b/code/game/objects/items/weapons/implants/implant_traitor.dm
@@ -59,7 +59,7 @@
var/datum/objective/protect/mindslave/MS = new
MS.owner = H.mind
MS.target = user.mind
- MS.explanation_text = "Obey every order from and protect [user.real_name], the [user.mind.assigned_role=="MODE" ? (user.mind.special_role) : (user.mind.assigned_role)]."
+ MS.explanation_text = "Obey every order from and protect [user.real_name], the [user.mind.assigned_role == user.mind.special_role ? (user.mind.special_role) : (user.mind.assigned_role)]."
H.mind.objectives += MS
for(var/datum/objective/objective in H.mind.objectives)
to_chat(H, "Objective #1: [objective.explanation_text]")
diff --git a/code/game/response_team.dm b/code/game/response_team.dm
index 6120ae042bf..596d59c7b16 100644
--- a/code/game/response_team.dm
+++ b/code/game/response_team.dm
@@ -171,7 +171,7 @@ var/ert_request_answered = 0
M.mind = new
M.mind.current = M
M.mind.original = M
- M.mind.assigned_role = "MODE"
+ M.mind.assigned_role = SPECIAL_ROLE_ERT
M.mind.special_role = SPECIAL_ROLE_ERT
if(!(M.mind in ticker.minds))
ticker.minds += M.mind //Adds them to regular mind list.
diff --git a/code/game/skincmd.dm b/code/game/skincmd.dm
deleted file mode 100644
index 7d27a1ce6df..00000000000
--- a/code/game/skincmd.dm
+++ /dev/null
@@ -1,13 +0,0 @@
-/mob/var/skincmds = list()
-/obj/proc/SkinCmd(mob/user as mob, var/data as text)
-
-/proc/SkinCmdRegister(var/mob/user, var/name as text, var/O as obj)
- user.skincmds[name] = O
-
-/mob/verb/skincmd(data as text)
- set hidden = 1
-
- var/ref = copytext(data, 1, findtext(data, ";"))
- if(src.skincmds[ref] != null)
- var/obj/a = src.skincmds[ref]
- a.SkinCmd(src, copytext(data, findtext(data, ";") + 1))
\ No newline at end of file
diff --git a/code/game/smoothwall.dm b/code/game/smoothwall.dm
deleted file mode 100644
index 20dea8de7b0..00000000000
--- a/code/game/smoothwall.dm
+++ /dev/null
@@ -1,108 +0,0 @@
-// OKAY I DON'T KNOW WHO THE FUCK ORIGINALLY CODED THIS BUT THEY ARE OFFICIALLY FIRED FOR BEING DRUNK AND STUPID
-// FUCK YOU MYSTERY CODERS
-// FOR THIS SHIT I'M GOING TO MAKE ALL MY COMMENTS IN CAPS
-
-/atom
- var/list/canSmoothWith=list() // TYPE PATHS I CAN SMOOTH WITH~~~~~
-
-// MOVED INTO UTILITY FUNCTION FOR LESS DUPLICATED CODE.
-/atom/proc/findSmoothingNeighbors()
- // THIS IS A BITMAP BECAUSE NORTH/SOUTH/ETC ARE ALL BITFLAGS BECAUSE BYOND IS DUMB AND
- // DOESN'T FUCKING MAKE SENSE, BUT IT WORKS TO OUR ADVANTAGE
- var/junction = 0
- for(var/cdir in cardinal)
- var/turf/T = get_step(src,cdir)
- if(isSmoothableNeighbor(T))
- junction |= cdir
- continue // NO NEED FOR FURTHER SEARCHING IN THIS TILE
- for(var/atom/A in T)
- if(isSmoothableNeighbor(A))
- junction |= cdir
- break // NO NEED FOR FURTHER SEARCHING IN THIS TILE
-
- return junction
-
-/atom/proc/isSmoothableNeighbor(var/atom/A)
- return is_type_in_list(A,canSmoothWith)
-
-/turf/simulated/wall/isSmoothableNeighbor(var/atom/A)
- if(is_type_in_list(A,canSmoothWith))
- // COLON OPERATORS ARE TERRIBLE BUT I HAVE NO CHOICE
- if(src.mineral == A:mineral) //mineral not walltype so reinf still smooths with normal and vice versa
- return 1
- return 0
-
-/**
- * WALL SMOOTHING SHIT
- *
- * IN /ATOM BECAUSE /TURFS ARE /ATOMS AND SO ARE /OBJ/STRUCTURE/FALSEWALLS
- * THIS IS STUPID BUT IS FAIRLY ELEGANT FOR BYOND
- *
- * HOWEVER, INSTEAD OF MAKING ONE BIG GODDAMN MONOLITHIC PROC LIKE A FUCKING
- * SHITTY FUNCTIONAL PROGRAMMER, WE WILL BE COOL AND MODERN AND USE INHERITANCE.
- */
-/atom/proc/relativewall()
- return // DOES JACK SHIT BY DEFAULT. OLD BEHAVIOR WAS TO SPAM LOOPS ANYWAY.
-
-/*
- * SEE? NOW WE ONLY HAVE TO PROGRAM THIS SHIT INTO WHAT WE WANT TO SMOOTH
- * INSTEAD OF BEING DUMB AND HAVING A BIG FUCKING IFTREE WITH TYPECHECKS
- * MY GOD, WE COULD EVEN MOVE THE CODE TO BE WITH THE REST OF THE WALL'S CODE!
- * HOW FUCKING INNOVATIVE. ISN'T INHERITANCE NICE?
- *
- * WE COULD STANDARDIZE THIS BUT EVERYONE'S A FUCKING SNOWFLAKE
- */
-/turf/simulated/wall/relativewall()
- var/junction=findSmoothingNeighbors()
- icon_state = "[walltype][junction]" // WHY ISN'T THIS IN UPDATE_ICON OR SIMILAR
-
-/atom/proc/relativewall_neighbours(var/sko=0) //SKO: Skip Optimizations
- // OPTIMIZE BY NOT CHECKING FOR NEIGHBORS IF WE DON'T FUCKING SMOOTH
- if(canSmoothWith.len>0 || sko)
- relativewall()
- for(var/cdir in cardinal)
- var/turf/T = get_step(src,cdir)
- if(isSmoothableNeighbor(T) || sko)
- T.relativewall()
- for(var/atom/A in T)
- if(isSmoothableNeighbor(A) || sko)
- A.relativewall()
-
-/turf/simulated/wall/New()
- ..()
- relativewall_neighbours()
-
-/turf/simulated/wall/Destroy()
- for(var/obj/effect/E in src)
- if(E.name == "Wallrot")
- qdel(E)
-
- if(!del_suppress_resmoothing)
- spawn(10)
- relativewall_neighbours(sko=1)
-
- // JESUS WHY
- for(var/direction in cardinal)
- for(var/obj/structure/glowshroom/shroom in get_step(src,direction))
- if(!shroom.floor) //shrooms drop to the floor
- shroom.floor = 1
- shroom.icon_state = "glowshroomf"
- shroom.pixel_x = 0
- shroom.pixel_y = 0
-/* for(var/obj/effect/supermatter_crystal/crystal in get_step(src,direction))
- if(!crystal.floor) //crystals drop to the floor
- crystal.floor = 1
- crystal.icon_state = "supermatter_crystalf"
- crystal.pixel_x = 0
- crystal.pixel_y = 0 */
- return ..()
-
-// DE-HACK
-/turf/simulated/wall/vault/relativewall()
- return
-
-
-/obj/structure/alien/resin/relativewall()
- var/junction = findSmoothingNeighbors()
- icon_state = "[resintype][junction]"
- return
\ No newline at end of file
diff --git a/code/modules/admin/verbs/gimmick_team.dm b/code/modules/admin/verbs/gimmick_team.dm
index 2ca1d3c27df..6192ad6b2ac 100644
--- a/code/modules/admin/verbs/gimmick_team.dm
+++ b/code/modules/admin/verbs/gimmick_team.dm
@@ -70,7 +70,7 @@
H.dna.ready_dna(H)
H.mind_initialize()
- H.mind.assigned_role = "MODE"
+ H.mind.assigned_role = "Event Character"
H.mind.special_role = "Event Character"
H.key = thisplayer.key
diff --git a/code/modules/admin/verbs/honksquad.dm b/code/modules/admin/verbs/honksquad.dm
index 36001fb9035..1e72c1836da 100644
--- a/code/modules/admin/verbs/honksquad.dm
+++ b/code/modules/admin/verbs/honksquad.dm
@@ -91,7 +91,7 @@ var/global/sent_honksquad = 0
//Creates mind stuff.
new_honksquad.mind_initialize()
- new_honksquad.mind.assigned_role = "MODE"
+ new_honksquad.mind.assigned_role = SPECIAL_ROLE_HONKSQUAD
new_honksquad.mind.special_role = SPECIAL_ROLE_HONKSQUAD
new_honksquad.add_language("Clownish")
ticker.mode.traitors |= new_honksquad.mind//Adds them to current traitor list. Which is really the extra antagonist list.
diff --git a/code/modules/admin/verbs/infiltratorteam_syndicate.dm b/code/modules/admin/verbs/infiltratorteam_syndicate.dm
index dad0141a3bc..cba1beb2cf6 100644
--- a/code/modules/admin/verbs/infiltratorteam_syndicate.dm
+++ b/code/modules/admin/verbs/infiltratorteam_syndicate.dm
@@ -149,7 +149,7 @@ var/global/sent_syndicate_infiltration_team = 0
//Creates mind stuff.
new_syndicate_infiltrator.mind_initialize()
- new_syndicate_infiltrator.mind.assigned_role = "MODE"
+ new_syndicate_infiltrator.mind.assigned_role = "Syndicate Infiltrator"
new_syndicate_infiltrator.mind.special_role = "Syndicate Infiltrator"
ticker.mode.traitors |= new_syndicate_infiltrator.mind //Adds them to extra antag list
new_syndicate_infiltrator.equip_syndicate_infiltrator(syndicate_leader_selected, uplink_tc, is_mgmt)
diff --git a/code/modules/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm
index 57e5b968178..b3f0a1a15a8 100644
--- a/code/modules/admin/verbs/one_click_antag.dm
+++ b/code/modules/admin/verbs/one_click_antag.dm
@@ -411,7 +411,7 @@ client/proc/one_click_antag()
//Creates mind stuff.
new_syndicate_commando.mind_initialize()
- new_syndicate_commando.mind.assigned_role = "MODE"
+ new_syndicate_commando.mind.assigned_role = SPECIAL_ROLE_SYNDICATE_DEATHSQUAD
new_syndicate_commando.mind.special_role = SPECIAL_ROLE_SYNDICATE_DEATHSQUAD
//Adds them to current traitor list. Which is really the extra antagonist list.
diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm
index 29c6111bc02..9eef4331ee0 100644
--- a/code/modules/admin/verbs/randomverbs.dm
+++ b/code/modules/admin/verbs/randomverbs.dm
@@ -429,7 +429,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
//Announces the character on all the systems, based on the record.
if(!issilicon(new_character))//If they are not a cyborg/AI.
- if(!record_found&&new_character.mind.assigned_role!="MODE")//If there are no records for them. If they have a record, this info is already in there. MODE people are not announced anyway.
+ if(!record_found && new_character.mind.assigned_role != new_character.mind.special_role)//If there are no records for them. If they have a record, this info is already in there. Offstation special characters announced anyway.
//Power to the user!
if(alert(new_character,"Warning: No data core entry detected. Would you like to announce the arrival of this character by adding them to various databases, such as medical records?",,"No","Yes")=="Yes")
data_core.manifest_inject(new_character)
diff --git a/code/modules/admin/verbs/striketeam.dm b/code/modules/admin/verbs/striketeam.dm
index f3298bb7eb9..1e809bcd948 100644
--- a/code/modules/admin/verbs/striketeam.dm
+++ b/code/modules/admin/verbs/striketeam.dm
@@ -83,7 +83,7 @@ var/global/sent_strike_team = 0
R.mind = new
R.mind.current = R
R.mind.original = R
- R.mind.assigned_role = "MODE"
+ R.mind.assigned_role = SPECIAL_ROLE_DEATHSQUAD
R.mind.special_role = SPECIAL_ROLE_DEATHSQUAD
if(!(R.mind in ticker.minds))
ticker.minds += R.mind
@@ -147,7 +147,7 @@ var/global/sent_strike_team = 0
//Creates mind stuff.
new_commando.mind_initialize()
- new_commando.mind.assigned_role = "MODE"
+ new_commando.mind.assigned_role = SPECIAL_ROLE_DEATHSQUAD
new_commando.mind.special_role = SPECIAL_ROLE_DEATHSQUAD
ticker.mode.traitors |= new_commando.mind//Adds them to current traitor list. Which is really the extra antagonist list.
new_commando.equip_death_commando(is_leader)
diff --git a/code/modules/admin/verbs/striketeam_syndicate.dm b/code/modules/admin/verbs/striketeam_syndicate.dm
index 2280beca919..c5f46c98592 100644
--- a/code/modules/admin/verbs/striketeam_syndicate.dm
+++ b/code/modules/admin/verbs/striketeam_syndicate.dm
@@ -115,7 +115,7 @@ var/global/sent_syndicate_strike_team = 0
//Creates mind stuff.
new_syndicate_commando.mind_initialize()
- new_syndicate_commando.mind.assigned_role = "MODE"
+ new_syndicate_commando.mind.assigned_role = SPECIAL_ROLE_SYNDICATE_DEATHSQUAD
new_syndicate_commando.mind.special_role = SPECIAL_ROLE_SYNDICATE_DEATHSQUAD
ticker.mode.traitors |= new_syndicate_commando.mind //Adds them to current traitor list. Which is really the extra antagonist list.
new_syndicate_commando.equip_syndicate_commando(is_leader)
diff --git a/code/modules/events/aurora_caelus.dm b/code/modules/events/aurora_caelus.dm
index e35c7de6ee3..6cf5e1b1ce7 100644
--- a/code/modules/events/aurora_caelus.dm
+++ b/code/modules/events/aurora_caelus.dm
@@ -6,11 +6,11 @@
var/aurora_progress = 0 //this cycles from 1 to 7, slowly changing colors from gentle green to gentle blue
/datum/event/aurora_caelus/announce()
- event_announcement.Announce("[station_name()]: A harmless cloud of ions is approaching your station, and will exhaust their energy battering the hull.\
-Nanotrasen has approved a short break for all employees to relax and observe this very rare event.\
-During this time, starlight will be bright but gentle, shifting between quiet green and blue colors.\
-Any staff who would like to view these lights for themselves may proceed to the area nearest to them with viewing ports to open space.\
-We hope you enjoy the lights.", "Harmless ions approaching", new_sound = 'sound/misc/notice2.ogg', from = "Nanotrasen Meterology Divison")
+ event_announcement.Announce("[station_name()]: A harmless cloud of ions is approaching your station, and will exhaust their energy battering the hull. \
+Nanotrasen has approved a short break for all employees to relax and observe this very rare event. \
+During this time, starlight will be bright but gentle, shifting between quiet green and blue colors. \
+Any staff who would like to view these lights for themselves may proceed to the area nearest to them with viewing ports to open space. \
+We hope you enjoy the lights.", "Harmless ions approaching", new_sound = 'sound/misc/notice2.ogg', from = "Nanotrasen Meteorology Division")
for(var/V in player_list)
var/mob/M = V
if((M.client.prefs.toggles & SOUND_MIDI) && is_station_level(M.z))
@@ -37,10 +37,10 @@ We hope you enjoy the lights.", "Harmless ions approaching", new_sound = 'sound/
for(var/s in GLOB.station_level_space_turfs)
var/turf/space/S = s
fade_to_black(S)
- event_announcement.Announce("The aurora caelus event is now ending. Starlight conditions will slowly return to normal.\
-When this has concluded, please return to your workplace and continue work as normal.\
+ event_announcement.Announce("The Aurora Caelus event is now ending. Starlight conditions will slowly return to normal. \
+When this has concluded, please return to your workplace and continue work as normal. \
Have a pleasant shift, [station_name()], and thank you for watching with us.",
-"Harmless ions approaching", new_sound = 'sound/misc/notice2.ogg', from = "Nanotrasen Meterology Divison")
+"Harmless ions approaching", new_sound = 'sound/misc/notice2.ogg', from = "Nanotrasen Meteorology Division")
/datum/event/aurora_caelus/proc/fade_to_black(turf/space/S)
set waitfor = FALSE
@@ -48,4 +48,4 @@ Have a pleasant shift, [station_name()], and thank you for watching with us.",
while(S.light_range > new_light)
S.set_light(S.light_range - 0.2)
sleep(30)
- S.set_light(new_light, 1, l_color = "") // we should be able to use `, null` as the last arg but BYOND is a piece of FUCKING SHIT AND SET_LIGHT DOESN'T WORK THAT WAY DESPITE EVERY FUCKING THING ABOUT IT INDICATING THAT IT GODDAMN WELL SHOULD AAAAAAAAAAAAAAAAA
\ No newline at end of file
+ S.set_light(new_light, 1, l_color = "") // we should be able to use `, null` as the last arg but BYOND is a piece of FUCKING SHIT AND SET_LIGHT DOESN'T WORK THAT WAY DESPITE EVERY FUCKING THING ABOUT IT INDICATING THAT IT GODDAMN WELL SHOULD AAAAAAAAAAAAAAAAA
diff --git a/code/modules/events/ion_storm.dm b/code/modules/events/ion_storm.dm
index 520d8805bbd..b4a67ac9850 100644
--- a/code/modules/events/ion_storm.dm
+++ b/code/modules/events/ion_storm.dm
@@ -493,7 +493,7 @@
/proc/generate_static_ion_law()
/var/list/players = list()
for(var/mob/living/carbon/human/player in player_list)
- if( !player.mind || player.mind.assigned_role == "MODE" || player.client.inactivity > MinutesToTicks(10))
+ if( !player.mind || player.mind.assigned_role == player.mind.special_role || player.client.inactivity > MinutesToTicks(10))
continue
players += player.real_name
var/random_player = "The Captain"
diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm
index cd94d79bd5c..bc442486d5c 100644
--- a/code/modules/food_and_drinks/food/snacks.dm
+++ b/code/modules/food_and_drinks/food/snacks.dm
@@ -1255,7 +1255,7 @@
else
log_game("Cube ([monkey_type]) inflated, last touched by: NO_DATA")
var/mob/living/carbon/human/creature = new /mob/living/carbon/human(get_turf(src))
- if(fingerprintshidden.len)
+ if(LAZYLEN(fingerprintshidden))
creature.fingerprintshidden = fingerprintshidden.Copy()
creature.set_species(monkey_type)
qdel(src)
diff --git a/code/modules/mob/living/carbon/alien/special/alien_embryo.dm b/code/modules/mob/living/carbon/alien/special/alien_embryo.dm
index ae03f103e86..e09340872b9 100644
--- a/code/modules/mob/living/carbon/alien/special/alien_embryo.dm
+++ b/code/modules/mob/living/carbon/alien/special/alien_embryo.dm
@@ -96,7 +96,7 @@
if(ticker && ticker.mode)
ticker.mode.xenos += new_xeno.mind
new_xeno.mind.name = new_xeno.name
- new_xeno.mind.assigned_role = "MODE"
+ new_xeno.mind.assigned_role = SPECIAL_ROLE_XENOMORPH
new_xeno.mind.special_role = SPECIAL_ROLE_XENOMORPH
new_xeno << sound('sound/voice/hiss5.ogg',0,0,0,100)//To get the player's attention
diff --git a/code/modules/mob/living/carbon/human/npcs.dm b/code/modules/mob/living/carbon/human/npcs.dm
index b66a0ee52ba..c21c1990cbe 100644
--- a/code/modules/mob/living/carbon/human/npcs.dm
+++ b/code/modules/mob/living/carbon/human/npcs.dm
@@ -5,9 +5,8 @@
item_color = "punpun"
species_restricted = list("Monkey")
-/mob/living/carbon/human/monkey/punpun/New()
+/mob/living/carbon/human/monkey/punpun/Initialize(mapload)
..()
- spawn(1)
- name = "Pun Pun"
- real_name = name
- equip_to_slot(new /obj/item/clothing/under/punpun(src), slot_w_uniform)
\ No newline at end of file
+ name = "Pun Pun"
+ real_name = name
+ equip_to_slot(new /obj/item/clothing/under/punpun(src), slot_w_uniform)
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index c623cc3cad6..444c4c23949 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -1382,7 +1382,7 @@ var/list/robot_verbs_default = list(
mind = new
mind.current = src
mind.original = src
- mind.assigned_role = "MODE"
+ mind.assigned_role = SPECIAL_ROLE_ERT
mind.special_role = SPECIAL_ROLE_ERT
if(cyborg_unlock)
crisis = 1
diff --git a/code/modules/mob/living/simple_animal/bot/construction.dm b/code/modules/mob/living/simple_animal/bot/construction.dm
index 1ced2db841c..9e96a16fb0f 100644
--- a/code/modules/mob/living/simple_animal/bot/construction.dm
+++ b/code/modules/mob/living/simple_animal/bot/construction.dm
@@ -30,9 +30,10 @@
var/t = stripped_input(user, "Enter new robot name", name, created_name,MAX_NAME_LEN)
if(!t)
return
- if(!in_range(src, usr) && loc != usr)
+ if(!in_range(src, user) && loc != user)
return
created_name = t
+ log_game("[key_name(user)] has renamed a robot to [t]")
//Edbot Assembly
@@ -53,9 +54,10 @@
var/t = stripped_input(user, "Enter new robot name", name, created_name,MAX_NAME_LEN)
if(!t)
return
- if(!in_range(src, usr) && loc != usr)
+ if(!in_range(src, user) && loc != user)
return
created_name = t
+ log_game("[key_name(user)] has renamed a robot to [t]")
return
switch(build_step)
@@ -253,10 +255,11 @@
var/t = stripped_input(user, "Enter new robot name", name, created_name,MAX_NAME_LEN)
if(!t)
return
- if(!in_range(src, usr) && loc != usr)
+ if(!in_range(src, user) && loc != user)
return
created_name = t
+ log_game("[key_name(user)] has renamed a robot to [t]")
/obj/item/toolbox_tiles_sensor/attackby(obj/item/W, mob/user, params)
..()
@@ -272,10 +275,11 @@
var/t = stripped_input(user, "Enter new robot name", name, created_name,MAX_NAME_LEN)
if(!t)
return
- if(!in_range(src, usr) && loc != usr)
+ if(!in_range(src, user) && loc != user)
return
created_name = t
+ log_game("[key_name(user)] has renamed a robot to [t]")
//Medbot Assembly
/obj/item/firstaid_arm_assembly
@@ -347,9 +351,10 @@
var/t = stripped_input(user, "Enter new robot name", name, created_name,MAX_NAME_LEN)
if(!t)
return
- if(!in_range(src, usr) && loc != usr)
+ if(!in_range(src, user) && loc != user)
return
created_name = t
+ log_game("[key_name(user)] has renamed a robot to [t]")
else
switch(build_step)
if(0)
@@ -457,9 +462,10 @@
var/t = stripped_input(user, "Enter new robot name", name, created_name,MAX_NAME_LEN)
if(!t)
return
- if(!in_range(src, usr) && loc != usr)
+ if(!in_range(src, user) && loc != user)
return
created_name = t
+ log_game("[key_name(user)] has renamed a robot to [t]")
else if(istype(I, /obj/item/screwdriver))
if(!build_step)
diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm
index bf6526c856e..fdd9266c128 100644
--- a/code/modules/mob/new_player/new_player.dm
+++ b/code/modules/mob/new_player/new_player.dm
@@ -326,7 +326,7 @@
if(ailist.len)
var/mob/living/silicon/ai/announcer = pick(ailist)
if(character.mind)
- if((character.mind.assigned_role != "Cyborg") && (character.mind.special_role != "MODE"))
+ if((character.mind.assigned_role != "Cyborg") && (character.mind.assigned_role != character.mind.special_role))
if(character.mind.role_alt_title)
rank = character.mind.role_alt_title
var/arrivalmessage = announcer.arrivalmsg
@@ -338,7 +338,7 @@
announcer.say(";[arrivalmessage]")
else
if(character.mind)
- if((character.mind.assigned_role != "Cyborg") && (character.mind.special_role != "MODE"))
+ if((character.mind.assigned_role != "Cyborg") && (character.mind.assigned_role != character.mind.special_role))
if(character.mind.role_alt_title)
rank = character.mind.role_alt_title
global_announcer.autosay("[character.real_name],[rank ? " [rank]," : " visitor," ] [join_message ? join_message : "has arrived on the station"].", "Arrivals Announcement Computer")
@@ -351,12 +351,12 @@
if(ailist.len)
var/mob/living/silicon/ai/announcer = pick(ailist)
if(character.mind)
- if((character.mind.special_role != "MODE"))
+ if(character.mind.assigned_role != character.mind.special_role)
var/arrivalmessage = "A new[rank ? " [rank]" : " visitor" ] [join_message ? join_message : "has arrived on the station"]."
announcer.say(";[arrivalmessage]")
else
if(character.mind)
- if((character.mind.special_role != "MODE"))
+ if(character.mind.assigned_role != character.mind.special_role)
// can't use their name here, since cyborg namepicking is done post-spawn, so we'll just say "A new Cyborg has arrived"/"A new Android has arrived"/etc.
global_announcer.autosay("A new[rank ? " [rank]" : " visitor" ] [join_message ? join_message : "has arrived on the station"].", "Arrivals Announcement Computer")
diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm
index 8965432aac0..7d2568a7199 100644
--- a/code/modules/projectiles/guns/energy/special.dm
+++ b/code/modules/projectiles/guns/energy/special.dm
@@ -342,9 +342,9 @@
user << browse("