From 354bdfda26bddc602f1e5269abe284ec59d9cf54 Mon Sep 17 00:00:00 2001 From: Aurorablade Date: Mon, 6 Nov 2017 23:44:53 -0500 Subject: [PATCH 01/29] Base --- code/__DEFINES/antagonists.dm | 0 code/datums/antagonists/antag_datum.dm | 64 ++++++++++++++++++++++++++ code/datums/mind.dm | 52 +++++++++++++++++++++ paradise.dme | 2 + 4 files changed, 118 insertions(+) create mode 100644 code/__DEFINES/antagonists.dm create mode 100644 code/datums/antagonists/antag_datum.dm diff --git a/code/__DEFINES/antagonists.dm b/code/__DEFINES/antagonists.dm new file mode 100644 index 00000000000..e69de29bb2d diff --git a/code/datums/antagonists/antag_datum.dm b/code/datums/antagonists/antag_datum.dm new file mode 100644 index 00000000000..1af50313c69 --- /dev/null +++ b/code/datums/antagonists/antag_datum.dm @@ -0,0 +1,64 @@ +var/global/list/antagonists = list() + +/datum/antagonist + var/name = "Antagonist" + 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 + +/datum/antagonist/New(datum/mind/new_owner) + antagonists += src + typecache_datum_blacklist = typecacheof(typecache_datum_blacklist) + if(new_owner) + owner = new_owner + +/datum/antagonist/Destroy() + antagonists -= src + if(owner) + LAZYREMOVE(owner.antag_datums, src) + owner = null + return ..() + +/datum/antagonist/proc/can_be_owned(datum/mind/new_owner) + . = TRUE + if(owner.has_antag_datum(type)) + return FALSE + for(var/i in owner.antag_datums) + var/datum/antagonist/A = i + if(is_type_in_typecache(src, A.typecache_datum_blacklist)) + return FALSE + +/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 + +//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() + +/datum/antagonist/proc/on_removal() + remove_innate_effects() + if(owner) + LAZYREMOVE(owner.antag_datums, src) + if(!silent && owner.current) + farewell() + qdel(src) + +/datum/antagonist/proc/greet() + return + +/datum/antagonist/proc/farewell() + return \ No newline at end of file diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 3e1c3207a87..1a1f28ebc31 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -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 = list() var/speech_span // What span any body this mind has talks in. var/datum/faction/faction //associated faction var/datum/changeling/changeling //changeling holder @@ -83,6 +84,7 @@ /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 +97,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) @@ -1243,6 +1248,53 @@ */ + +// 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() + +/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) diff --git a/paradise.dme b/paradise.dme index d2239b98e70..6149d7f1941 100644 --- a/paradise.dme +++ b/paradise.dme @@ -17,6 +17,7 @@ #include "code\world.dm" #include "code\__DEFINES\_readme.dm" #include "code\__DEFINES\admin.dm" +#include "code\__DEFINES\antagonists.dm" #include "code\__DEFINES\atmospherics.dm" #include "code\__DEFINES\bots.dm" #include "code\__DEFINES\callbacks.dm" @@ -226,6 +227,7 @@ #include "code\datums\uplink_item.dm" #include "code\datums\vision_override.dm" #include "code\datums\vr.dm" +#include "code\datums\antagonists\antag_datum.dm" #include "code\datums\cache\air_alarm.dm" #include "code\datums\cache\apc.dm" #include "code\datums\cache\cache.dm" From f93e28290259123ed0a4cf94bf216c4847a898d4 Mon Sep 17 00:00:00 2001 From: Aurorablade Date: Wed, 8 Nov 2017 00:36:40 -0500 Subject: [PATCH 02/29] team shit --- code/datums/antagonists/antag_datum.dm | 37 ++++++++++++++++++++++++-- code/datums/mind.dm | 17 +++++++++--- code/game/gamemodes/objectives_team.dm | 24 +++++++++++++++++ paradise.dme | 1 + 4 files changed, 74 insertions(+), 5 deletions(-) create mode 100644 code/game/gamemodes/objectives_team.dm diff --git a/code/datums/antagonists/antag_datum.dm b/code/datums/antagonists/antag_datum.dm index 1af50313c69..6be68879603 100644 --- a/code/datums/antagonists/antag_datum.dm +++ b/code/datums/antagonists/antag_datum.dm @@ -7,6 +7,8 @@ var/global/list/antagonists = list() 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/antag_role //the antag type + var/replace_banned = TRUE //Should replace jobbaned player with ghosts if granted. /datum/antagonist/New(datum/mind/new_owner) antagonists += src @@ -23,9 +25,10 @@ var/global/list/antagonists = list() /datum/antagonist/proc/can_be_owned(datum/mind/new_owner) . = TRUE - if(owner.has_antag_datum(type)) + var/datum/mind/tested = new_owner || owner + if(tested.has_antag_datum(type)) return FALSE - for(var/i in owner.antag_datums) + for(var/i in tested.antag_datums) var/datum/antagonist/A = i if(is_type_in_typecache(src, A.typecache_datum_blacklist)) return FALSE @@ -42,12 +45,35 @@ var/global/list/antagonists = list() /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/objective_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,"Syndicate") || (antag_role && jobban_isbanned(M,antag_role))) + +/datum/antagonist/proc/replace_banned_player() + set waitfor = FALSE + + var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as a [name]?", "[name]", null, antag_role, 0, 100) + var/mob/dead/observer/theghost = null + if(candidates.len) + theghost = pick(candidates) + to_chat(owner, "Your mob has been taken over by a ghost! Appeal your role ban if you want to avoid this in the future!") + message_admins("[key_name_admin(theghost)] has taken control of ([key_name_admin(owner.current)]) to replace a jobbaned player.") + owner.current.ghostize(0) + owner.current.key = theghost.key /datum/antagonist/proc/on_removal() remove_innate_effects() @@ -55,10 +81,17 @@ var/global/list/antagonists = list() LAZYREMOVE(owner.antag_datums, src) if(!silent && owner.current) farewell() + var/datum/objective_team/team = get_team() + if(team) + team.remove_member(owner) qdel(src) /datum/antagonist/proc/greet() return +//Returns the team antagonist belongs to if any. +/datum/antagonist/proc/get_team() + return + /datum/antagonist/proc/farewell() return \ No newline at end of file diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 1a1f28ebc31..7d2e47cf93f 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -73,15 +73,26 @@ 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 diff --git a/code/game/gamemodes/objectives_team.dm b/code/game/gamemodes/objectives_team.dm new file mode 100644 index 00000000000..7789a167c71 --- /dev/null +++ b/code/game/gamemodes/objectives_team.dm @@ -0,0 +1,24 @@ +//A barebones antagonist team. +/datum/objective_team + var/list/datum/mind/members = list() + var/name = "team" + var/member_name = "member" + +/datum/objective_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) + members += starting_members + +/datum/objective_team/proc/is_solo() + return members.len == 1 + +/datum/objective_team/proc/add_member(datum/mind/new_member) + members |= new_member + +/datum/objective_team/proc/remove_member(datum/mind/member) + members -= member \ No newline at end of file diff --git a/paradise.dme b/paradise.dme index 6149d7f1941..f306d93a0d0 100644 --- a/paradise.dme +++ b/paradise.dme @@ -386,6 +386,7 @@ #include "code\game\gamemodes\gameticker.dm" #include "code\game\gamemodes\intercept_report.dm" #include "code\game\gamemodes\objective.dm" +#include "code\game\gamemodes\objectives_team.dm" #include "code\game\gamemodes\scoreboard.dm" #include "code\game\gamemodes\setupgame.dm" #include "code\game\gamemodes\steal_items.dm" From 24e2e507d486d52ba8ef4a98ccd6a9c7b2cdd396 Mon Sep 17 00:00:00 2001 From: Aurorablade Date: Sun, 26 Nov 2017 20:23:15 -0500 Subject: [PATCH 03/29] tiger tweaks --- code/datums/antagonists/antag_datum.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/datums/antagonists/antag_datum.dm b/code/datums/antagonists/antag_datum.dm index 6be68879603..185f913bce6 100644 --- a/code/datums/antagonists/antag_datum.dm +++ b/code/datums/antagonists/antag_datum.dm @@ -70,8 +70,9 @@ var/global/list/antagonists = list() var/mob/dead/observer/theghost = null if(candidates.len) theghost = pick(candidates) - to_chat(owner, "Your mob has been taken over by a ghost! Appeal your role ban if you want to avoid this in the future!") + to_chat(owner, " Your mob has been taken over by a ghost! Appeal your role ban if you want to avoid this in the future!") message_admins("[key_name_admin(theghost)] has taken control of ([key_name_admin(owner.current)]) to replace a jobbaned player.") + log_admin("[key_name_admin(theghost)] has taken control of ([key_name_admin(owner.current)]) to replace a jobbaned player.") owner.current.ghostize(0) owner.current.key = theghost.key From ce31ef8f9c45413999563fad53f51bbf9813fceb Mon Sep 17 00:00:00 2001 From: Aurorablade Date: Sun, 26 Nov 2017 20:46:08 -0500 Subject: [PATCH 04/29] Dammit tiger --- code/datums/antagonists/antag_datum.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/datums/antagonists/antag_datum.dm b/code/datums/antagonists/antag_datum.dm index 185f913bce6..75ce6cebe26 100644 --- a/code/datums/antagonists/antag_datum.dm +++ b/code/datums/antagonists/antag_datum.dm @@ -70,7 +70,7 @@ var/global/list/antagonists = list() var/mob/dead/observer/theghost = null if(candidates.len) theghost = pick(candidates) - to_chat(owner, " Your mob has been taken over by a ghost! Appeal your role ban if you want to avoid this in the future!") + to_chat(owner, " Your mob has been taken over by a ghost! Appeal your role ban if you want to avoid this in the future!") message_admins("[key_name_admin(theghost)] has taken control of ([key_name_admin(owner.current)]) to replace a jobbaned player.") log_admin("[key_name_admin(theghost)] has taken control of ([key_name_admin(owner.current)]) to replace a jobbaned player.") owner.current.ghostize(0) From 4192ba131eae435c49927536e0bd456aba38611a Mon Sep 17 00:00:00 2001 From: Aurorablade Date: Thu, 18 Jan 2018 23:55:21 -0500 Subject: [PATCH 05/29] update --- code/datums/antagonists/antag_datum.dm | 2 +- code/game/gamemodes/antag_team.dm | 24 ++++++++++++++++++++++++ code/game/gamemodes/objectives_team.dm | 24 ------------------------ paradise.dme | 2 +- 4 files changed, 26 insertions(+), 26 deletions(-) create mode 100644 code/game/gamemodes/antag_team.dm delete mode 100644 code/game/gamemodes/objectives_team.dm diff --git a/code/datums/antagonists/antag_datum.dm b/code/datums/antagonists/antag_datum.dm index 75ce6cebe26..c6938031776 100644 --- a/code/datums/antagonists/antag_datum.dm +++ b/code/datums/antagonists/antag_datum.dm @@ -82,7 +82,7 @@ var/global/list/antagonists = list() LAZYREMOVE(owner.antag_datums, src) if(!silent && owner.current) farewell() - var/datum/objective_team/team = get_team() + var/datum/team/team = get_team() if(team) team.remove_member(owner) qdel(src) diff --git a/code/game/gamemodes/antag_team.dm b/code/game/gamemodes/antag_team.dm new file mode 100644 index 00000000000..12058bcfb12 --- /dev/null +++ b/code/game/gamemodes/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 \ No newline at end of file diff --git a/code/game/gamemodes/objectives_team.dm b/code/game/gamemodes/objectives_team.dm deleted file mode 100644 index 7789a167c71..00000000000 --- a/code/game/gamemodes/objectives_team.dm +++ /dev/null @@ -1,24 +0,0 @@ -//A barebones antagonist team. -/datum/objective_team - var/list/datum/mind/members = list() - var/name = "team" - var/member_name = "member" - -/datum/objective_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) - members += starting_members - -/datum/objective_team/proc/is_solo() - return members.len == 1 - -/datum/objective_team/proc/add_member(datum/mind/new_member) - members |= new_member - -/datum/objective_team/proc/remove_member(datum/mind/member) - members -= member \ No newline at end of file diff --git a/paradise.dme b/paradise.dme index f306d93a0d0..f03d37b701c 100644 --- a/paradise.dme +++ b/paradise.dme @@ -381,12 +381,12 @@ #include "code\game\dna\genes\vg_powers.dm" #include "code\game\gamemodes\antag_hud.dm" #include "code\game\gamemodes\antag_spawner.dm" +#include "code\game\gamemodes\antag_team.dm" #include "code\game\gamemodes\factions.dm" #include "code\game\gamemodes\game_mode.dm" #include "code\game\gamemodes\gameticker.dm" #include "code\game\gamemodes\intercept_report.dm" #include "code\game\gamemodes\objective.dm" -#include "code\game\gamemodes\objectives_team.dm" #include "code\game\gamemodes\scoreboard.dm" #include "code\game\gamemodes\setupgame.dm" #include "code\game\gamemodes\steal_items.dm" From 68d10e773ba532344584781baf84caa35a2825c6 Mon Sep 17 00:00:00 2001 From: Aurorablade Date: Sun, 25 Mar 2018 22:57:17 -0400 Subject: [PATCH 06/29] tays suggestion on list plust something new as an update --- code/datums/antagonists/antag_datum.dm | 4 ++++ code/datums/mind.dm | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/code/datums/antagonists/antag_datum.dm b/code/datums/antagonists/antag_datum.dm index c6938031776..2464d5a4584 100644 --- a/code/datums/antagonists/antag_datum.dm +++ b/code/datums/antagonists/antag_datum.dm @@ -9,6 +9,10 @@ var/global/list/antagonists = list() var/delete_on_mind_deletion = TRUE var/antag_role //the antag type 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 + + /datum/antagonist/New(datum/mind/new_owner) antagonists += src diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 7d2e47cf93f..2afb5e084cd 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -54,7 +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 = list() + 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 From 6f63e8b4b950c1f1b798ab694f3fc66db62f5a78 Mon Sep 17 00:00:00 2001 From: Tayyyyyyy Date: Wed, 9 May 2018 19:03:49 -0500 Subject: [PATCH 07/29] Fix Aurora Caelus spelling and grammar. Fixes #8945 --- code/modules/events/aurora_caelus.dm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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 From 6c47553fcd4ea1b6306f78db267c489a86d5f020 Mon Sep 17 00:00:00 2001 From: Kyep Date: Wed, 9 May 2018 23:57:47 -0700 Subject: [PATCH 08/29] Fixes snacks.dm runtime and monkey bug --- code/modules/food_and_drinks/food/snacks.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm index cd94d79bd5c..b10ed07c783 100644 --- a/code/modules/food_and_drinks/food/snacks.dm +++ b/code/modules/food_and_drinks/food/snacks.dm @@ -1255,6 +1255,8 @@ 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) + fingerprintshidden = list() if(fingerprintshidden.len) creature.fingerprintshidden = fingerprintshidden.Copy() creature.set_species(monkey_type) From e7653b578b78d67c2863bf4991fae3e652db582f Mon Sep 17 00:00:00 2001 From: Kyep Date: Thu, 10 May 2018 00:06:17 -0700 Subject: [PATCH 09/29] Tiger request --- code/modules/food_and_drinks/food/snacks.dm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm index b10ed07c783..bc442486d5c 100644 --- a/code/modules/food_and_drinks/food/snacks.dm +++ b/code/modules/food_and_drinks/food/snacks.dm @@ -1255,9 +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) - fingerprintshidden = list() - if(fingerprintshidden.len) + if(LAZYLEN(fingerprintshidden)) creature.fingerprintshidden = fingerprintshidden.Copy() creature.set_species(monkey_type) qdel(src) From 6084f5cfefc490d1b76c706e0ab268302d75f579 Mon Sep 17 00:00:00 2001 From: Ansari Date: Thu, 10 May 2018 16:32:34 +0800 Subject: [PATCH 10/29] Log bot --- code/modules/mob/living/simple_animal/bot/construction.dm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/modules/mob/living/simple_animal/bot/construction.dm b/code/modules/mob/living/simple_animal/bot/construction.dm index 1ced2db841c..443a0f17070 100644 --- a/code/modules/mob/living/simple_animal/bot/construction.dm +++ b/code/modules/mob/living/simple_animal/bot/construction.dm @@ -33,6 +33,7 @@ if(!in_range(src, usr) && loc != usr) return created_name = t + log_game("[key_name(usr)] has renamed a robot to [t]") //Edbot Assembly @@ -56,6 +57,7 @@ if(!in_range(src, usr) && loc != usr) return created_name = t + log_game("[key_name(usr)] has renamed a robot to [t]") return switch(build_step) @@ -257,6 +259,7 @@ return created_name = t + log_game("[key_name(usr)] has renamed a robot to [t]") /obj/item/toolbox_tiles_sensor/attackby(obj/item/W, mob/user, params) ..() @@ -276,6 +279,7 @@ return created_name = t + log_game("[key_name(usr)] has renamed a robot to [t]") //Medbot Assembly /obj/item/firstaid_arm_assembly @@ -350,6 +354,7 @@ if(!in_range(src, usr) && loc != usr) return created_name = t + log_game("[key_name(usr)] has renamed a robot to [t]") else switch(build_step) if(0) @@ -460,6 +465,7 @@ if(!in_range(src, usr) && loc != usr) return created_name = t + log_game("[key_name(usr)] has renamed a robot to [t]") else if(istype(I, /obj/item/screwdriver)) if(!build_step) From 7038610affb51159cbc870ae22a1337f068b8028 Mon Sep 17 00:00:00 2001 From: Ansari Date: Thu, 10 May 2018 21:47:58 +0800 Subject: [PATCH 11/29] Log mech renaming --- code/game/mecha/mecha_topic.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/game/mecha/mecha_topic.dm b/code/game/mecha/mecha_topic.dm index 6c455c673f3..ea3b708c4dd 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(usr)] has renamed an exosuit [newname]") else alert(occupant, "nope.avi") return From 07c6ce565d021fa9e7d4742f10064109fd7a758e Mon Sep 17 00:00:00 2001 From: Ansari Date: Fri, 11 May 2018 07:41:54 +0800 Subject: [PATCH 12/29] Styling -> Use occupant instead of usr --- code/game/mecha/mecha_topic.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/mecha/mecha_topic.dm b/code/game/mecha/mecha_topic.dm index ea3b708c4dd..2ce732f83ed 100644 --- a/code/game/mecha/mecha_topic.dm +++ b/code/game/mecha/mecha_topic.dm @@ -298,7 +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(usr)] has renamed an exosuit [newname]") + log_game("[key_name(occupant)] has renamed an exosuit [newname]") else alert(occupant, "nope.avi") return From 68b4815e768af31bd41d1aa59b822f7ef89dfdc9 Mon Sep 17 00:00:00 2001 From: ParadiseSS13-Bot Date: Thu, 10 May 2018 22:30:31 -0400 Subject: [PATCH 13/29] Automatic changelog generation for PR #9003 [ci skip] --- html/changelogs/AutoChangeLog-pr-9003.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-9003.yml diff --git a/html/changelogs/AutoChangeLog-pr-9003.yml b/html/changelogs/AutoChangeLog-pr-9003.yml new file mode 100644 index 00000000000..7f5b8e6124a --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9003.yml @@ -0,0 +1,4 @@ +author: "Kyep" +delete-after: True +changes: + - bugfix: "It is no longer possible to create an infinite number of monkeys from the same monkey cube." From 6c743b9de8a4c040533e0566177f06a273454e73 Mon Sep 17 00:00:00 2001 From: ParadiseSS13-Bot Date: Fri, 11 May 2018 02:52:45 +0000 Subject: [PATCH 14/29] Automatic changelog compile, [ci skip] --- html/changelog.html | 6 ++++++ html/changelogs/.all_changelog.yml | 4 ++++ html/changelogs/AutoChangeLog-pr-9003.yml | 4 ---- 3 files changed, 10 insertions(+), 4 deletions(-) delete mode 100644 html/changelogs/AutoChangeLog-pr-9003.yml diff --git a/html/changelog.html b/html/changelog.html index a94e4a4b49b..1101724c3ac 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -56,6 +56,12 @@ -->
+

11 May 2018

+

Kyep updated:

+
    +
  • It is no longer possible to create an infinite number of monkeys from the same monkey cube.
  • +
+

09 May 2018

RyanSmake updated:

    diff --git a/html/changelogs/.all_changelog.yml b/html/changelogs/.all_changelog.yml index 0ac8c817f3a..4bedbcf58cd 100644 --- a/html/changelogs/.all_changelog.yml +++ b/html/changelogs/.all_changelog.yml @@ -6395,3 +6395,7 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py. 2018-05-09: RyanSmake: - bugfix: You can now jump on fax machines without the UI lying to you. +2018-05-11: + Kyep: + - bugfix: It is no longer possible to create an infinite number of monkeys from + the same monkey cube. diff --git a/html/changelogs/AutoChangeLog-pr-9003.yml b/html/changelogs/AutoChangeLog-pr-9003.yml deleted file mode 100644 index 7f5b8e6124a..00000000000 --- a/html/changelogs/AutoChangeLog-pr-9003.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "Kyep" -delete-after: True -changes: - - bugfix: "It is no longer possible to create an infinite number of monkeys from the same monkey cube." From f521f2765c02e1840c4703b41251cd6e12c8ef67 Mon Sep 17 00:00:00 2001 From: Fox McCloud Date: Fri, 11 May 2018 17:55:45 -0400 Subject: [PATCH 15/29] Removes All Modes --- code/datums/datacore.dm | 2 +- code/datums/mind.dm | 8 ++++---- code/game/gamemodes/gameticker.dm | 2 +- code/game/gamemodes/heist/heist.dm | 2 +- code/game/gamemodes/miniantags/abduction/abduction.dm | 4 ++-- code/game/gamemodes/miniantags/morph/morph_event.dm | 2 +- code/game/gamemodes/miniantags/revenant/revenant.dm | 2 +- .../gamemodes/miniantags/revenant/revenant_spawn_event.dm | 2 +- code/game/gamemodes/nuclear/nuclear.dm | 2 +- code/game/gamemodes/objective.dm | 2 +- code/game/gamemodes/wizard/wizard.dm | 2 +- code/game/jobs/job_objective.dm | 2 +- .../objects/items/weapons/implants/implant_traitor.dm | 2 +- code/game/response_team.dm | 2 +- code/modules/admin/verbs/gimmick_team.dm | 2 +- code/modules/admin/verbs/honksquad.dm | 2 +- code/modules/admin/verbs/infiltratorteam_syndicate.dm | 2 +- code/modules/admin/verbs/one_click_antag.dm | 2 +- code/modules/admin/verbs/randomverbs.dm | 2 +- code/modules/admin/verbs/striketeam.dm | 4 ++-- code/modules/admin/verbs/striketeam_syndicate.dm | 2 +- code/modules/events/ion_storm.dm | 2 +- .../mob/living/carbon/alien/special/alien_embryo.dm | 2 +- code/modules/mob/living/silicon/robot/robot.dm | 2 +- code/modules/mob/new_player/new_player.dm | 8 ++++---- 25 files changed, 33 insertions(+), 33 deletions(-) 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..9f5f9842089 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -526,7 +526,7 @@ 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)]." + 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) @@ -1242,7 +1242,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 +1277,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 +1483,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/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/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..92eb181cff1 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 employee is a gamemode thing, skip. continue var/tasks_completed=0 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/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..637e822e253 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. MODE people are not 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 d3c9ae98511..8eaede660e1 100644 --- a/code/modules/admin/verbs/striketeam.dm +++ b/code/modules/admin/verbs/striketeam.dm @@ -73,7 +73,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 @@ -137,7 +137,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 cc52adf40c6..ec31632208e 100644 --- a/code/modules/admin/verbs/striketeam_syndicate.dm +++ b/code/modules/admin/verbs/striketeam_syndicate.dm @@ -101,7 +101,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/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/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/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 9be14600a3a..a82e01af50b 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -1381,7 +1381,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/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") From 08bf86a169d623f228508fe2f46363da6d680672 Mon Sep 17 00:00:00 2001 From: Fox McCloud Date: Fri, 11 May 2018 20:26:25 -0400 Subject: [PATCH 16/29] Potential Powernet Fix --- code/controllers/subsystem/machinery.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 From de818d92ab116575d64a2d50e4023cce87b8c0b8 Mon Sep 17 00:00:00 2001 From: Ansari Date: Sat, 12 May 2018 10:14:14 +0800 Subject: [PATCH 17/29] user instead of usr --- .../mob/living/simple_animal/bot/construction.dm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/modules/mob/living/simple_animal/bot/construction.dm b/code/modules/mob/living/simple_animal/bot/construction.dm index 443a0f17070..fc2ca0c1f09 100644 --- a/code/modules/mob/living/simple_animal/bot/construction.dm +++ b/code/modules/mob/living/simple_animal/bot/construction.dm @@ -33,7 +33,7 @@ if(!in_range(src, usr) && loc != usr) return created_name = t - log_game("[key_name(usr)] has renamed a robot to [t]") + log_game("[key_name(user)] has renamed a robot to [t]") //Edbot Assembly @@ -57,7 +57,7 @@ if(!in_range(src, usr) && loc != usr) return created_name = t - log_game("[key_name(usr)] has renamed a robot to [t]") + log_game("[key_name(user)] has renamed a robot to [t]") return switch(build_step) @@ -259,7 +259,7 @@ return created_name = t - log_game("[key_name(usr)] has renamed a robot to [t]") + log_game("[key_name(user)] has renamed a robot to [t]") /obj/item/toolbox_tiles_sensor/attackby(obj/item/W, mob/user, params) ..() @@ -279,7 +279,7 @@ return created_name = t - log_game("[key_name(usr)] has renamed a robot to [t]") + ("[key_name(usr)] has renamed a robot to [t]") //Medbot Assembly /obj/item/firstaid_arm_assembly @@ -354,7 +354,7 @@ if(!in_range(src, usr) && loc != usr) return created_name = t - log_game("[key_name(usr)] has renamed a robot to [t]") + log_game("[key_name(user)] has renamed a robot to [t]") else switch(build_step) if(0) @@ -465,7 +465,7 @@ if(!in_range(src, usr) && loc != usr) return created_name = t - log_game("[key_name(usr)] has renamed a robot to [t]") + log_game("[key_name(user)] has renamed a robot to [t]") else if(istype(I, /obj/item/screwdriver)) if(!build_step) From 69cefb7f3c572b5522665f99c02f81b2d13bf44d Mon Sep 17 00:00:00 2001 From: Ansari Date: Sat, 12 May 2018 10:28:26 +0800 Subject: [PATCH 18/29] Actually fix usr to user and compile --- .../mob/living/simple_animal/bot/construction.dm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/code/modules/mob/living/simple_animal/bot/construction.dm b/code/modules/mob/living/simple_animal/bot/construction.dm index fc2ca0c1f09..9e96a16fb0f 100644 --- a/code/modules/mob/living/simple_animal/bot/construction.dm +++ b/code/modules/mob/living/simple_animal/bot/construction.dm @@ -30,7 +30,7 @@ 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]") @@ -54,7 +54,7 @@ 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]") @@ -255,7 +255,7 @@ 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 @@ -275,11 +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 - ("[key_name(usr)] has renamed a robot to [t]") + log_game("[key_name(user)] has renamed a robot to [t]") //Medbot Assembly /obj/item/firstaid_arm_assembly @@ -351,7 +351,7 @@ 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]") @@ -462,7 +462,7 @@ 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]") From ab780b3acfacc0b274e0f2484e8800528526920c Mon Sep 17 00:00:00 2001 From: Fox McCloud Date: Mon, 14 May 2018 06:40:48 -0400 Subject: [PATCH 19/29] Removes A Bunch of Old, Unused Files --- code/_DATASTRUCTURES/linked_lists.dm | 191 ------------------------- code/_DATASTRUCTURES/priority_queue.dm | 83 ----------- code/_globalvars/station.dm | 4 - code/datums/computerfiles.dm | 7 - code/datums/modules.dm | 63 -------- code/game/objects/effects/barsign.dm | 8 -- code/game/skincmd.dm | 13 -- code/game/smoothwall.dm | 108 -------------- paradise.dme | 5 - 9 files changed, 482 deletions(-) delete mode 100644 code/_DATASTRUCTURES/linked_lists.dm delete mode 100644 code/_DATASTRUCTURES/priority_queue.dm delete mode 100644 code/datums/computerfiles.dm delete mode 100644 code/datums/modules.dm delete mode 100644 code/game/objects/effects/barsign.dm delete mode 100644 code/game/skincmd.dm delete mode 100644 code/game/smoothwall.dm 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/_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/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/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/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/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/paradise.dme b/paradise.dme index fc55f608558..eb9b3dce400 100644 --- a/paradise.dme +++ b/paradise.dme @@ -88,8 +88,6 @@ #include "code\__HELPERS\sorts\MergeSort.dm" #include "code\__HELPERS\sorts\TimSort.dm" #include "code\_DATASTRUCTURES\heap.dm" -#include "code\_DATASTRUCTURES\linked_lists.dm" -#include "code\_DATASTRUCTURES\priority_queue.dm" #include "code\_DATASTRUCTURES\stacks.dm" #include "code\_globalvars\configuration.dm" #include "code\_globalvars\database.dm" @@ -220,7 +218,6 @@ #include "code\datums\beam.dm" #include "code\datums\browser.dm" #include "code\datums\callback.dm" -#include "code\datums\computerfiles.dm" #include "code\datums\datacore.dm" #include "code\datums\datum.dm" #include "code\datums\datumvars.dm" @@ -228,7 +225,6 @@ #include "code\datums\hud.dm" #include "code\datums\mind.dm" #include "code\datums\mixed.dm" -#include "code\datums\modules.dm" #include "code\datums\mutable_appearance.dm" #include "code\datums\periodic_news.dm" #include "code\datums\progressbar.dm" @@ -385,7 +381,6 @@ #include "code\game\data_huds.dm" #include "code\game\response_team.dm" #include "code\game\shuttle_engines.dm" -#include "code\game\skincmd.dm" #include "code\game\sound.dm" #include "code\game\world.dm" #include "code\game\area\ai_monitored.dm" From c5cbb0414af1e6146672ac475e0701f0d1c0d5d4 Mon Sep 17 00:00:00 2001 From: Fox McCloud Date: Mon, 14 May 2018 19:27:43 -0400 Subject: [PATCH 20/29] Fixes Basilisk Projectiles --- code/modules/projectiles/guns/energy/special.dm | 6 +++--- code/modules/projectiles/projectile/special.dm | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) 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("Temperature Gun Configuration
    [dat]", "window=tempgun;size=510x120") onclose(user, "tempgun") -/obj/item/gun/energy/temperature/attackby(obj/item/W as obj, mob/user as mob) - if(istype(W, /obj/item/card/emag) && !emagged) - emagged = 1 +/obj/item/gun/energy/temperature/emag_act(mob/user) + if(!emagged) + emagged = TRUE to_chat(user, "You double the gun's temperature cap! Targets hit by searing beams will burst into flames!") desc = "A gun that changes the body temperature of its targets. Its temperature cap has been hacked." diff --git a/code/modules/projectiles/projectile/special.dm b/code/modules/projectiles/projectile/special.dm index 16cedc0244d..6ac21128e56 100644 --- a/code/modules/projectiles/projectile/special.dm +++ b/code/modules/projectiles/projectile/special.dm @@ -52,7 +52,7 @@ pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE /obj/item/projectile/temp/New(loc, shot_temp) - ..(loc) + ..() if(!isnull(shot_temp)) temperature = shot_temp switch(temperature) @@ -86,7 +86,6 @@ else name = "temperature beam"//failsafe icon_state = "temp_4" - ..() /obj/item/projectile/temp/on_hit(var/atom/target, var/blocked = 0)//These two could likely check temp protection on the mob From f2bc448d022bed19a3a618058f5739cf418cdb5b Mon Sep 17 00:00:00 2001 From: Fox McCloud Date: Mon, 14 May 2018 20:09:51 -0400 Subject: [PATCH 21/29] comments --- code/datums/mind.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 9f5f9842089..87951fa56be 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. From 042ee7b77b662da8dc4af09d94157e57ee519217 Mon Sep 17 00:00:00 2001 From: Fox McCloud Date: Mon, 14 May 2018 20:40:39 -0400 Subject: [PATCH 22/29] comments --- code/datums/mind.dm | 2 +- code/game/gamemodes/intercept_report.dm | 6 +++--- code/game/jobs/job_objective.dm | 2 +- code/modules/admin/verbs/randomverbs.dm | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 87951fa56be..df8844b96e8 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -525,7 +525,7 @@ 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. + //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") 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/jobs/job_objective.dm b/code/game/jobs/job_objective.dm index 92eb181cff1..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 == employee.special_role)//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/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 637e822e253..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 != new_character.mind.special_role)//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) From fea1dada3a0cedf297019960463bce6a54579fec Mon Sep 17 00:00:00 2001 From: Tayyyyyyy Date: Mon, 14 May 2018 22:31:05 -0700 Subject: [PATCH 23/29] Restore Pun Pun --- code/modules/mob/living/carbon/human/npcs.dm | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/code/modules/mob/living/carbon/human/npcs.dm b/code/modules/mob/living/carbon/human/npcs.dm index b66a0ee52ba..45de6634d61 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() - ..() - 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 +/mob/living/carbon/human/monkey/punpun/Initialize(mapload) + ..(mapload, "Monkey") + name = "Pun Pun" + real_name = name + equip_to_slot(new /obj/item/clothing/under/punpun(src), slot_w_uniform) From ddb2305ddd64c0720a844ed0a574ee96025e4fd5 Mon Sep 17 00:00:00 2001 From: Aurorablade Date: Tue, 15 May 2018 01:40:15 -0400 Subject: [PATCH 24/29] updates to TG latest hopefully addressing alot of fox commits..now i got to update the branch... --- code/datums/antagonists/antag_datum.dm | 176 ++++++++++++++++++++--- code/datums/antagonists/antag_helpers.dm | 19 +++ code/datums/antagonists/antag_team.dm | 34 +++++ paradise.dme | 2 + 4 files changed, 212 insertions(+), 19 deletions(-) create mode 100644 code/datums/antagonists/antag_helpers.dm create mode 100644 code/datums/antagonists/antag_team.dm diff --git a/code/datums/antagonists/antag_datum.dm b/code/datums/antagonists/antag_datum.dm index 2464d5a4584..9d84349609f 100644 --- a/code/datums/antagonists/antag_datum.dm +++ b/code/datums/antagonists/antag_datum.dm @@ -1,27 +1,33 @@ -var/global/list/antagonists = list() +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/antag_role //the antag type + 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(datum/mind/new_owner) - antagonists += src +/datum/antagonist/New() + GLOB.antagonists += src typecache_datum_blacklist = typecacheof(typecache_datum_blacklist) - if(new_owner) - owner = new_owner /datum/antagonist/Destroy() - antagonists -= src + GLOB.antagonists -= src if(owner) LAZYREMOVE(owner.antag_datums, src) owner = null @@ -37,6 +43,11 @@ var/global/list/antagonists = list() 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) @@ -50,7 +61,7 @@ var/global/list/antagonists = list() return //Assign default team and creates one for one of a kind team antagonists -/datum/antagonist/proc/create_team(datum/objective_team/team) +/datum/antagonist/proc/create_team(datum/team/team) return //Proc called when the datum is given to a mind. @@ -65,27 +76,27 @@ var/global/list/antagonists = list() /datum/antagonist/proc/is_banned(mob/M) if(!M) return FALSE - . = (jobban_isbanned(M,"Syndicate") || (antag_role && jobban_isbanned(M,antag_role))) + . = (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]?", "[name]", null, antag_role, 0, 100) - var/mob/dead/observer/theghost = null - if(candidates.len) - theghost = pick(candidates) - to_chat(owner, " Your mob has been taken over by a ghost! Appeal your role ban if you want to avoid this in the future!") - message_admins("[key_name_admin(theghost)] has taken control of ([key_name_admin(owner.current)]) to replace a jobbaned player.") - log_admin("[key_name_admin(theghost)] has taken control of ([key_name_admin(owner.current)]) to replace a jobbaned player.") + var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as a [name]?", "[name]", null, job_rank, 50, owner.current) + 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 = theghost.key + owner.current.key = C.key /datum/antagonist/proc/on_removal() remove_innate_effects() + clear_antag_moodies() 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) @@ -94,9 +105,136 @@ var/global/list/antagonists = list() /datum/antagonist/proc/greet() return +/datum/antagonist/proc/farewell() + return + + //Returns the team antagonist belongs to if any. /datum/antagonist/proc/get_team() return -/datum/antagonist/proc/farewell() - return \ No newline at end of file +//Individual roundend report +/datum/antagonist/proc/roundend_report() + var/list/report = list() + + if(!owner) + CRASH("antagonist datum without owner") + + report += printplayer(owner) + + var/objectives_complete = TRUE + if(owner.objectives.len) + report += printobjectives(owner) + for(var/datum/objective/objective in owner.objectives) + if(!objective.check_completion()) + objectives_complete = FALSE + break + + if(owner.objectives.len == 0 || objectives_complete) + report += "The [name] was successful!" + else + report += "The [name] has failed!" + + return report.Join("
    ") + +//Displayed at the start of roundend_category section, default to roundend_category header +/datum/antagonist/proc/roundend_report_header() + return "The [roundend_category] were:
    " + +//Displayed at the end of roundend_category section +/datum/antagonist/proc/roundend_report_footer() + return + + +//ADMIN TOOLS + +//Called when using admin tools to give antag status +/datum/antagonist/proc/admin_add(datum/mind/new_owner,mob/admin) + message_admins("[key_name_admin(admin)] made [new_owner.current] into [name].") + log_admin("[key_name(admin)] made [new_owner.current] into [name].") + new_owner.add_antag_datum(src) + +//Called when removing antagonist using admin tools +/datum/antagonist/proc/admin_remove(mob/user) + if(!user) + return + message_admins("[key_name_admin(user)] has removed [name] antagonist status from [owner.current].") + log_admin("[key_name(user)] has removed [name] antagonist status from [owner.current].") + on_removal() + +//gamemode/proc/is_mode_antag(antagonist/A) => TRUE/FALSE + +//Additional data to display in antagonist panel section +//nuke disk code, genome count, etc +/datum/antagonist/proc/antag_panel_data() + return "" + +/datum/antagonist/proc/enabled_in_preferences(datum/mind/M) + if(job_rank) + if(M.current && M.current.client && (job_rank in M.current.client.prefs.be_special)) + return TRUE + else + return FALSE + return TRUE + +// List if["Command"] = CALLBACK(), user will be appeneded to callback arguments on execution +/datum/antagonist/proc/get_admin_commands() + . = list() + +/datum/antagonist/Topic(href,href_list) + if(!check_rights(R_ADMIN)) + return + //Antag memory edit + if(href_list["memory_edit"]) + edit_memory(usr) + owner.traitor_panel() + return + + //Some commands might delete/modify this datum clearing or changing owner + var/datum/mind/persistent_owner = owner + + var/commands = get_admin_commands() + for(var/admin_command in commands) + if(href_list["command"] == admin_command) + var/datum/callback/C = commands[admin_command] + C.Invoke(usr) + persistent_owner.traitor_panel() + return + +/datum/antagonist/proc/edit_memory(mob/user) + var/new_memo = copytext(trim(input(user,"Write new memory", "Memory", antag_memory) as null|message),1,MAX_MESSAGE_LEN) + if(isnull(new_memo)) + return + antag_memory = new_memo + +//This datum will autofill the name with special_role +//Used as placeholder for minor antagonists, please create proper datums for these +/datum/antagonist/auto_custom + show_in_antagpanel = FALSE + antagpanel_category = "Other" + show_name_in_check_antagonists = TRUE + +/datum/antagonist/auto_custom/on_gain() + ..() + name = owner.special_role + //Add all objectives not already owned by other datums to this one. + var/list/already_registered_objectives = list() + for(var/datum/antagonist/A in owner.antag_datums) + if(A == src) + continue + else + already_registered_objectives |= A.objectives + objectives = owner.objectives - already_registered_objectives + +//This one is created by admin tools for custom objectives +/datum/antagonist/custom + antagpanel_category = "Custom" + show_name_in_check_antagonists = TRUE //They're all different + +/datum/antagonist/custom/admin_add(datum/mind/new_owner,mob/admin) + var/custom_name = stripped_input(admin, "Custom antagonist name:", "Custom antag", "Antagonist") + if(custom_name) + name = custom_name + else + 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..d99920b9e21 --- /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..372ee26dfad --- /dev/null +++ b/code/datums/antagonists/antag_team.dm @@ -0,0 +1,34 @@ +//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 + +//Display members/victory/failure/objectives for the team +/datum/team/proc/roundend_report() + var/list/report = list() + + report += "[name]:" + report += "The [member_name]s were:" + report += printplayerlist(members) + + return report.Join("
    ") \ No newline at end of file diff --git a/paradise.dme b/paradise.dme index f03d37b701c..0a486bdddf9 100644 --- a/paradise.dme +++ b/paradise.dme @@ -228,6 +228,8 @@ #include "code\datums\vision_override.dm" #include "code\datums\vr.dm" #include "code\datums\antagonists\antag_datum.dm" +#include "code\datums\antagonists\antag_helpers.dm" +#include "code\datums\antagonists\antag_team.dm" #include "code\datums\cache\air_alarm.dm" #include "code\datums\cache\apc.dm" #include "code\datums\cache\cache.dm" From 5d3ce2ac22ba7616cd1dbe83fb147294f5d92c50 Mon Sep 17 00:00:00 2001 From: Aurorablade Date: Tue, 15 May 2018 02:08:54 -0400 Subject: [PATCH 25/29] compiles and removes shit we do not support yet. --- code/datums/antagonists/antag_datum.dm | 131 +------------------------ code/datums/antagonists/antag_team.dm | 10 -- code/game/gamemodes/antag_team.dm | 24 ----- paradise.dme | 1 - 4 files changed, 2 insertions(+), 164 deletions(-) delete mode 100644 code/game/gamemodes/antag_team.dm diff --git a/code/datums/antagonists/antag_datum.dm b/code/datums/antagonists/antag_datum.dm index 9d84349609f..de6572448ae 100644 --- a/code/datums/antagonists/antag_datum.dm +++ b/code/datums/antagonists/antag_datum.dm @@ -81,7 +81,7 @@ GLOBAL_LIST_EMPTY(antagonists) /datum/antagonist/proc/replace_banned_player() set waitfor = FALSE - var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as a [name]?", "[name]", null, job_rank, 50, owner.current) + var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as a [name]?", "[name] the [job_rank]", 0, 100) 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!") @@ -91,7 +91,6 @@ GLOBAL_LIST_EMPTY(antagonists) /datum/antagonist/proc/on_removal() remove_innate_effects() - clear_antag_moodies() if(owner) LAZYREMOVE(owner.antag_datums, src) if(!silent && owner.current) @@ -111,130 +110,4 @@ GLOBAL_LIST_EMPTY(antagonists) //Returns the team antagonist belongs to if any. /datum/antagonist/proc/get_team() - return - -//Individual roundend report -/datum/antagonist/proc/roundend_report() - var/list/report = list() - - if(!owner) - CRASH("antagonist datum without owner") - - report += printplayer(owner) - - var/objectives_complete = TRUE - if(owner.objectives.len) - report += printobjectives(owner) - for(var/datum/objective/objective in owner.objectives) - if(!objective.check_completion()) - objectives_complete = FALSE - break - - if(owner.objectives.len == 0 || objectives_complete) - report += "The [name] was successful!" - else - report += "The [name] has failed!" - - return report.Join("
    ") - -//Displayed at the start of roundend_category section, default to roundend_category header -/datum/antagonist/proc/roundend_report_header() - return "The [roundend_category] were:
    " - -//Displayed at the end of roundend_category section -/datum/antagonist/proc/roundend_report_footer() - return - - -//ADMIN TOOLS - -//Called when using admin tools to give antag status -/datum/antagonist/proc/admin_add(datum/mind/new_owner,mob/admin) - message_admins("[key_name_admin(admin)] made [new_owner.current] into [name].") - log_admin("[key_name(admin)] made [new_owner.current] into [name].") - new_owner.add_antag_datum(src) - -//Called when removing antagonist using admin tools -/datum/antagonist/proc/admin_remove(mob/user) - if(!user) - return - message_admins("[key_name_admin(user)] has removed [name] antagonist status from [owner.current].") - log_admin("[key_name(user)] has removed [name] antagonist status from [owner.current].") - on_removal() - -//gamemode/proc/is_mode_antag(antagonist/A) => TRUE/FALSE - -//Additional data to display in antagonist panel section -//nuke disk code, genome count, etc -/datum/antagonist/proc/antag_panel_data() - return "" - -/datum/antagonist/proc/enabled_in_preferences(datum/mind/M) - if(job_rank) - if(M.current && M.current.client && (job_rank in M.current.client.prefs.be_special)) - return TRUE - else - return FALSE - return TRUE - -// List if["Command"] = CALLBACK(), user will be appeneded to callback arguments on execution -/datum/antagonist/proc/get_admin_commands() - . = list() - -/datum/antagonist/Topic(href,href_list) - if(!check_rights(R_ADMIN)) - return - //Antag memory edit - if(href_list["memory_edit"]) - edit_memory(usr) - owner.traitor_panel() - return - - //Some commands might delete/modify this datum clearing or changing owner - var/datum/mind/persistent_owner = owner - - var/commands = get_admin_commands() - for(var/admin_command in commands) - if(href_list["command"] == admin_command) - var/datum/callback/C = commands[admin_command] - C.Invoke(usr) - persistent_owner.traitor_panel() - return - -/datum/antagonist/proc/edit_memory(mob/user) - var/new_memo = copytext(trim(input(user,"Write new memory", "Memory", antag_memory) as null|message),1,MAX_MESSAGE_LEN) - if(isnull(new_memo)) - return - antag_memory = new_memo - -//This datum will autofill the name with special_role -//Used as placeholder for minor antagonists, please create proper datums for these -/datum/antagonist/auto_custom - show_in_antagpanel = FALSE - antagpanel_category = "Other" - show_name_in_check_antagonists = TRUE - -/datum/antagonist/auto_custom/on_gain() - ..() - name = owner.special_role - //Add all objectives not already owned by other datums to this one. - var/list/already_registered_objectives = list() - for(var/datum/antagonist/A in owner.antag_datums) - if(A == src) - continue - else - already_registered_objectives |= A.objectives - objectives = owner.objectives - already_registered_objectives - -//This one is created by admin tools for custom objectives -/datum/antagonist/custom - antagpanel_category = "Custom" - show_name_in_check_antagonists = TRUE //They're all different - -/datum/antagonist/custom/admin_add(datum/mind/new_owner,mob/admin) - var/custom_name = stripped_input(admin, "Custom antagonist name:", "Custom antag", "Antagonist") - if(custom_name) - name = custom_name - else - return - ..() \ No newline at end of file + return \ No newline at end of file diff --git a/code/datums/antagonists/antag_team.dm b/code/datums/antagonists/antag_team.dm index 372ee26dfad..9dcec5894ee 100644 --- a/code/datums/antagonists/antag_team.dm +++ b/code/datums/antagonists/antag_team.dm @@ -22,13 +22,3 @@ /datum/team/proc/remove_member(datum/mind/member) members -= member - -//Display members/victory/failure/objectives for the team -/datum/team/proc/roundend_report() - var/list/report = list() - - report += "[name]:" - report += "The [member_name]s were:" - report += printplayerlist(members) - - return report.Join("
    ") \ No newline at end of file diff --git a/code/game/gamemodes/antag_team.dm b/code/game/gamemodes/antag_team.dm deleted file mode 100644 index 12058bcfb12..00000000000 --- a/code/game/gamemodes/antag_team.dm +++ /dev/null @@ -1,24 +0,0 @@ -//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 \ No newline at end of file diff --git a/paradise.dme b/paradise.dme index a952980fd29..303c0ebaed9 100644 --- a/paradise.dme +++ b/paradise.dme @@ -405,7 +405,6 @@ #include "code\game\dna\genes\vg_powers.dm" #include "code\game\gamemodes\antag_hud.dm" #include "code\game\gamemodes\antag_spawner.dm" -#include "code\game\gamemodes\antag_team.dm" #include "code\game\gamemodes\factions.dm" #include "code\game\gamemodes\game_mode.dm" #include "code\game\gamemodes\gameticker.dm" From 8a8f244d3fd1366382de17731ca9ed233eebce21 Mon Sep 17 00:00:00 2001 From: Tayyyyyyy Date: Tue, 15 May 2018 01:15:27 -0700 Subject: [PATCH 26/29] Remove unneeded args --- code/modules/mob/living/carbon/human/npcs.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/npcs.dm b/code/modules/mob/living/carbon/human/npcs.dm index 45de6634d61..c21c1990cbe 100644 --- a/code/modules/mob/living/carbon/human/npcs.dm +++ b/code/modules/mob/living/carbon/human/npcs.dm @@ -6,7 +6,7 @@ species_restricted = list("Monkey") /mob/living/carbon/human/monkey/punpun/Initialize(mapload) - ..(mapload, "Monkey") + ..() name = "Pun Pun" real_name = name equip_to_slot(new /obj/item/clothing/under/punpun(src), slot_w_uniform) From c205f2662d1789c868770d474bc9a77ec5ca2b05 Mon Sep 17 00:00:00 2001 From: Aurorablade Date: Tue, 15 May 2018 16:51:01 -0400 Subject: [PATCH 27/29] Comments --- code/datums/antagonists/antag_datum.dm | 4 ++-- code/datums/antagonists/antag_helpers.dm | 6 +++--- code/datums/mind.dm | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/code/datums/antagonists/antag_datum.dm b/code/datums/antagonists/antag_datum.dm index de6572448ae..51ca4e5d39c 100644 --- a/code/datums/antagonists/antag_datum.dm +++ b/code/datums/antagonists/antag_datum.dm @@ -76,12 +76,12 @@ GLOBAL_LIST_EMPTY(antagonists) /datum/antagonist/proc/is_banned(mob/M) if(!M) return FALSE - . = (jobban_isbanned(M, ROLE_SYNDICATE) || (job_rank && jobban_isbanned(M,job_rank))) + . = (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]?", "[name] the [job_rank]", 0, 100) + 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!") diff --git a/code/datums/antagonists/antag_helpers.dm b/code/datums/antagonists/antag_helpers.dm index d99920b9e21..134ba1d7d90 100644 --- a/code/datums/antagonists/antag_helpers.dm +++ b/code/datums/antagonists/antag_helpers.dm @@ -1,10 +1,10 @@ //Returns MINDS of the assigned antags of given type/subtypes -/proc/get_antag_minds(antag_type,specific = FALSE) +/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) + if(!antag_type || !specific && istype(A, antag_type) || specific && A.type == antag_type) . += A.owner //Get all teams [of type team_type] @@ -15,5 +15,5 @@ if(!A.owner) continue var/datum/team/T = A.get_team() - if(!team_type || istype(T,team_type)) + if(!team_type || istype(T, team_type)) . |= T \ No newline at end of file diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 2f4fff38f3b..8bc1034206e 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -1246,6 +1246,7 @@ 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) From 1efdb0004a8a751ee734b84bd27b9e9580112ef5 Mon Sep 17 00:00:00 2001 From: ParadiseSS13-Bot Date: Tue, 15 May 2018 17:59:58 -0400 Subject: [PATCH 28/29] Automatic changelog generation for PR #9017 [ci skip] --- html/changelogs/AutoChangeLog-pr-9017.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-9017.yml diff --git a/html/changelogs/AutoChangeLog-pr-9017.yml b/html/changelogs/AutoChangeLog-pr-9017.yml new file mode 100644 index 00000000000..39638cb4663 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9017.yml @@ -0,0 +1,4 @@ +author: "Tayyyyyyy" +delete-after: True +changes: + - bugfix: "Pun pun is back!" From 541f2ef15e5128f7821e1dca3a146cfe2e3ebd4b Mon Sep 17 00:00:00 2001 From: ParadiseSS13-Bot Date: Tue, 15 May 2018 23:14:32 +0000 Subject: [PATCH 29/29] Automatic changelog compile, [ci skip] --- html/changelog.html | 6 ++++++ html/changelogs/.all_changelog.yml | 3 +++ html/changelogs/AutoChangeLog-pr-9017.yml | 4 ---- 3 files changed, 9 insertions(+), 4 deletions(-) delete mode 100644 html/changelogs/AutoChangeLog-pr-9017.yml diff --git a/html/changelog.html b/html/changelog.html index 1101724c3ac..663a4b11154 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -56,6 +56,12 @@ -->
    +

    15 May 2018

    +

    Tayyyyyyy updated:

    +
      +
    • Pun pun is back!
    • +
    +

    11 May 2018

    Kyep updated:

      diff --git a/html/changelogs/.all_changelog.yml b/html/changelogs/.all_changelog.yml index 4bedbcf58cd..77de385b0cc 100644 --- a/html/changelogs/.all_changelog.yml +++ b/html/changelogs/.all_changelog.yml @@ -6399,3 +6399,6 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py. Kyep: - bugfix: It is no longer possible to create an infinite number of monkeys from the same monkey cube. +2018-05-15: + Tayyyyyyy: + - bugfix: Pun pun is back! diff --git a/html/changelogs/AutoChangeLog-pr-9017.yml b/html/changelogs/AutoChangeLog-pr-9017.yml deleted file mode 100644 index 39638cb4663..00000000000 --- a/html/changelogs/AutoChangeLog-pr-9017.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "Tayyyyyyy" -delete-after: True -changes: - - bugfix: "Pun pun is back!"