From c5912b988cefbb4bf7b05b9d8f33a6bca849de8f Mon Sep 17 00:00:00 2001 From: Datraen Date: Sun, 20 Dec 2015 14:19:42 -0500 Subject: [PATCH 1/8] Adds a paralyze button for easy administration. Conflicts: code/modules/admin/admin.dm --- code/modules/admin/admin.dm | 18 +++++++++++++++++- code/modules/admin/admin_verbs.dm | 6 ++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 1e1dcf982e..1988f3d58c 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -1403,5 +1403,21 @@ proc/admin_notice(var/message, var/rights) usr << "Mode has not started." return - message_admins("[key_name(usr)] attempting to force mode autospawn.") + log_and_message_admins("attempting to force mode autospawn.") ticker.mode.process_autoantag() + +/datum/admins/proc/paralyze_mob(mob/living/carbon/human/H as mob) + set category = "Admin" + set name = "Toggle Paralyze" + set desc = "Paralyzes a player. Or unparalyses them." + + var/msg + + if(check_rights(R_ADMIN|R_MOD)) + if (H.paralysis == 0) + H.paralysis = 1000 + msg = "has paralyzed [key_name(H)]." + else + H.paralysis = 0 + msg = "has unparalyzed [key_name(H)]." + log_and_message_admins(msg) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 064f10820d..5403161149 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -91,7 +91,8 @@ var/list/admin_verbs_admin = list( /client/proc/change_human_appearance_self, /* Allows the human-based mob itself change its basic appearance */ /client/proc/change_security_level, /client/proc/view_chemical_reaction_logs, - /client/proc/makePAI + /client/proc/makePAI, + /datum/admins/proc/paralyze_mob ) var/list/admin_verbs_ban = list( /client/proc/unban_panel, @@ -284,7 +285,8 @@ var/list/admin_verbs_mod = list( /datum/admins/proc/show_player_panel, /client/proc/check_antagonists, /client/proc/jobbans, - /client/proc/cmd_admin_subtle_message /*send an message to somebody as a 'voice in their head'*/ + /client/proc/cmd_admin_subtle_message, /*send an message to somebody as a 'voice in their head'*/ + /datum/admins/proc/paralyze_mob ) var/list/admin_verbs_mentor = list( From 65f68602e7e06c989d293ded7141d4fd950f3fa4 Mon Sep 17 00:00:00 2001 From: Datraen Date: Sun, 20 Dec 2015 14:37:39 -0500 Subject: [PATCH 2/8] Adds a longer timer to paralyze, allows for other mobs to fall under this proc. Conflicts: code/modules/admin/admin.dm --- code/modules/admin/admin.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 1988f3d58c..4a435188e3 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -1406,7 +1406,7 @@ proc/admin_notice(var/message, var/rights) log_and_message_admins("attempting to force mode autospawn.") ticker.mode.process_autoantag() -/datum/admins/proc/paralyze_mob(mob/living/carbon/human/H as mob) +/datum/admins/proc/paralyze_mob(mob/living/H as mob) set category = "Admin" set name = "Toggle Paralyze" set desc = "Paralyzes a player. Or unparalyses them." @@ -1415,7 +1415,7 @@ proc/admin_notice(var/message, var/rights) if(check_rights(R_ADMIN|R_MOD)) if (H.paralysis == 0) - H.paralysis = 1000 + H.paralysis = 8000 msg = "has paralyzed [key_name(H)]." else H.paralysis = 0 From 70b84d87a6f8b90633338793e487291fffaeb6d5 Mon Sep 17 00:00:00 2001 From: PsiOmegaDelta Date: Wed, 23 Dec 2015 13:01:03 +0100 Subject: [PATCH 3/8] Tweaks permission rights. --- code/modules/admin/admin.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 4a435188e3..86e0d31cef 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -1395,7 +1395,7 @@ proc/admin_notice(var/message, var/rights) if (!istype(src,/datum/admins)) src = usr.client.holder - if (!istype(src,/datum/admins)) + if (!istype(src,/datum/admins) || !check_rights(R_ADMIN)) usr << "Error: you are not an admin!" return @@ -1413,7 +1413,7 @@ proc/admin_notice(var/message, var/rights) var/msg - if(check_rights(R_ADMIN|R_MOD)) + if(check_rights(R_ADMIN)) if (H.paralysis == 0) H.paralysis = 8000 msg = "has paralyzed [key_name(H)]." From 90f27ca42cd4a3e2bcc9e897d03de25ca9fab516 Mon Sep 17 00:00:00 2001 From: Sebastian Broberg Date: Wed, 23 Dec 2015 23:46:53 +0100 Subject: [PATCH 4/8] Fixes chemgrenades Fixes #11686 --- code/game/objects/items/weapons/grenades/chem_grenade.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm index d010e70b0f..5e15098521 100644 --- a/code/game/objects/items/weapons/grenades/chem_grenade.dm +++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm @@ -164,7 +164,7 @@ playsound(src.loc, 'sound/effects/bamf.ogg', 50, 1) for(var/obj/item/weapon/reagent_containers/glass/G in beakers) - G.reagents.trans_to(src, G.reagents.total_volume) + G.reagents.trans_to_obj(src, G.reagents.total_volume) if(src.reagents.total_volume) //The possible reactions didnt use up all reagents. var/datum/effect/effect/system/steam_spread/steam = new /datum/effect/effect/system/steam_spread() From 0bd51d2712a53eabdfd0c7828394224371369bc9 Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Thu, 24 Dec 2015 05:28:18 +0000 Subject: [PATCH 5/8] make vote window closeable via normal means --- code/controllers/voting.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/controllers/voting.dm b/code/controllers/voting.dm index 2bd56163d5..45d4a5174f 100644 --- a/code/controllers/voting.dm +++ b/code/controllers/voting.dm @@ -39,12 +39,12 @@ datum/controller/vote result() for(var/client/C in voting) if(C) - C << browse(null,"window=vote;can_close=0") + C << browse(null,"window=vote") reset() else for(var/client/C in voting) if(C) - C << browse(vote.interface(C),"window=vote;can_close=0") + C << browse(vote.interface(C),"window=vote") voting.Cut() @@ -392,4 +392,4 @@ datum/controller/vote set name = "Vote" if(vote) - src << browse(vote.interface(client),"window=vote;can_close=0") + src << browse(vote.interface(client),"window=vote") From ccda750ee1063652fd24e5d31ac80166fd524bf7 Mon Sep 17 00:00:00 2001 From: ccomp5950 Date: Thu, 24 Dec 2015 02:43:52 -0500 Subject: [PATCH 6/8] AI Malf will no longer be able to spawn a non-antag AI fixes #10554 --- code/game/gamemodes/game_mode.dm | 2 + .../game/gamemodes/malfunction/malfunction.dm | 1 + code/game/jobs/job_controller.dm | 38 +------------------ 3 files changed, 5 insertions(+), 36 deletions(-) diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 8dea479de5..d5e55f4c12 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -16,6 +16,8 @@ var/global/list/additional_antag_types = list() var/ert_disabled = 0 // ERT cannot be called. var/deny_respawn = 0 // Disable respawn during this round. + var/list/disabled_jobs = list() // Mostly used for Malf. This check is performed in job_controller so it doesn't spawn a regular AI. + var/shuttle_delay = 1 // Shuttle transit time is multiplied by this. var/auto_recall_shuttle = 0 // Will the shuttle automatically be recalled? diff --git a/code/game/gamemodes/malfunction/malfunction.dm b/code/game/gamemodes/malfunction/malfunction.dm index a86773235b..35646524f0 100644 --- a/code/game/gamemodes/malfunction/malfunction.dm +++ b/code/game/gamemodes/malfunction/malfunction.dm @@ -9,3 +9,4 @@ end_on_antag_death = 0 auto_recall_shuttle = 0 antag_tags = list(MODE_MALFUNCTION) + disabled_jobs = list("AI") diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index 142190dca5..82441ead32 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -185,36 +185,6 @@ var/global/datum/controller/occupations/job_master return - proc/FillAIPosition() - var/ai_selected = 0 - var/datum/job/job = GetJob("AI") - if(!job) return 0 - if((job.title == "AI") && (config) && (!config.allow_ai)) return 0 - - for(var/i = job.total_positions, i > 0, i--) - for(var/level = 1 to 3) - var/list/candidates = list() - if(ticker.mode.name == "AI malfunction")//Make sure they want to malf if its malf - candidates = FindOccupationCandidates(job, level, BE_MALF) - else - candidates = FindOccupationCandidates(job, level) - if(candidates.len) - var/mob/new_player/candidate = pick(candidates) - if(AssignRole(candidate, "AI")) - ai_selected++ - break - //Malf NEEDS an AI so force one if we didn't get a player who wanted it - if((ticker.mode.name == "AI malfunction")&&(!ai_selected)) - unassigned = shuffle(unassigned) - for(var/mob/new_player/player in unassigned) - if(jobban_isbanned(player, "AI")) continue - if(AssignRole(player, "AI")) - ai_selected++ - break - if(ai_selected) return 1 - return 0 - - /** Proc DivideOccupations * fills var "assigned_role" for all ready players. * This proc must not have any side effect besides of modifying "assigned_role". @@ -260,11 +230,6 @@ var/global/datum/controller/occupations/job_master FillHeadPosition() Debug("DO, Head Check end") - //Check for an AI - Debug("DO, Running AI Check") - FillAIPosition() - Debug("DO, AI Check end") - //Other jobs are now checked Debug("DO, Running Standard Check") @@ -275,6 +240,7 @@ var/global/datum/controller/occupations/job_master // Loop through all levels from high to low var/list/shuffledoccupations = shuffle(occupations) + // var/list/disabled_jobs = ticker.mode.disabled_jobs // So we can use .Find down below without a colon. for(var/level = 1 to 3) //Check the head jobs first each level CheckHeadPositions(level) @@ -284,7 +250,7 @@ var/global/datum/controller/occupations/job_master // Loop through all jobs for(var/datum/job/job in shuffledoccupations) // SHUFFLE ME BABY - if(!job) + if(!job || ticker.mode.disabled_jobs.Find(job.title) ) continue if(jobban_isbanned(player, job.title)) From 34b8c99d526ba84b233d030dcdff0cf7b99eebbb Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Fri, 25 Dec 2015 00:56:16 +0000 Subject: [PATCH 7/8] backport fix for #10705 from dev fix #10705 --- code/game/gamemodes/blob/blobs/shield.dm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/code/game/gamemodes/blob/blobs/shield.dm b/code/game/gamemodes/blob/blobs/shield.dm index c47696c72e..6829672449 100644 --- a/code/game/gamemodes/blob/blobs/shield.dm +++ b/code/game/gamemodes/blob/blobs/shield.dm @@ -21,4 +21,13 @@ CanPass(atom/movable/mover, turf/target, height=0, air_group=0) if(istype(mover) && mover.checkpass(PASSBLOB)) return 1 - return 0 + return !density + +/obj/effect/blob/shield/New() + ..() + update_nearby_tiles() + +/obj/effect/blob/shield/Destroy() + density = 0 + update_nearby_tiles() + ..() From 04006f5b9e2e7a1cb39263ac91c9e1e8ff5de296 Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Fri, 25 Dec 2015 01:06:35 +0000 Subject: [PATCH 8/8] fix human examine gender --- code/modules/mob/living/carbon/human/examine.dm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 2fe60443c9..96e1739da6 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -271,9 +271,9 @@ var/obj/item/organ/external/E = organs_by_name[organ_tag] if(!E) - wound_flavor_text["[organ_descriptor]"] = "[t_He] is missing [t_his] [organ_descriptor].\n" + wound_flavor_text["[organ_descriptor]"] = "[t_He] [t_is] missing [t_his] [organ_descriptor].\n" else if(E.is_stump()) - wound_flavor_text["[organ_descriptor]"] = "[t_He] has a stump where [t_his] [organ_descriptor] should be.\n" + wound_flavor_text["[organ_descriptor]"] = "[t_He] [t_has] a stump where [t_his] [organ_descriptor] should be.\n" else continue @@ -285,13 +285,13 @@ wound_flavor_text["[temp.name]"] = "[t_He] [t_has] a robot [temp.name]!\n" continue else - wound_flavor_text["[temp.name]"] = "[t_He] has a robot [temp.name]. It has[temp.get_wounds_desc()]!\n" + wound_flavor_text["[temp.name]"] = "[t_He] [t_has] a robot [temp.name]. It has[temp.get_wounds_desc()]!\n" else if(temp.wounds.len > 0 || temp.open) if(temp.is_stump() && temp.parent_organ && organs_by_name[temp.parent_organ]) var/obj/item/organ/external/parent = organs_by_name[temp.parent_organ] - wound_flavor_text["[temp.name]"] = "[t_He] has [temp.get_wounds_desc()] on [t_his] [parent.name].
" + wound_flavor_text["[temp.name]"] = "[t_He] [t_has] [temp.get_wounds_desc()] on [t_his] [parent.name].
" else - wound_flavor_text["[temp.name]"] = "[t_He] has [temp.get_wounds_desc()] on [t_his] [temp.name].
" + wound_flavor_text["[temp.name]"] = "[t_He] [t_has] [temp.get_wounds_desc()] on [t_his] [temp.name].
" if(temp.status & ORGAN_BLEEDING) is_bleeding["[temp.name]"] = "[capitalize(t_his)] [temp.name] is bleeding!
" else