From 9de5e5f5fa83af6111a523bbcb046073d6b1f14e Mon Sep 17 00:00:00 2001 From: Timothy Teakettle <59849408+timothyteakettle@users.noreply.github.com> Date: Fri, 19 Feb 2021 17:07:41 +0000 Subject: [PATCH 1/5] Update vampire.dm --- .../modules/mob/living/carbon/human/species_types/vampire.dm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/modules/mob/living/carbon/human/species_types/vampire.dm b/code/modules/mob/living/carbon/human/species_types/vampire.dm index 5e07150ce6..2c8c5f94d5 100644 --- a/code/modules/mob/living/carbon/human/species_types/vampire.dm +++ b/code/modules/mob/living/carbon/human/species_types/vampire.dm @@ -26,6 +26,11 @@ return TRUE return FALSE +/datum/species/vampire/qualifies_for_rank(rank, list/features) + if(rank == "Chaplain") + return FALSE + return ..() + /datum/species/vampire/on_species_gain(mob/living/carbon/human/C, datum/species/old_species) . = ..() to_chat(C, "[info_text]") From 94ad05b2bc9cec6fdfe0023296b538008f1d3f19 Mon Sep 17 00:00:00 2001 From: Timothy Teakettle <59849408+timothyteakettle@users.noreply.github.com> Date: Fri, 19 Feb 2021 17:14:36 +0000 Subject: [PATCH 2/5] better idea --- code/modules/mob/living/carbon/human/species_types/vampire.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/species_types/vampire.dm b/code/modules/mob/living/carbon/human/species_types/vampire.dm index 2c8c5f94d5..c43fe79268 100644 --- a/code/modules/mob/living/carbon/human/species_types/vampire.dm +++ b/code/modules/mob/living/carbon/human/species_types/vampire.dm @@ -63,7 +63,7 @@ to_chat(C, "You ran out of blood!") C.dust() var/area/A = get_area(C) - if(istype(A, /area/chapel)) + if(istype(A, /area/chapel) && C.mind?.assigned_role != "Chaplain") to_chat(C, "You don't belong here!") C.adjustFireLoss(5) C.adjust_fire_stacks(6) From 9528cc9ce46b81c42c320731ca6da76b37fc9168 Mon Sep 17 00:00:00 2001 From: Timothy Teakettle <59849408+timothyteakettle@users.noreply.github.com> Date: Fri, 19 Feb 2021 19:36:19 +0000 Subject: [PATCH 3/5] woops i left that in --- .../modules/mob/living/carbon/human/species_types/vampire.dm | 5 ----- 1 file changed, 5 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species_types/vampire.dm b/code/modules/mob/living/carbon/human/species_types/vampire.dm index c43fe79268..89b3d603ea 100644 --- a/code/modules/mob/living/carbon/human/species_types/vampire.dm +++ b/code/modules/mob/living/carbon/human/species_types/vampire.dm @@ -26,11 +26,6 @@ return TRUE return FALSE -/datum/species/vampire/qualifies_for_rank(rank, list/features) - if(rank == "Chaplain") - return FALSE - return ..() - /datum/species/vampire/on_species_gain(mob/living/carbon/human/C, datum/species/old_species) . = ..() to_chat(C, "[info_text]") From 7b8b16dc22c3aa879a7aeb903dbd280a0462b805 Mon Sep 17 00:00:00 2001 From: Timothy Teakettle <59849408+timothyteakettle@users.noreply.github.com> Date: Fri, 19 Feb 2021 22:19:00 +0000 Subject: [PATCH 4/5] test --- .../objects/structures/ghost_role_spawners.dm | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/code/game/objects/structures/ghost_role_spawners.dm b/code/game/objects/structures/ghost_role_spawners.dm index fadf33cb85..6299aa1554 100644 --- a/code/game/objects/structures/ghost_role_spawners.dm +++ b/code/game/objects/structures/ghost_role_spawners.dm @@ -661,6 +661,49 @@ ADD_TRAIT(M,TRAIT_SIXTHSENSE,GHOSTROLE_TRAIT) to_chat(M,"You're once again longer hearing deadchat.") +/datum/action/disguise + name = "Disguise" + button_icon_state = "ling_transform" + icon_icon = 'icons/mob/actions/actions_changeling.dmi' + background_icon_state = "bg_mime" + +/datum/action/disguise/Trigger() + var/mob/living/carbon/human/H = owner + var/user_search_type = input(H, "Search by PATH or NAME") as null|anything in list("PATH","NAME") + if(user_search_type) + var/user_object_type = input(H, "Disguising as OBJECT or MOB?") as null|anything in list("OBJECT", "MOB") + if(user_object_type) + var/search_term = stripped_input(H, "Enter the search term") + if(search_term) + var/list_to_search + if(user_object_type == "MOB") + list_to_search = subtypesof(/mob) + else + list_to_search = subtypesof(/obj) + var/list/filtered_results = list() + // it's better to have two loops here rather than make the conditional check for path or name in every cycle of a single loop + var/x = 0 + switch(user_search_type) + if("PATH") + for(var/some_search_item in list_to_search) + if(findtext("[some_search_item]", search_term)) + filtered_results += some_search_item + if("NAME") + for(var/some_search_item in list_to_search) + var/mob/some_search_atom = some_search_item + if(findtext(initial(some_search_atom.name), search_term)) + filtered_results[some_search_item] += some_search_atom.name + if(x < 10) + message_admins("initial name is [initial(some_search_atom.name)]") + + x += 1 + if(!length(filtered_results)) + to_chat(H, "Nothing matched your search query!") + message_admins("for reference the length of list to search was [length(list_to_search)]") + else + message_admins("it s + var/disguise_selection = input("Select item to disguise as") as null|anything in filtered_results + /obj/effect/mob_spawn/human/ghostcafe/special(mob/living/carbon/human/new_spawn) if(new_spawn.client) @@ -681,6 +724,11 @@ var/datum/action/toggle_dead_chat_mob/D = new(new_spawn) D.Grant(new_spawn) + + // debug if you see this delete it + var/datum/action/disguise/disguise_action = new(new_spawn) + disguise_action.Grant(new_spawn) + /datum/outfit/ghostcafe name = "ID, jumpsuit and shoes" uniform = /obj/item/clothing/under/color/random From 7c00a9723dafb419b8abce15261d5bc34522a931 Mon Sep 17 00:00:00 2001 From: Timothy Teakettle <59849408+timothyteakettle@users.noreply.github.com> Date: Fri, 19 Feb 2021 23:09:57 +0000 Subject: [PATCH 5/5] Revert "test" This reverts commit 7b8b16dc22c3aa879a7aeb903dbd280a0462b805. --- .../objects/structures/ghost_role_spawners.dm | 48 ------------------- 1 file changed, 48 deletions(-) diff --git a/code/game/objects/structures/ghost_role_spawners.dm b/code/game/objects/structures/ghost_role_spawners.dm index 6299aa1554..fadf33cb85 100644 --- a/code/game/objects/structures/ghost_role_spawners.dm +++ b/code/game/objects/structures/ghost_role_spawners.dm @@ -661,49 +661,6 @@ ADD_TRAIT(M,TRAIT_SIXTHSENSE,GHOSTROLE_TRAIT) to_chat(M,"You're once again longer hearing deadchat.") -/datum/action/disguise - name = "Disguise" - button_icon_state = "ling_transform" - icon_icon = 'icons/mob/actions/actions_changeling.dmi' - background_icon_state = "bg_mime" - -/datum/action/disguise/Trigger() - var/mob/living/carbon/human/H = owner - var/user_search_type = input(H, "Search by PATH or NAME") as null|anything in list("PATH","NAME") - if(user_search_type) - var/user_object_type = input(H, "Disguising as OBJECT or MOB?") as null|anything in list("OBJECT", "MOB") - if(user_object_type) - var/search_term = stripped_input(H, "Enter the search term") - if(search_term) - var/list_to_search - if(user_object_type == "MOB") - list_to_search = subtypesof(/mob) - else - list_to_search = subtypesof(/obj) - var/list/filtered_results = list() - // it's better to have two loops here rather than make the conditional check for path or name in every cycle of a single loop - var/x = 0 - switch(user_search_type) - if("PATH") - for(var/some_search_item in list_to_search) - if(findtext("[some_search_item]", search_term)) - filtered_results += some_search_item - if("NAME") - for(var/some_search_item in list_to_search) - var/mob/some_search_atom = some_search_item - if(findtext(initial(some_search_atom.name), search_term)) - filtered_results[some_search_item] += some_search_atom.name - if(x < 10) - message_admins("initial name is [initial(some_search_atom.name)]") - - x += 1 - if(!length(filtered_results)) - to_chat(H, "Nothing matched your search query!") - message_admins("for reference the length of list to search was [length(list_to_search)]") - else - message_admins("it s - var/disguise_selection = input("Select item to disguise as") as null|anything in filtered_results - /obj/effect/mob_spawn/human/ghostcafe/special(mob/living/carbon/human/new_spawn) if(new_spawn.client) @@ -724,11 +681,6 @@ var/datum/action/toggle_dead_chat_mob/D = new(new_spawn) D.Grant(new_spawn) - - // debug if you see this delete it - var/datum/action/disguise/disguise_action = new(new_spawn) - disguise_action.Grant(new_spawn) - /datum/outfit/ghostcafe name = "ID, jumpsuit and shoes" uniform = /obj/item/clothing/under/color/random