From e40a2b59ab24d32ea9c11c8d18c9f7be5fec147e Mon Sep 17 00:00:00 2001 From: Kelenius Date: Fri, 26 Feb 2016 11:02:53 +0300 Subject: [PATCH] There is now a ten-second delay for carding the AI --- code/game/objects/items/devices/aicard.dm | 40 +++++++++++------------ html/changelogs/Kelenius-plzNoCard.yml | 36 ++++++++++++++++++++ 2 files changed, 56 insertions(+), 20 deletions(-) create mode 100644 html/changelogs/Kelenius-plzNoCard.yml diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm index 29c8377d43..9571691793 100644 --- a/code/game/objects/items/devices/aicard.dm +++ b/code/game/objects/items/devices/aicard.dm @@ -100,31 +100,31 @@ user << "Transfer failed: Existing AI found on remote terminal. Remove existing AI to install a new one." return 0 - if(ai.is_malf()) - user << "ERROR: Remote transfer interface disabled." - return 0 + user.visible_message("\The [user] starts downloading \the [ai] into \the [src]...", "You start downloading \the [ai] into \the [src]...") + ai << "\The [user] is downloading you into \the [src]!" - if(istype(ai.loc, /turf/)) - new /obj/structure/AIcore/deactivated(get_turf(ai)) + if(do_after(user, 100)) + if(istype(ai.loc, /turf/)) + new /obj/structure/AIcore/deactivated(get_turf(ai)) - ai.carded = 1 - admin_attack_log(user, ai, "Carded with [src.name]", "Was carded with [src.name]", "used the [src.name] to card") - src.name = "[initial(name)] - [ai.name]" + ai.carded = 1 + admin_attack_log(user, ai, "Carded with [src.name]", "Was carded with [src.name]", "used the [src.name] to card") + src.name = "[initial(name)] - [ai.name]" - ai.loc = src - ai.destroy_eyeobj(src) - ai.cancel_camera() - ai.control_disabled = 1 - ai.aiRestorePowerRoutine = 0 - carded_ai = ai + ai.loc = src + ai.destroy_eyeobj(src) + ai.cancel_camera() + ai.control_disabled = 1 + ai.aiRestorePowerRoutine = 0 + carded_ai = ai - if(ai.client) - ai << "You have been downloaded to a mobile storage device. Remote access lost." - if(user.client) - user << "Transfer successful: [ai.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory." + if(ai.client) + ai << "You have been downloaded to a mobile storage device. Remote access lost." + if(user.client) + user << "Transfer successful: [ai.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory." - ai.canmove = 1 - update_icon() + ai.canmove = 1 + update_icon() return 1 /obj/item/device/aicard/proc/clear() diff --git a/html/changelogs/Kelenius-plzNoCard.yml b/html/changelogs/Kelenius-plzNoCard.yml new file mode 100644 index 0000000000..a00bbdbfee --- /dev/null +++ b/html/changelogs/Kelenius-plzNoCard.yml @@ -0,0 +1,36 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +################################# + +# Your name. +author: Kelenius + +# 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: + - tweak: "There is now a ten-second delay for carding the AI."