From 7d6446d9c2127b32caa5d921387ac320bc163440 Mon Sep 17 00:00:00 2001 From: Benedict <91219575+Ben10083@users.noreply.github.com> Date: Sun, 15 May 2022 06:44:02 -0400 Subject: [PATCH] Spiderbots can now be given access (#13844) --- .../simple_animal/friendly/spiderbot.dm | 37 +++++++++++++------ html/changelogs/Ben10083 - Spida.yml | 13 +++++++ 2 files changed, 39 insertions(+), 11 deletions(-) create mode 100644 html/changelogs/Ben10083 - Spida.yml diff --git a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm index ff4b84cd8b6..32a8c21d9bf 100644 --- a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm +++ b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm @@ -121,7 +121,7 @@ return else if(O.GetID()) if (!mmi) - to_chat(user, "There's no reason to swipe your ID - \the [src] has no brain to remove.") + to_chat(user, "There's no reason to swipe your ID - \the [src] has no brain.") return 0 var/obj/item/card/id/id_card = O.GetID() @@ -129,17 +129,32 @@ if(!istype(id_card)) return 0 - if(access_robotics in id_card.access) - to_chat(user, "You swipe your access card and pop the brain out of \the [src].") - eject_brain() - if(held_item) - held_item.forceMove(src.loc) - held_item = null - return 1 - else - to_chat(user, "You swipe your card with no effect.") - return 0 + var/choice = input(user, "Would you like to eject the brain or sync access?", "Swipe Mode") as null|anything in list("Eject", "Sync") + if(!choice) + return + switch(choice) + if("Eject") + if(use_check_and_message(user)) + return 0 + if(access_robotics in id_card.access) + to_chat(user, "You swipe your access card and pop the brain out of \the [src].") + eject_brain() + if(held_item) + held_item.forceMove(src.loc) + held_item = null + return 1 + else + to_chat(user, "You swipe your card with no effect.") + return 0 + if("Sync") + if(use_check_and_message(user)) + return 0 + + internal_id.access.Cut() + internal_id.access = id_card.access.Copy() + to_chat(user, SPAN_NOTICE("Access synced with [src].")) + return 1 else O.attack(src, user, user.zone_sel.selecting) diff --git a/html/changelogs/Ben10083 - Spida.yml b/html/changelogs/Ben10083 - Spida.yml new file mode 100644 index 00000000000..73f08a65b86 --- /dev/null +++ b/html/changelogs/Ben10083 - Spida.yml @@ -0,0 +1,13 @@ +# Your name. +author: Ben10083 + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "People can now give spiderbots access by swiping their ID." \ No newline at end of file