From d1218e38bbff658eeb8d00c849ffb5eb48b6f98d Mon Sep 17 00:00:00 2001 From: Bone White Date: Mon, 4 Aug 2014 12:28:26 +0100 Subject: [PATCH 1/5] Pipe wall drilling fix Fixes the var/dir of the bent pipes when drilling into walls --- code/game/turfs/simulated/walls.dm | 22 +++++++++++-------- code/game/turfs/simulated/walls_reinforced.dm | 22 +++++++++++-------- 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index c30969bea07..e8dd96e844d 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -496,16 +496,20 @@ "[user] drills a hole in \the [src] and pushes \a [P] into the void", \ "\blue You have finished drilling in \the [src] and push the [P] into the void.", \ "You hear ratchet.") - /* - new /obj/item/pipe(loc, make_from=src) - for (var/obj/machinery/meter/meter in T) - if (meter.target == src) - new /obj/item/pipe_meter(T) - del(meter) - qdel(src) - */ + user.drop_item() - P.dir = user.dir + if (P.pipe_type in list (1,3,12)) // bent pipe rotation fix see construction.dm + P.dir = 5 + if (user.dir == 1) + P.dir = 6 + if (user.dir == 2) + P.dir = 9 + if (user.dir == 4) + P.dir = 10 + if (user.dir == 5) + P.dir = 8 + else + P.dir = user.dir P.x = src.x P.y = src.y P.z = src.z diff --git a/code/game/turfs/simulated/walls_reinforced.dm b/code/game/turfs/simulated/walls_reinforced.dm index a74299cfb69..f16106cef99 100644 --- a/code/game/turfs/simulated/walls_reinforced.dm +++ b/code/game/turfs/simulated/walls_reinforced.dm @@ -327,16 +327,20 @@ "[user] drills a hole in \the [src] and pushes \a [P] into the void", \ "\blue You have finished drilling in \the [src] and push the [P] into the void.", \ "You hear ratchet.") - /* - new /obj/item/pipe(loc, make_from=src) - for (var/obj/machinery/meter/meter in T) - if (meter.target == src) - new /obj/item/pipe_meter(T) - del(meter) - qdel(src) - */ + user.drop_item() - P.dir = user.dir + if (P.pipe_type in list (1,3,12)) // bent pipe rotation fix see construction.dm + P.dir = 5 + if (user.dir == 1) + P.dir = 6 + if (user.dir == 2) + P.dir = 9 + if (user.dir == 4) + P.dir = 10 + if (user.dir == 5) + P.dir = 8 + else + P.dir = user.dir P.x = src.x P.y = src.y P.z = src.z From 00e982db7970a3bc72aae2e5f7328900efddbbc0 Mon Sep 17 00:00:00 2001 From: Bone White Date: Tue, 5 Aug 2014 14:43:32 +0100 Subject: [PATCH 2/5] Miner Drills spawn on belt This is to fix a bug with races which spawn with a bag in their hand overwriting the drill. --- code/game/jobs/job/support.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/jobs/job/support.dm b/code/game/jobs/job/support.dm index 2747f1ba77b..6e64040b184 100644 --- a/code/game/jobs/job/support.dm +++ b/code/game/jobs/job/support.dm @@ -182,7 +182,7 @@ H.equip_or_collect(new /obj/item/clothing/under/rank/miner(H), slot_w_uniform) H.equip_or_collect(new /obj/item/device/pda/shaftminer(H), slot_wear_pda) H.equip_or_collect(new /obj/item/clothing/shoes/black(H), slot_shoes) - H.equip_or_collect(new /obj/item/weapon/pickaxe/drill(H), slot_r_hand) + H.equip_or_collect(new /obj/item/weapon/pickaxe/drill(H), slot_belt) // H.equip_or_collect(new /obj/item/clothing/gloves/black(H), slot_gloves) if(H.backbag == 1) H.equip_or_collect(new /obj/item/weapon/storage/box/engineer(H), slot_r_hand) From 26acad361e39d591b265c95153c4b65b954fbb55 Mon Sep 17 00:00:00 2001 From: Bone White Date: Tue, 5 Aug 2014 16:38:37 +0100 Subject: [PATCH 3/5] Added Admin PM by Key verb --- code/modules/admin/admin_verbs.dm | 2 ++ code/modules/admin/verbs/adminpm.dm | 25 ++++++++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 396dab9c6be..fcafc119f9e 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -23,6 +23,7 @@ var/list/admin_verbs_admin = list( /datum/admins/proc/view_atk_log, /*shows the server combat-log, doesn't do anything presently*/ /client/proc/cmd_admin_pm_context, /*right-click adminPM interface*/ /client/proc/cmd_admin_pm_panel, /*admin-pm list*/ + /client/proc/cmd_admin_pm_by_key_panel, /*admin-pm list by key*/ /client/proc/cmd_admin_subtle_message, /*send an message to somebody as a 'voice in their head'*/ /client/proc/cmd_admin_delete, /*delete an instance/object/mob/etc*/ /client/proc/cmd_admin_check_contents, /*displays the contents of an instance*/ @@ -167,6 +168,7 @@ var/list/admin_verbs_rejuv = list( var/list/admin_verbs_mod = list( /client/proc/cmd_admin_pm_context, /*right-click adminPM interface*/ /client/proc/cmd_admin_pm_panel, /*admin-pm list*/ + /client/proc/cmd_admin_pm_by_key_panel, /*admin-pm list by key*/ /client/proc/toggledebuglogs, /datum/admins/proc/PlayerNotes, /client/proc/admin_ghost, /*allows us to ghost/reenter body at will*/ diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm index 39f983fe3eb..83f43ba6d9c 100644 --- a/code/modules/admin/verbs/adminpm.dm +++ b/code/modules/admin/verbs/adminpm.dm @@ -12,7 +12,7 @@ //shows a list of clients we could send PMs to, then forwards our choice to cmd_admin_pm /client/proc/cmd_admin_pm_panel() set category = "Admin" - set name = "Admin PM" + set name = "Admin PM Name" if(!holder) src << "Error: Admin-PM-Panel: Only administrators may use this command." return @@ -32,6 +32,29 @@ cmd_admin_pm(targets[target],null) feedback_add_details("admin_verb","APM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! +//shows a list of clients we could send PMs to, then forwards our choice to cmd_admin_pm +/client/proc/cmd_admin_pm_by_key_panel() + set category = "Admin" + set name = "Admin PM Key" + if(!holder) + src << "Error: Admin-PM-Panel: Only administrators may use this command." + return + var/list/client/targets[0] + for(var/client/T) + if(T.mob) + if(istype(T.mob, /mob/new_player)) + targets["[T] - (New Player)"] = T + else if(istype(T.mob, /mob/dead/observer)) + targets["[T] - [T.mob.name](Ghost)"] = T + else + targets["[T] - [T.mob.real_name](as [T.mob.name])"] = T + else + targets["(No Mob) - [T]"] = T + var/list/sorted = sortList(targets) + var/target = input(src,"To whom shall we send a message?","Admin PM",null) in sorted|null + cmd_admin_pm(targets[target],null) + feedback_add_details("admin_verb","APM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + //takes input from cmd_admin_pm_context, cmd_admin_pm_panel or /client/Topic and sends them a PM. //Fetching a message if needed. src is the sender and C is the target client From dc2bf43c11b0697c3f57c6c58ae321b41f155afe Mon Sep 17 00:00:00 2001 From: Bone White Date: Tue, 5 Aug 2014 22:39:15 +0100 Subject: [PATCH 4/5] Added adminlog to virus mutations in mobs --- code/modules/virus2/disease2.dm | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/code/modules/virus2/disease2.dm b/code/modules/virus2/disease2.dm index 3a55077f695..2cf2bd12554 100644 --- a/code/modules/virus2/disease2.dm +++ b/code/modules/virus2/disease2.dm @@ -61,7 +61,7 @@ mob.antibodies |= antigen if(mob.radiation > 50) if(prob(1)) - majormutate() + majormutateinactivate() //Space antibiotics stop disease completely if(mob.reagents.has_reagent("spaceacillin")) @@ -117,6 +117,23 @@ if (prob(5) && all_species.len) affected_species = get_infectable_species() +/datum/disease2/disease/proc/majormutateinactivate() + var/oldID = uniqueID + uniqueID = rand(0,10000) + var/datum/disease2/effectholder/holder = pick(effects) + holder.majormutate() + if (prob(5)) + var/oldAntigen = antigen + antigen = text2num(pick(ANTIGENS)) + antigen |= text2num(pick(ANTIGENS)) + log_admin("Stamm #[oldID] ([oldAntigen]) mutated in a mob to Stamm #[uniqueID] ([antigen])") + message_admins("Stamm #[oldID] ([oldAntigen]) mutated in a mob to Stamm #[uniqueID] ([antigen])") + if (prob(5) && all_species.len) + var/old_species = affected_species + affected_species = get_infectable_species() + log_admin("Stamm #[oldID] ([old_species]) mutated in a mob to Stamm #[uniqueID] ([affected_species])") + message_admins("Stamm #[oldID] ([old_species]) mutated in a mob to Stamm #[uniqueID] ([affected_species])") + /datum/disease2/disease/proc/getcopy() var/datum/disease2/disease/disease = new /datum/disease2/disease disease.infectionchance = infectionchance From 3c4db5076aad9f92dc3421dfe895179478000289 Mon Sep 17 00:00:00 2001 From: Bone White Date: Tue, 5 Aug 2014 22:46:38 +0100 Subject: [PATCH 5/5] Better adminlogs for virus mutations in mobs --- code/modules/virus2/disease2.dm | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/code/modules/virus2/disease2.dm b/code/modules/virus2/disease2.dm index 2cf2bd12554..7281163dc5b 100644 --- a/code/modules/virus2/disease2.dm +++ b/code/modules/virus2/disease2.dm @@ -61,7 +61,7 @@ mob.antibodies |= antigen if(mob.radiation > 50) if(prob(1)) - majormutateinactivate() + majormutateinactivate(mob) //Space antibiotics stop disease completely if(mob.reagents.has_reagent("spaceacillin")) @@ -117,7 +117,7 @@ if (prob(5) && all_species.len) affected_species = get_infectable_species() -/datum/disease2/disease/proc/majormutateinactivate() +/datum/disease2/disease/proc/majormutateinactivate(var/mob/living/carbon/mob) //Bone White - Duplicate of majormutate() with adminlogs, for use only in activate() var/oldID = uniqueID uniqueID = rand(0,10000) var/datum/disease2/effectholder/holder = pick(effects) @@ -126,13 +126,16 @@ var/oldAntigen = antigen antigen = text2num(pick(ANTIGENS)) antigen |= text2num(pick(ANTIGENS)) - log_admin("Stamm #[oldID] ([oldAntigen]) mutated in a mob to Stamm #[uniqueID] ([antigen])") - message_admins("Stamm #[oldID] ([oldAntigen]) mutated in a mob to Stamm #[uniqueID] ([antigen])") - if (prob(5) && all_species.len) + log_admin("Stamm #[oldID] ([oldAntigen]) mutated antigens in [mob.name] to Stamm #[uniqueID] ([antigen])") + message_admins("Stamm #[oldID] ([oldAntigen]) mutated antigens in [mob.name] to Stamm #[uniqueID] ([antigen])") + else if (prob(10) && all_species.len) var/old_species = affected_species affected_species = get_infectable_species() - log_admin("Stamm #[oldID] ([old_species]) mutated in a mob to Stamm #[uniqueID] ([affected_species])") - message_admins("Stamm #[oldID] ([old_species]) mutated in a mob to Stamm #[uniqueID] ([affected_species])") + log_admin("Stamm #[oldID] ([old_species]) mutated affected species in [mob.name] to Stamm #[uniqueID] ([affected_species])") + message_admins("Stamm #[oldID] ([old_species]) mutated affected species in [mob.name] to Stamm #[uniqueID] ([affected_species])") + else + log_admin("Stamm #[oldID] mutated in [mob.name] to Stamm #[uniqueID] ([antigen])") + message_admins("Stamm #[oldID] mutated in a [mob.name] to Stamm #[uniqueID] ([antigen])") /datum/disease2/disease/proc/getcopy() var/datum/disease2/disease/disease = new /datum/disease2/disease