diff --git a/code/__DEFINES/role_preferences.dm b/code/__DEFINES/role_preferences.dm index c2c253872ca81..65efc147f1823 100644 --- a/code/__DEFINES/role_preferences.dm +++ b/code/__DEFINES/role_preferences.dm @@ -67,7 +67,6 @@ GLOBAL_LIST_INIT(special_roles, list( ROLE_DEVIL = /datum/game_mode/devil, ROLE_INTERNAL_AFFAIRS = /datum/game_mode/traitor/internal_affairs, ROLE_SENTIENCE, - ROLE_FAMILIES = /datum/game_mode/gang, ROLE_BORER )) //WS Edit - Borers diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 438bbdfda28f6..1a3c6526150a6 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -464,7 +464,6 @@ block( \ //First we spawn a dude. var/mob/living/carbon/human/new_character = new//The mob being spawned. - SSjob.SendToLateJoin(new_character) G_found.client.prefs.copy_to(new_character) new_character.dna.update_dna_identity() diff --git a/code/_onclick/hud/families.dm b/code/_onclick/hud/families.dm deleted file mode 100644 index eb4bc2239c6a7..0000000000000 --- a/code/_onclick/hud/families.dm +++ /dev/null @@ -1,28 +0,0 @@ -/atom/movable/screen/wanted - name = "Space Police Alertness" - desc = "Shows the current level of hostility the space police is planning to rain down on you. Better be careful." - icon = 'icons/obj/gang/wanted_160x32.dmi' - icon_state = "wanted_0" - screen_loc = ui_wanted_lvl - ///Wanted level, affects the hud icon. - var/level - ///Boolean, have the cops arrived? If so, the icon stops changing and remains the same. - var/cops_arrived - -/atom/movable/screen/wanted/Initialize() - . = ..() - var/datum/game_mode/gang/F = SSticker.mode - level = F.wanted_level - cops_arrived = F.cops_arrived - update_icon() - -/atom/movable/screen/wanted/MouseEntered(location,control,params) - . = ..() - openToolTip(usr,src,params,title = name,content = desc, theme = "alerttooltipstyle") - -/atom/movable/screen/wanted/MouseExited() - closeToolTip(usr) - -/atom/movable/screen/wanted/update_icon_state() - . = ..() - icon_state = "wanted_[level][cops_arrived ? "_active" : ""]" diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index abd07ffc0ae09..a21659eb8d706 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -62,10 +62,6 @@ GLOBAL_LIST_INIT(available_ui_styles, list( var/atom/movable/screen/healths var/atom/movable/screen/healthdoll var/atom/movable/screen/internals - var/atom/movable/screen/wanted/wanted_lvl - /*WS begin - var/atom/movable/screen/spacesuit - WS End - Fuckin' spacesuits. */ // subtypes can override this to force a specific UI style var/ui_style @@ -113,7 +109,6 @@ GLOBAL_LIST_INIT(available_ui_styles, list( healths = null healthdoll = null - wanted_lvl = null internals = null lingchemdisplay = null devilsouldisplay = null diff --git a/code/controllers/subsystem/job.dm b/code/controllers/subsystem/job.dm index d39cc5daedced..03cf06e7776b4 100644 --- a/code/controllers/subsystem/job.dm +++ b/code/controllers/subsystem/job.dm @@ -29,7 +29,6 @@ SUBSYSTEM_DEF(job) return 1 - /datum/controller/subsystem/job/proc/GetJob(rank) if(!occupations.len) SetupOccupations() @@ -42,20 +41,9 @@ SUBSYSTEM_DEF(job) SetupOccupations() return type_occupations[jobtype] -/datum/controller/subsystem/job/proc/ResetOccupations() - JobDebug("Occupations reset.") - for(var/i in GLOB.new_player_list) - var/mob/dead/new_player/player = i - if((player) && (player.mind)) - player.mind.assigned_role = null - player.mind.special_role = null - SetupOccupations() - return - /datum/controller/subsystem/job/Recover() set waitfor = FALSE var/oldjobs = SSjob.occupations - sleep(20) /atom/proc/join_player_here(mob/M) // By default, just place the mob on the same turf as the marker or whatever. @@ -67,65 +55,6 @@ SUBSYSTEM_DEF(job) return ..() -/datum/controller/subsystem/job/proc/SendToLateJoin(mob/M, buckle = TRUE, atom/destination) - if(destination) - destination.join_player_here(M, buckle) - return TRUE - - if(M.mind && M.mind.assigned_role && length(GLOB.jobspawn_overrides[M.mind.assigned_role])) //We're doing something special today. - destination = pick(GLOB.jobspawn_overrides[M.mind.assigned_role]) - destination.join_player_here(M, FALSE) - return TRUE - - var/msg = "Unable to send mob [M] to late join!" - message_admins(msg) - CRASH(msg) - - -/////////////////////////////////// -//Keeps track of all living heads// -/////////////////////////////////// -/datum/controller/subsystem/job/proc/get_living_heads() - . = list() - for(var/i in GLOB.human_list) - var/mob/living/carbon/human/player = i - if(player.stat != DEAD && player.mind && (player.mind.assigned_role in GLOB.command_positions)) - . |= player.mind - - -//////////////////////////// -//Keeps track of all heads// -//////////////////////////// -/datum/controller/subsystem/job/proc/get_all_heads() - . = list() - for(var/i in GLOB.mob_list) - var/mob/player = i - if(player.mind && (player.mind.assigned_role in GLOB.command_positions)) - . |= player.mind - -////////////////////////////////////////////// -//Keeps track of all living security members// -////////////////////////////////////////////// -/datum/controller/subsystem/job/proc/get_living_sec() - . = list() - for(var/i in GLOB.human_list) - var/mob/living/carbon/human/player = i - if(player.stat != DEAD && player.mind && (player.mind.assigned_role in GLOB.security_positions)) - . |= player.mind - -//////////////////////////////////////// -//Keeps track of all security members// -//////////////////////////////////////// -/datum/controller/subsystem/job/proc/get_all_sec() - . = list() - for(var/i in GLOB.human_list) - var/mob/living/carbon/human/player = i - if(player.mind && (player.mind.assigned_role in GLOB.security_positions)) - . |= player.mind - -/datum/controller/subsystem/job/proc/JobDebug(message) - log_job_debug(message) - /datum/controller/subsystem/job/proc/get_manifest() var/list/manifest_out = list() for(var/datum/overmap/ship/controlled/ship as anything in SSovermap.controlled_ships) diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index 5fd2805507b7e..44bfbda51d1a7 100644 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -240,7 +240,6 @@ SUBSYSTEM_DEF(ticker) to_chat(world, "Unable to start [mode.name]. Not enough players, [mode.required_players] players and [mode.required_enemies] eligible antagonists needed. Reverting to pre-game lobby.") qdel(mode) mode = null - SSjob.ResetOccupations() return 0 CHECK_TICK @@ -254,7 +253,6 @@ SUBSYSTEM_DEF(ticker) log_game("[mode.name] failed pre_setup, cause: [mode.setup_error]") QDEL_NULL(mode) to_chat(world, "Error setting up [GLOB.master_mode]. Reverting to pre-game lobby.") - SSjob.ResetOccupations() return 0 else message_admins("DEBUG: Bypassing prestart checks...") diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 97eb2762c8d03..50568ef828637 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -87,8 +87,8 @@ /// A lazy list of statuses to add next to this mind in the traitor panel var/list/special_statuses - ///WS edit - Crew objectives variable, stores crew objective datums - var/list/crew_objectives + /// A weakref to the /datum/overmap/ship/controlled the original mob spawned on + var/datum/weakref/original_ship /datum/mind/New(_key) SSticker.minds += src diff --git a/code/game/gamemodes/gang/gang.dm b/code/game/gamemodes/gang/gang.dm deleted file mode 100644 index 04cb6ecb9c7a1..0000000000000 --- a/code/game/gamemodes/gang/gang.dm +++ /dev/null @@ -1,498 +0,0 @@ -#define LOWPOP_FAMILIES_COUNT 50 - -#define TWO_STARS_HIGHPOP 11 -#define THREE_STARS_HIGHPOP 16 -#define FOUR_STARS_HIGHPOP 21 -#define FIVE_STARS_HIGHPOP 31 - -#define TWO_STARS_LOW 6 -#define THREE_STARS_LOW 9 -#define FOUR_STARS_LOW 12 -#define FIVE_STARS_LOW 15 - -#define CREW_SIZE_MIN 4 -#define CREW_SIZE_MAX 8 - - -GLOBAL_VAR_INIT(deaths_during_shift, 0) -/datum/game_mode/gang - name = "Families" - config_tag = "families" - antag_flag = ROLE_FAMILIES - false_report_weight = 5 - required_players = 40 - required_enemies = 6 - recommended_enemies = 6 - announce_span = "danger" - announce_text = "Grove For Lyfe!" - reroll_friendly = FALSE - restricted_jobs = list("Cyborg", "AI", "Prisoner","Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel")//N O - protected_jobs = list() - var/check_counter = 0 - var/endtime = null - var/start_time = null - var/fuckingdone = FALSE - var/time_to_end = 60 MINUTES - var/gangs_to_generate = 3 - var/list/gangs_to_use - var/list/datum/mind/gangbangers = list() - var/list/datum/mind/pigs = list() - var/list/datum/mind/undercover_cops = list() - var/list/gangs = list() - var/gangs_still_alive = 0 - var/sent_announcement = FALSE - var/list/gang_locations = list() - var/cops_arrived = FALSE - var/gang_balance_cap = 5 - var/wanted_level = 0 - -/datum/game_mode/gang/warriors - name = "Warriors" - config_tag = "warriors" - announce_text = "Can you survive this onslaught?" - gangs_to_generate = 11 - gang_balance_cap = 3 - -/datum/game_mode/gang/warriors/pre_setup() - gangs_to_use = subtypesof(/datum/antagonist/gang) - gangs_to_generate = gangs_to_use.len - . = ..() - -/datum/game_mode/gang/pre_setup() - gangs_to_use = subtypesof(/datum/antagonist/gang) - for(var/j = 0, j < gangs_to_generate, j++) - if (!antag_candidates.len) - break - var/datum/mind/gangbanger = antag_pick(antag_candidates) - gangbangers += gangbanger - gangbanger.restricted_roles = restricted_jobs - log_game("[key_name(gangbanger)] has been selected as a starting gangster!") - antag_candidates.Remove(gangbanger) - for(var/j = 0, j < gangs_to_generate, j++) - if(!antag_candidates.len) - break - var/datum/mind/one_eight_seven_on_an_undercover_cop = antag_pick(antag_candidates) - pigs += one_eight_seven_on_an_undercover_cop - undercover_cops += one_eight_seven_on_an_undercover_cop - one_eight_seven_on_an_undercover_cop.restricted_roles = restricted_jobs - log_game("[key_name(one_eight_seven_on_an_undercover_cop)] has been selected as a starting undercover cop!") - antag_candidates.Remove(one_eight_seven_on_an_undercover_cop) - endtime = world.time + time_to_end - start_time = world.time - return TRUE - -/datum/game_mode/gang/post_setup() - var/replacement_gangsters = 0 - var/replacement_cops = 0 - for(var/datum/mind/gangbanger in gangbangers) - if(!ishuman(gangbanger.current)) - gangbangers.Remove(gangbanger) - log_game("[gangbanger] was not a human, and thus has lost their gangster role.") - replacement_gangsters++ - if(replacement_gangsters) - for(var/j = 0, j < replacement_gangsters, j++) - if(!antag_candidates.len) - log_game("Unable to find more replacement gangsters. Not all of the gangs will spawn.") - break - var/datum/mind/gangbanger = antag_pick(antag_candidates) - gangbangers += gangbanger - log_game("[key_name(gangbanger)] has been selected as a replacement gangster!") - for(var/datum/mind/undercover_cop in undercover_cops) - if(!ishuman(undercover_cop.current)) - undercover_cops.Remove(undercover_cop) - pigs.Remove(undercover_cop) - log_game("[undercover_cop] was not a human, and thus has lost their undercover cop role.") - replacement_cops++ - if(replacement_cops) - for(var/j = 0, j < replacement_cops, j++) - if(!antag_candidates.len) - log_game("Unable to find more replacement undercover cops. Not all of the gangs will spawn.") - break - var/datum/mind/undercover_cop = antag_pick(antag_candidates) - undercover_cops += undercover_cop - pigs += undercover_cop - log_game("[key_name(undercover_cop)] has been selected as a replacement undercover cop!") - for(var/datum/mind/undercover_cop in undercover_cops) - var/datum/antagonist/ert/families/undercover_cop/one_eight_seven_on_an_undercover_cop = new() - undercover_cop.add_antag_datum(one_eight_seven_on_an_undercover_cop) - - for(var/datum/mind/gangbanger in gangbangers) - var/gang_to_use = pick_n_take(gangs_to_use) - var/datum/antagonist/gang/new_gangster = new gang_to_use() - var/datum/team/gang/ballas = new /datum/team/gang() - new_gangster.my_gang = ballas - new_gangster.starter_gangster = TRUE - gangs += ballas - ballas.add_member(gangbanger) - ballas.name = new_gangster.gang_name - - ballas.acceptable_clothes = new_gangster.acceptable_clothes.Copy() - ballas.free_clothes = new_gangster.free_clothes.Copy() - ballas.my_gang_datum = new_gangster - - for(var/C in ballas.free_clothes) - var/obj/O = new C(gangbanger.current) - var/list/slots = list ( - "backpack" = ITEM_SLOT_BACKPACK, - "left pocket" = ITEM_SLOT_LPOCKET, - "right pocket" = ITEM_SLOT_RPOCKET - ) - var/mob/living/carbon/human/H = gangbanger.current - var/equipped = H.equip_in_one_of_slots(O, slots) - if(!equipped) - to_chat(gangbanger.current, "Unfortunately, you could not bring your [O] to this shift. You will need to find one.") - qdel(O) - - gangbanger.add_antag_datum(new_gangster) - gangbanger.current.playsound_local(gangbanger.current, 'sound/ambience/antag/thatshowfamiliesworks.ogg', 100, FALSE, pressure_affected = FALSE) - to_chat(gangbanger.current, "As you're the first gangster, your uniform and spraycan are in your inventory!") - addtimer(CALLBACK(src, .proc/announce_gang_locations), 5 MINUTES) - addtimer(CALLBACK(src, .proc/five_minute_warning), time_to_end - 5 MINUTES) - gamemode_ready = TRUE - ..() - -/datum/game_mode/gang/proc/announce_gang_locations() - var/list/readable_gang_names = list() - for(var/GG in gangs) - var/datum/team/gang/G = GG - readable_gang_names += "[G.name]" - var/finalized_gang_names = english_list(readable_gang_names) - priority_announce("Julio G coming to you live from Radio Los Spess! We've been hearing reports of gang activity on [station_name()], with the [finalized_gang_names] duking it out, looking for fresh territory and drugs to sling! Stay safe out there for the hour 'till the space cops get there, and keep it cool, yeah?\n\n The local jump gates are shut down for about an hour due to some maintenance troubles, so if you wanna split from the area you're gonna have to wait an hour. \n Play music, not gunshots, I say. Peace out!", "Radio Los Spess", 'sound/voice/beepsky/radio.ogg') - sent_announcement = TRUE - -/datum/game_mode/gang/proc/five_minute_warning() - priority_announce("Julio G coming to you live from Radio Los Spess! The space cops are closing in on [station_name()] and will arrive in about 5 minutes! Better clear on out of there if you don't want to get hurt!", "Radio Los Spess", 'sound/voice/beepsky/radio.ogg') - -/datum/game_mode/gang/check_win() - var/alive_gangsters = 0 - var/alive_cops = 0 - for(var/datum/mind/gangbanger in gangbangers) - if(!ishuman(gangbanger.current)) - continue - var/mob/living/carbon/human/H = gangbanger.current - if(H.stat) - continue - alive_gangsters++ - for(var/datum/mind/bacon in pigs) - if(!ishuman(bacon.current)) // always returns false - continue - var/mob/living/carbon/human/H = bacon.current - if(H.stat) - continue - alive_cops++ - if(alive_gangsters > alive_cops) - SSticker.mode_result = "win - gangs survived" - SSticker.news_report = GANG_OPERATING - return TRUE - SSticker.mode_result = "loss - police destroyed the gangs" - SSticker.news_report = GANG_DESTROYED - return FALSE - -/datum/game_mode/gang/process() - check_wanted_level() - check_counter++ - if(check_counter >= 5) - if (world.time > endtime && !fuckingdone) - fuckingdone = TRUE - send_in_the_fuzz() - check_counter = 0 - SSticker.mode.check_win() - - check_tagged_turfs() - check_gang_clothes() - check_rollin_with_crews() - -///Checks if our wanted level has changed. Only actually does something post the initial announcement and until the cops are here. After that its locked. -/datum/game_mode/gang/proc/check_wanted_level() - if(!sent_announcement || cops_arrived) - return - var/new_wanted_level - if(GLOB.joined_player_list.len > LOWPOP_FAMILIES_COUNT) - switch(GLOB.deaths_during_shift) - if(0 to TWO_STARS_HIGHPOP-1) - new_wanted_level = 1 - if(TWO_STARS_HIGHPOP to THREE_STARS_HIGHPOP-1) - new_wanted_level = 2 - if(THREE_STARS_HIGHPOP to FOUR_STARS_HIGHPOP-1) - new_wanted_level = 3 - if(FOUR_STARS_HIGHPOP to FIVE_STARS_HIGHPOP-1) - new_wanted_level = 4 - if(FIVE_STARS_HIGHPOP to INFINITY) - new_wanted_level = 5 - else - switch(GLOB.deaths_during_shift) - if(0 to TWO_STARS_LOW-1) - new_wanted_level = 1 - if(TWO_STARS_LOW to THREE_STARS_LOW-1) - new_wanted_level = 2 - if(THREE_STARS_LOW to FOUR_STARS_LOW-1) - new_wanted_level = 3 - if(FOUR_STARS_LOW to FIVE_STARS_LOW-1) - new_wanted_level = 4 - if(FIVE_STARS_LOW to INFINITY) - new_wanted_level = 5 - update_wanted_level(new_wanted_level) - -///Updates the icon states for everyone and sends outs announcements regarding the police. -/datum/game_mode/gang/proc/update_wanted_level(newlevel) - if(newlevel > wanted_level) - on_gain_wanted_level(newlevel) - else if (newlevel < wanted_level) - on_lower_wanted_level(newlevel) - wanted_level = newlevel - for(var/i in GLOB.player_list) - var/mob/M = i - if(!M.hud_used?.wanted_lvl) - continue - var/datum/hud/H = M.hud_used - H.wanted_lvl.level = newlevel - H.wanted_lvl.cops_arrived = cops_arrived - H.wanted_lvl.update_icon() - -/datum/game_mode/gang/proc/on_gain_wanted_level(newlevel) - var/announcement_message - switch(newlevel) - if(2) - announcement_message = "Small amount of police vehicles have been spotted en route towards [station_name()]. They will arrive at the 50 minute mark." - endtime = start_time + 50 MINUTES - if(3) - announcement_message = "A large detachment police vehicles have been spotted en route towards [station_name()]. They will arrive at the 40 minute mark." - endtime = start_time + 40 MINUTES - if(4) - announcement_message = "A detachment of top-trained agents has been spotted on their way to [station_name()]. They will arrive at the 35 minute mark." - endtime = start_time + 35 MINUTES - if(5) - announcement_message = "The fleet enroute to [station_name()] now consists of national guard personnel. They will arrive at the 30 minute mark." - endtime = start_time + 30 MINUTES - priority_announce(announcement_message, "Station Spaceship Detection Systems") - -/datum/game_mode/gang/proc/on_lower_wanted_level(newlevel) - var/announcement_message - switch(newlevel) - if(1) - announcement_message = "There are now only a few police vehicle headed towards [station_name()]. They will arrive at the 60 minute mark." - endtime = start_time + 60 MINUTES - if(2) - announcement_message = "There seem to be fewer police vehicles headed towards [station_name()]. They will arrive at the 50 minute mark." - endtime = start_time + 50 MINUTES - if(3) - announcement_message = "There are no longer top-trained agents in the fleet headed towards [station_name()]. They will arrive at the 40 minute mark." - endtime = start_time + 40 MINUTES - if(4) - announcement_message = "The convoy enroute to [station_name()] seems to no longer consist of national guard personnel. They will arrive at the 35 minute mark." - endtime = start_time + 35 MINUTES - priority_announce(announcement_message, "Station Spaceship Detection Systems") - -/datum/game_mode/gang/proc/send_in_the_fuzz() - var/team_size - var/cops_to_send - var/announcement_message = "PUNK ASS BALLA BITCH" - var/announcer = "Spinward Stellar Coalition" - if(GLOB.joined_player_list.len > LOWPOP_FAMILIES_COUNT) - switch(wanted_level) - if(1) - team_size = 8 - cops_to_send = /datum/antagonist/ert/families/beatcop - announcement_message = "Hello, crewmembers of [station_name()]! We've received a few calls about some potential violent gang activity on board your station, so we're sending some beat cops to check things out. Nothing extreme, just a courtesy call. However, while they check things out for about 10 minutes, we're going to have to ask that you keep your escape shuttle parked.\n\nHave a pleasant day!" - announcer = "Spinward Stellar Coalition Police Department" - if(2) - team_size = 9 - cops_to_send = /datum/antagonist/ert/families/beatcop/armored - announcement_message = "Crewmembers of [station_name()]. We have received confirmed reports of violent gang activity from your station. We are dispatching some armed officers to help keep the peace and investigate matters. Do not get in their way, and comply with any and all requests from them. We have blockaded the local warp gate, and your shuttle cannot depart for another 10 minutes.\n\nHave a secure day." - announcer = "Spinward Stellar Coalition Police Department" - if(3) - team_size = 10 - cops_to_send = /datum/antagonist/ert/families/beatcop/swat - announcement_message = "Crewmembers of [station_name()]. We have received confirmed reports of extreme gang activity from your station resulting in heavy civilian casualties. The Spinward Stellar Coalition does not tolerate abuse towards our citizens, and we will be responding in force to keep the peace and reduce civilian casualties. We have your station surrounded, and all gangsters must drop their weapons and surrender peacefully.\n\nHave a secure day." - announcer = "Spinward Stellar Coalition Police Department" - if(4) - team_size = 11 - cops_to_send = /datum/antagonist/ert/families/beatcop/fbi - announcement_message = "We are dispatching our top agents to [station_name()] at the request of the Spinward Stellar Coalition government due to an extreme terrorist level threat against this Nanotrasen owned station. All gangsters must surrender IMMEDIATELY. Failure to comply can and will result in death. We have blockaded your warp gates and will not allow any escape until the situation is resolved within our standard response time of 10 minutes.\n\nSurrender now or face the consequences of your actions." - announcer = "Federal Bureau of Investigation" - if(5) - team_size = 12 - cops_to_send = /datum/antagonist/ert/families/beatcop/military - announcement_message = "Due to an insane level of civilian casualties aboard [station_name()], we have dispatched the National Guard to curb any and all gang activity on board the station. We have heavy cruisers watching the shuttle. Attempt to leave before we allow you to, and we will obliterate your station and your escape shuttle.\n\nYou brought this on yourselves by murdering so many civilians." - announcer = "Spinward Stellar Coalition National Guard" - else - switch(wanted_level) - if(1) - team_size = 5 - cops_to_send = /datum/antagonist/ert/families/beatcop - announcement_message = "Hello, crewmembers of [station_name()]! We've received a few calls about some potential violent gang activity on board your station, so we're sending some beat cops to check things out. Nothing extreme, just a courtesy call. However, while they check things out for about 10 minutes, we're going to have to ask that you keep your escape shuttle parked.\n\nHave a pleasant day!" - announcer = "Spinward Stellar Coalition Police Department" - if(2) - team_size = 6 - cops_to_send = /datum/antagonist/ert/families/beatcop/armored - announcement_message = "Crewmembers of [station_name()]. We have received confirmed reports of violent gang activity from your station. We are dispatching some armed officers to help keep the peace and investigate matters. Do not get in their way, and comply with any and all requests from them. We have blockaded the local warp gate, and your shuttle cannot depart for another 10 minutes.\n\nHave a secure day." - announcer = "Spinward Stellar Coalition Police Department" - if(3) - team_size = 7 - cops_to_send = /datum/antagonist/ert/families/beatcop/swat - announcement_message = "Crewmembers of [station_name()]. We have received confirmed reports of extreme gang activity from your station resulting in heavy civilian casualties. The Spinward Stellar Coalition does not tolerate abuse towards our citizens, and we will be responding in force to keep the peace and reduce civilian casualties. We have your station surrounded, and all gangsters must drop their weapons and surrender peacefully.\n\nHave a secure day." - announcer = "Spinward Stellar Coalition Police Department" - if(4) - team_size = 8 - cops_to_send = /datum/antagonist/ert/families/beatcop/fbi - announcement_message = "We are dispatching our top agents to [station_name()] at the request of the Spinward Stellar Coalition government due to an extreme terrorist level threat against this Nanotrasen owned station. All gangsters must surrender IMMEDIATELY. Failure to comply can and will result in death. We have blockaded your warp gates and will not allow any escape until the situation is resolved within our standard response time of 10 minutes.\n\nSurrender now or face the consequences of your actions." - announcer = "Federal Bureau of Investigation" - if(5) - team_size = 10 - cops_to_send = /datum/antagonist/ert/families/beatcop/military - announcement_message = "Due to an insane level of civilian casualties aboard [station_name()], we have dispatched the National Guard to curb any and all gang activity on board the station. We have heavy cruisers watching the shuttle. Attempt to leave before we allow you to, and we will obliterate your station and your escape shuttle.\n\nYou brought this on yourselves by murdering so many civilians." - announcer = "Spinward Stellar Coalition National Guard" - - priority_announce(announcement_message, announcer, 'sound/effects/families_police.ogg') - var/list/mob/dead/observer/candidates = pollGhostCandidates("Do you want to help clean up crime on this station?", "deathsquad", null) - - - if(candidates.len) - //Pick the (un)lucky players - var/numagents = min(team_size,candidates.len) - - var/list/spawnpoints = GLOB.emergencyresponseteamspawn - var/index = 0 - while(numagents && candidates.len) - var/spawnloc = spawnpoints[index+1] - //loop through spawnpoints one at a time - index = (index + 1) % spawnpoints.len - var/mob/dead/observer/chosen_candidate = pick(candidates) - candidates -= chosen_candidate - if(!chosen_candidate.key) - continue - - //Spawn the body - var/mob/living/carbon/human/cop = new(spawnloc) - chosen_candidate.client.prefs.copy_to(cop) - cop.key = chosen_candidate.key - - //Give antag datum - var/datum/antagonist/ert/ert_antag = new cops_to_send - - cop.mind.add_antag_datum(ert_antag) - cop.mind.assigned_role = ert_antag.name - SSjob.SendToLateJoin(cop) - - //Logging and cleanup - log_game("[key_name(cop)] has been selected as an [ert_antag.name]") - numagents-- - cops_arrived = TRUE - update_wanted_level() //Will make sure our icon updates properly - return TRUE - -/datum/game_mode/gang/proc/check_tagged_turfs() - for(var/T in GLOB.gang_tags) - var/obj/effect/decal/cleanable/crayon/gang/tag = T - if(tag.my_gang) - tag.my_gang.adjust_points(50) - CHECK_TICK - -/datum/game_mode/gang/proc/check_gang_clothes() // TODO: make this grab the sprite itself, average out what the primary color would be, then compare how close it is to the gang color so I don't have to manually fill shit out for 5 years for every gang type - for(var/mob/living/carbon/human/H in GLOB.player_list) - if(!H.mind || !H.client) - continue - var/datum/antagonist/gang/is_gangster = H.mind.has_antag_datum(/datum/antagonist/gang) - for(var/clothing in list(H.head, H.wear_mask, H.wear_suit, H.w_uniform, H.back, H.gloves, H.shoes, H.belt, H.s_store, H.glasses, H.ears, H.wear_id)) - if(is_gangster) - if(is_type_in_list(clothing, is_gangster.acceptable_clothes)) - is_gangster.add_gang_points(10) - else - for(var/G in gangs) - var/datum/team/gang/gang_clothes = G - if(is_type_in_list(clothing, gang_clothes.acceptable_clothes)) - gang_clothes.adjust_points(5) - - CHECK_TICK - -/datum/game_mode/gang/proc/check_rollin_with_crews() - var/list/areas_to_check = list() - for(var/G in gangbangers) - var/datum/mind/gangster = G - areas_to_check += get_area(gangster.current) - for(var/AA in areas_to_check) - var/area/A = AA - var/list/gang_members = list() - for(var/mob/living/carbon/human/H in A) - if(H.stat || !H.mind || !H.client) - continue - var/datum/antagonist/gang/is_gangster = H.mind.has_antag_datum(/datum/antagonist/gang) - if(is_gangster) - gang_members[is_gangster.my_gang]++ - CHECK_TICK - if(gang_members.len) - for(var/datum/team/gang/gangsters in gang_members) - if(gang_members[gangsters] >= CREW_SIZE_MIN) - if(gang_members[gangsters] >= CREW_SIZE_MAX) - gangsters.adjust_points(5) // Discourage larger clumps, spread ur people out - else - gangsters.adjust_points(10) - - -/datum/game_mode/gang/generate_report() - return "Potential violent criminal activity has been detected on board your station, and we believe the Spinward Stellar Coalition may be conducting an audit of us. Keep an eye out for tagging of turf, color coordination, and suspicious people asking you to say things a little closer to their chest." - -/datum/game_mode/gang/send_intercept(report = 0) - return - -/datum/game_mode/gang/special_report() - var/list/report = list() - var/highest_point_value = 0 - var/highest_gang = "Leet Like Jeff K" - report += "The families in the round were:" - var/objective_failures = TRUE - for(var/datum/team/gang/GG in gangs) - if(GG.my_gang_datum.check_gang_objective()) - objective_failures = FALSE - break - for(var/datum/team/gang/G in gangs) - report += "[G.name]:" - if(G.members.len) - report += "[G.my_gang_datum.roundend_category] were:" - report += printplayerlist(G.members) - report += "Points: [G.points]" - report += "Objective: [G.my_gang_datum.gang_objective]" - if(G.my_gang_datum.check_gang_objective()) - report += "The family completed their objective!" - else - report += "The family failed their objective!" - else - report += "The family was wiped out!" - if(!objective_failures) - if(G.points >= highest_point_value && G.members.len && G.my_gang_datum.check_gang_objective()) - highest_point_value = G.points - highest_gang = G.name - else - if(G.points >= highest_point_value && G.members.len) - highest_point_value = G.points - highest_gang = G.name - var/alive_gangsters = 0 - var/alive_cops = 0 - for(var/datum/mind/gangbanger in gangbangers) - if(gangbanger.current) - if(!ishuman(gangbanger.current)) - continue - var/mob/living/carbon/human/H = gangbanger.current - if(H.stat) - continue - alive_gangsters++ - for(var/datum/mind/bacon in pigs) - if(bacon.current) - if(!ishuman(bacon.current)) // always returns false - continue - var/mob/living/carbon/human/H = bacon.current - if(H.stat) - continue - alive_cops++ - if(alive_gangsters > alive_cops) - if(!objective_failures) - report += "[highest_gang] won the round by completing their objective and having the most points!" - else - report += "[highest_gang] won the round by having the most points!" - else if(alive_gangsters == alive_cops) - report += "Legend has it the police and the families are still duking it out to this day!" - else - report += "The police put the boots to the families, medium style!" - - - return "
[report.Join("
")]
" diff --git a/code/game/gamemodes/gang/gang_things.dm b/code/game/gamemodes/gang/gang_things.dm deleted file mode 100644 index 5871ed6a24cf8..0000000000000 --- a/code/game/gamemodes/gang/gang_things.dm +++ /dev/null @@ -1,57 +0,0 @@ -/obj/item/gang_induction_package - name = "family signup package" - icon = 'icons/obj/gang/signup_points.dmi' - icon_state = "signup_book" - var/gang_to_use - var/datum/team/gang/team_to_use - - -/obj/item/gang_induction_package/attack_self(mob/living/user) - ..() - if(HAS_TRAIT(user, TRAIT_MINDSHIELD)) - to_chat(user, "You attended a seminar on not signing up for a gang, and are not interested.") - return - if(user.mind.has_antag_datum(/datum/antagonist/ert/families)) - to_chat(user, "As a police officer, you can't join this family. However, you pretend to accept it to keep your cover up.") - for(var/threads in team_to_use.free_clothes) - new threads(get_turf(user)) - qdel(src) - return - var/datum/antagonist/gang/is_gangster = user.mind.has_antag_datum(/datum/antagonist/gang) - if(is_gangster && is_gangster.starter_gangster) - to_chat(user, "You started your family. You can't turn your back on it now.") - return - attempt_join_gang(user) - -/obj/item/gang_induction_package/proc/add_to_gang(mob/living/user) - var/datum/game_mode/gang/F = SSticker.mode - var/datum/antagonist/gang/swappin_sides = new gang_to_use() - user.mind.add_antag_datum(swappin_sides) - var/policy = get_policy(ROLE_FAMILIES) - if(policy) - to_chat(user, policy) - swappin_sides.my_gang = team_to_use - user.playsound_local(user, 'sound/ambience/antag/thatshowfamiliesworks.ogg', 100, FALSE, pressure_affected = FALSE) - team_to_use.add_member(user.mind) - for(var/threads in team_to_use.free_clothes) - new threads(get_turf(user)) - if (!F.gangbangers.Find(user.mind)) - F.gangbangers += user.mind - team_to_use.adjust_points(30) - - -/obj/item/gang_induction_package/proc/attempt_join_gang(mob/living/user) - if(user && user.mind) - var/datum/antagonist/gang/is_gangster = user.mind.has_antag_datum(/datum/antagonist/gang) - if(is_gangster) - if(is_gangster.my_gang == team_to_use) - return - else - is_gangster.my_gang.adjust_points(-30) - is_gangster.my_gang.remove_member(user.mind) - user.mind.remove_antag_datum(/datum/antagonist/gang) - add_to_gang(user) - qdel(src) - else - add_to_gang(user) - qdel(src) diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index 16da84d485b70..4f5e1ccefc52d 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -332,14 +332,6 @@ else if(drawing in graffiti|oriented) temp = "graffiti" - var/gang_mode - if(user.mind) - gang_mode = user.mind.has_antag_datum(/datum/antagonist/gang) - - if(gang_mode && (!can_claim_for_gang(user, target))) - return - - var/graf_rot if(drawing in oriented) switch(user.dir) @@ -371,9 +363,8 @@ if(paint_mode == PAINT_LARGE_HORIZONTAL) wait_time *= 3 - if(gang_mode || !instant) - if(!do_after(user, 50, target = target)) - return + if(!instant && !do_after(user, 50, target = target)) + return if(length(text_buffer)) drawing = text_buffer[1] @@ -383,34 +374,28 @@ if(actually_paints) var/obj/effect/decal/cleanable/crayon/C - if(gang_mode) - if(!can_claim_for_gang(user, target)) - return - tag_for_gang(user, target, gang_mode) - affected_turfs += target - else - switch(paint_mode) - if(PAINT_NORMAL) - C = new(target, paint_color, drawing, temp, graf_rot) - C.pixel_x = clickx - C.pixel_y = clicky + switch(paint_mode) + if(PAINT_NORMAL) + C = new(target, paint_color, drawing, temp, graf_rot) + C.pixel_x = clickx + C.pixel_y = clicky + affected_turfs += target + if(PAINT_LARGE_HORIZONTAL) + var/turf/left = locate(target.x-1,target.y,target.z) + var/turf/right = locate(target.x+1,target.y,target.z) + if(isValidSurface(left) && isValidSurface(right)) + C = new(left, paint_color, drawing, temp, graf_rot, PAINT_LARGE_HORIZONTAL_ICON) + affected_turfs += left + affected_turfs += right affected_turfs += target - if(PAINT_LARGE_HORIZONTAL) - var/turf/left = locate(target.x-1,target.y,target.z) - var/turf/right = locate(target.x+1,target.y,target.z) - if(isValidSurface(left) && isValidSurface(right)) - C = new(left, paint_color, drawing, temp, graf_rot, PAINT_LARGE_HORIZONTAL_ICON) - affected_turfs += left - affected_turfs += right - affected_turfs += target - else - to_chat(user, "There isn't enough space to paint!") - return - C.add_hiddenprint(user) - if(istagger) - C.AddComponent(/datum/component/art, GOOD_ART) - else - C.AddComponent(/datum/component/art, BAD_ART) + else + to_chat(user, "There isn't enough space to paint!") + return + C.add_hiddenprint(user) + if(istagger) + C.AddComponent(/datum/component/art, GOOD_ART) + else + C.AddComponent(/datum/component/art, BAD_ART) if(!instant) to_chat(user, "You finish drawing \the [temp].") @@ -475,19 +460,6 @@ // stolen from oldgang lmao return TRUE -/obj/item/toy/crayon/proc/tag_for_gang(mob/user, atom/target, datum/antagonist/gang/user_gang) - for(var/obj/effect/decal/cleanable/crayon/old_marking in target) - qdel(old_marking) - - var/area/territory = get_area(target) - - var/obj/effect/decal/cleanable/crayon/gang/tag = new /obj/effect/decal/cleanable/crayon/gang(target) - tag.my_gang = user_gang.my_gang - tag.icon_state = "[user_gang.gang_id]_tag" - tag.name = "[tag.my_gang.name] gang tag" - tag.desc = "Looks like someone's claimed this area for [tag.my_gang.name]." - to_chat(user, "You tagged [territory] for [tag.my_gang.name]!") - /obj/item/toy/crayon/proc/territory_claimed(area/territory, mob/user) for(var/obj/effect/decal/cleanable/crayon/gang/G in GLOB.gang_tags) if(get_area(G) == territory) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 0cde041283265..6ab4721706969 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -690,9 +690,14 @@ set category = "Admin" set name = "Unprison" if (is_centcom_level(M)) - SSjob.SendToLateJoin(M) - message_admins("[key_name_admin(usr)] has unprisoned [key_name_admin(M)]") - log_admin("[key_name(usr)] has unprisoned [key_name(M)]") + var/datum/overmap/ship/controlled/original_ship = M.mind.original_ship.resolve() + if(original_ship) + var/atom/new_spawn_point = pick(original_ship.shuttle_port.spawn_points) + new_spawn_point.join_player_here(M) + message_admins("[key_name_admin(usr)] has unprisoned [key_name_admin(M)]") + log_admin("[key_name(usr)] has unprisoned [key_name(M)]") + else + alert("[M.name] could not be sent back to their original ship.") else alert("[M.name] is not prisoned.") SSblackbox.record_feedback("tally", "admin_verb", 1, "Unprison") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/code/modules/antagonists/ert/ert.dm b/code/modules/antagonists/ert/ert.dm index 348b6d547b5d0..d69ce8a0078c9 100644 --- a/code/modules/antagonists/ert/ert.dm +++ b/code/modules/antagonists/ert/ert.dm @@ -196,118 +196,6 @@ missiondesc += "
Your Mission : [ert_team.mission.explanation_text]" to_chat(owner,missiondesc) - -/datum/antagonist/ert/families - name = "Space Police Responder" - antag_hud_type = ANTAG_HUD_SPACECOP - antag_hud_name = "hud_spacecop" - -/datum/antagonist/ert/families/apply_innate_effects(mob/living/mob_override) - ..() - var/mob/living/M = mob_override || owner.current - add_antag_hud(antag_hud_type, antag_hud_name, M) - if(M.hud_used) - var/datum/hud/H = M.hud_used - H.wanted_lvl = new /atom/movable/screen/wanted - H.infodisplay += H.wanted_lvl - - -/datum/antagonist/ert/families/remove_innate_effects(mob/living/mob_override) - var/mob/living/M = mob_override || owner.current - remove_antag_hud(antag_hud_type, M) - if(M.hud_used) - var/datum/hud/H = M.hud_used - H.infodisplay -= H.wanted_lvl - QDEL_NULL(H.wanted_lvl) - ..() - -/datum/antagonist/ert/families/greet() - to_chat(owner, "You are the [name].") - to_chat(owner, "You are NOT a Nanotrasen Employee. You work for the local government.") - - var/missiondesc = "After an uptick in gang violence on [station_name()], you are responding to emergency calls from the station for immediate SSC Police assistance!\n" - missiondesc += "
Your Mission:" - missiondesc += "
1. Secure the situation and crack down on any gang activity. You can view gangsters with your sunglasses." - missiondesc += "
2. There is an undercover police officer on station. Secure him, receive his intel, and extract him safely." - missiondesc += "
3. Minimize civilian casualties, but defend yourself and civilians from hostile gangsters." - missiondesc += "
3. If Security is found to be violating the rights of citizens, detain them as per your authority as Spinward Stellar Coalition officers." - missiondesc += "
4. If the situation demands it, evacuate the station. Otherwise, remain on station and keep the peace." - to_chat(owner,missiondesc) - var/policy = get_policy(ROLE_FAMILIES) - if(policy) - to_chat(owner, policy) - var/mob/living/M = owner.current - M.playsound_local(M, 'sound/effects/families_police.ogg', 100, FALSE, pressure_affected = FALSE, use_reverb = FALSE) - -/datum/antagonist/ert/families/undercover_cop - name = "Undercover Cop" - role = "Undercover Cop" - outfit = /datum/outfit/families_police/beatcop - var/free_clothes = list(/obj/item/clothing/glasses/hud/spacecop/hidden, - /obj/item/clothing/under/rank/security/officer/beatcop, - /obj/item/clothing/head/spacepolice) - forge_objectives_for_ert = FALSE - equip_ert = FALSE - random_names = FALSE - -/datum/antagonist/ert/families/undercover_cop/on_gain() - for(var/C in free_clothes) - var/obj/O = new C(owner.current) - var/list/slots = list ( - "backpack" = ITEM_SLOT_BACKPACK, - "left pocket" = ITEM_SLOT_LPOCKET, - "right pocket" = ITEM_SLOT_RPOCKET - ) - var/mob/living/carbon/human/H = owner.current - var/equipped = H.equip_in_one_of_slots(O, slots) - if(!equipped) - to_chat(owner.current, "Unfortunately, you could not bring your [O] to this shift. You will need to find one.") - qdel(O) - . = ..() - - -/datum/antagonist/ert/families/undercover_cop/greet() - to_chat(owner, "You are the [name].") - to_chat(owner, "You are NOT a Nanotrasen Employee. You work for the local government.") - - var/missiondesc = "You are an undercover police officer on board [station_name()]. You've been sent here by the Spinward Stellar Coalition because of suspected abusive behavior by the security department, and to keep tabs on a potential criminal organization operation." - missiondesc += "
Your Mission:" - missiondesc += "
1. Keep a close eye on any gangsters you spot. You can view gangsters using your sunglasses in your backpack." - missiondesc += "
2. Keep an eye on how Security handles any gangsters, and watch for excessive security brutality." - missiondesc += "
3. Remain undercover and do not get found out by Security or any gangs. Nanotrasen does not take kindly to being spied on." - missiondesc += "
4. When your backup arrives to extract you in 1 hour, inform them of everything you saw of note, and assist them in securing the situation." - to_chat(owner,missiondesc) - -/datum/antagonist/ert/families/beatcop - name = "Beat Cop" - role = "Police Officer" - outfit = /datum/outfit/families_police/beatcop - -/datum/antagonist/ert/families/beatcop/armored - name = "Armored Beat Cop" - role = "Police Officer" - outfit = /datum/outfit/families_police/beatcop/armored - -/datum/antagonist/ert/families/beatcop/swat - name = "S.W.A.T. Member" - role = "S.W.A.T. Officer" - outfit = /datum/outfit/families_police/beatcop/swat - -/datum/antagonist/ert/families/beatcop/fbi - name = "FBI Agent" - role = "FBI Agent" - outfit = /datum/outfit/families_police/beatcop/fbi - -/datum/antagonist/ert/families/beatcop/military - name = "Space Military" - role = "Sergeant" - outfit = /datum/outfit/families_police/beatcop/military - -/datum/antagonist/ert/families/beatcop/military/New() - . = ..() - name_source = GLOB.commando_names - - /datum/antagonist/ert/marine name = "Marine Commander" outfit = /datum/outfit/centcom/ert/marine diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index a30ecea4a2d06..fc128d0c0d531 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -51,7 +51,6 @@ GLOBAL_LIST_EMPTY(dead_players_during_shift) jitteriness = 0 if(client && !suiciding && !(client in GLOB.dead_players_during_shift)) GLOB.dead_players_during_shift += client - GLOB.deaths_during_shift++ if(ismecha(loc)) var/obj/mecha/M = loc if(M.occupant == src) diff --git a/code/modules/overmap/ships/controlled_ship_datum.dm b/code/modules/overmap/ships/controlled_ship_datum.dm index fb4c75b9d7053..0e5dc85a4f790 100644 --- a/code/modules/overmap/ships/controlled_ship_datum.dm +++ b/code/modules/overmap/ships/controlled_ship_datum.dm @@ -277,6 +277,7 @@ eligible = TRUE ) LAZYSET(owner_candidates, H.mind, mind_info) + H.mind.original_ship = WEAKREF(src) RegisterSignal(H.mind, COMSIG_PARENT_QDELETING, .proc/crew_mind_deleting) if(!owner_mob) set_owner_mob(H) diff --git a/shiptest.dme b/shiptest.dme index de9413e685f61..6d120b60a3d0e 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -257,7 +257,6 @@ #include "code\_onclick\hud\credits.dm" #include "code\_onclick\hud\devil.dm" #include "code\_onclick\hud\drones.dm" -#include "code\_onclick\hud\families.dm" #include "code\_onclick\hud\fullscreen.dm" #include "code\_onclick\hud\generic_dextrous.dm" #include "code\_onclick\hud\ghost.dm" @@ -817,8 +816,6 @@ #include "code\game\gamemodes\dynamic\dynamic_rulesets_midround.dm" #include "code\game\gamemodes\dynamic\dynamic_rulesets_roundstart.dm" #include "code\game\gamemodes\extended\extended.dm" -#include "code\game\gamemodes\gang\gang.dm" -#include "code\game\gamemodes\gang\gang_things.dm" #include "code\game\gamemodes\meteor\meteor.dm" #include "code\game\gamemodes\meteor\meteors.dm" #include "code\game\gamemodes\monkey\monkey.dm" @@ -1664,7 +1661,6 @@ #include "code\modules\antagonists\fugitive\fugitive_outfits.dm" #include "code\modules\antagonists\fugitive\fugitive_ship.dm" #include "code\modules\antagonists\fugitive\hunter.dm" -#include "code\modules\antagonists\gang\gang.dm" #include "code\modules\antagonists\gang\outfits.dm" #include "code\modules\antagonists\greentext\greentext.dm" #include "code\modules\antagonists\magic_servant\servant.dm"