From 34d1a57243339cc81975c1315369678be4392df0 Mon Sep 17 00:00:00 2001 From: Laharl Montogmmery Date: Sun, 17 Nov 2013 23:09:06 +0100 Subject: [PATCH 01/12] AI can now anchor/unanchor itself. Add a Toggle Anchor Bolt verb to the AI that allows it to toggle his 'anchored' var and be dragged around. You cannot use the bolt verb in a locker,disposal, pipe , on a mule or as a card. Tested Interactions between AI and items : -While the AI can be dragged, it cannot be pushed. You can however, while dragging it, move it around on tiles(by clicking on said tile),if you get stuck. -Cannot be grabbed or click dropped into the gibber. -Cannot be grabbed or click dropped into Cryo. -Cannot be put in the DNA scanner. -Cannot be put in the morgue, or the incinerator. -CAN be grabbed or click dropped into a disposals bin, and flushed. -CAN be put inside a locker. Once there's a locker below and you can close it, you can drag the AI around - event if it's normally anchored. If you open the closet while the AI is anchored, the Ai will still be in a anchored state. Note that it's possible to do this trick without needing to drag the Ai over a locker, PRIOR to this commit. -Can drift in space, and can be mass-driver'd. Also Anchors don't work in spess.Also Ai goes blind in spess. Honk. -Can be pulled around on edges in space as normal, slip interaction works normally. -Can be telescience'd if unanchored. -You can get on a mulebot! Notable problem : -Ai can be buckled/unbuckled to a chair, and when unbuckled it reverts to an anchored state.Can be solved by using the verb again. Not a real issue, but notable. -Dragging an AI in open space can be a bit of a problem. If you take sharp turns while jetpacking, the Ai will still drift in the previous direction. You can stop the AI course by jumping by getting in front of it. Dead AIs were however able to go through you, but Gia found a fix. "Doesn't that defeat the purpose of the intellicard?" No, because you only use the card for 3 cases : 1. In case of Rogue AIs, and it is unlikely it will let you drag it around. 2. In case od dead AIs, in which case it will still need to be carded in order to be resurected. 3. In order to steal the AI, and generally they don't like that as well. So the intellicard will still show uses if this commit gets pulled. Many thanks to Giacommand for babysitting me and helping me through the coding and testing stages of this commit. Also, first baby commit, ho! I've thought of this when Gia decided to change Telescience to not drag anchored mobs, and realised that this create a lot of fun options for the AI (rogue or not). Most of the interactions seems to be clear of bugs, and I didn't get any runtimes when testing (except something about NanoUI, but Gia and me assumed it was unrelated.) --- code/modules/mob/living/silicon/ai/ai.dm | 13 ++ tgstation.dme | 242 +++++++++++++++++++++++ 2 files changed, 255 insertions(+) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 0aa514f2bab..b5da208ca02 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -253,6 +253,19 @@ var/list/ai_list = list() return +/mob/living/silicon/ai/verb/toggle_anchor() + set category = "AI Commands" + set name = "Toggle Floor Bolts" + if(!isturf(loc)) // if their location isn't a turf + return // stop + anchored = !anchored // Toggles the anchor + + src << "[anchored ? "You are now anchored." : "You are now unanchored."]" + // the message in the [] will change depending whether or not the AI is anchored + +/mob/living/silicon/ai/update_canmove() + return 0 + /mob/living/silicon/ai/proc/ai_cancel_call() set category = "AI Commands" if(src.stat == 2) diff --git a/tgstation.dme b/tgstation.dme index a454b46ea68..8c11744cf22 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -6,6 +6,248 @@ // BEGIN_FILE_DIR #define FILE_DIR . +#define FILE_DIR "code" +#define FILE_DIR "code/__DEFINES" +#define FILE_DIR "code/__HELPERS" +#define FILE_DIR "code/_globalvars" +#define FILE_DIR "code/_globalvars/lists" +#define FILE_DIR "code/_onclick" +#define FILE_DIR "code/_onclick/hud" +#define FILE_DIR "code/ATMOSPHERICS" +#define FILE_DIR "code/ATMOSPHERICS/components" +#define FILE_DIR "code/ATMOSPHERICS/components/binary_devices" +#define FILE_DIR "code/ATMOSPHERICS/components/trinary_devices" +#define FILE_DIR "code/ATMOSPHERICS/components/unary" +#define FILE_DIR "code/controllers" +#define FILE_DIR "code/datums" +#define FILE_DIR "code/datums/diseases" +#define FILE_DIR "code/datums/diseases/advance" +#define FILE_DIR "code/datums/diseases/advance/symptoms" +#define FILE_DIR "code/datums/helper_datums" +#define FILE_DIR "code/datums/spells" +#define FILE_DIR "code/datums/wires" +#define FILE_DIR "code/defines" +#define FILE_DIR "code/defines/obj" +#define FILE_DIR "code/defines/procs" +#define FILE_DIR "code/FEA" +#define FILE_DIR "code/game" +#define FILE_DIR "code/game/area" +#define FILE_DIR "code/game/gamemodes" +#define FILE_DIR "code/game/gamemodes/blob" +#define FILE_DIR "code/game/gamemodes/blob/blobs" +#define FILE_DIR "code/game/gamemodes/changeling" +#define FILE_DIR "code/game/gamemodes/cult" +#define FILE_DIR "code/game/gamemodes/extended" +#define FILE_DIR "code/game/gamemodes/malfunction" +#define FILE_DIR "code/game/gamemodes/meteor" +#define FILE_DIR "code/game/gamemodes/nuclear" +#define FILE_DIR "code/game/gamemodes/revolution" +#define FILE_DIR "code/game/gamemodes/sandbox" +#define FILE_DIR "code/game/gamemodes/traitor" +#define FILE_DIR "code/game/gamemodes/wizard" +#define FILE_DIR "code/game/jobs" +#define FILE_DIR "code/game/jobs/job" +#define FILE_DIR "code/game/machinery" +#define FILE_DIR "code/game/machinery/atmoalter" +#define FILE_DIR "code/game/machinery/bots" +#define FILE_DIR "code/game/machinery/camera" +#define FILE_DIR "code/game/machinery/computer" +#define FILE_DIR "code/game/machinery/doors" +#define FILE_DIR "code/game/machinery/embedded_controller" +#define FILE_DIR "code/game/machinery/kitchen" +#define FILE_DIR "code/game/machinery/pipe" +#define FILE_DIR "code/game/machinery/telecomms" +#define FILE_DIR "code/game/mecha" +#define FILE_DIR "code/game/mecha/combat" +#define FILE_DIR "code/game/mecha/equipment" +#define FILE_DIR "code/game/mecha/equipment/tools" +#define FILE_DIR "code/game/mecha/equipment/weapons" +#define FILE_DIR "code/game/mecha/medical" +#define FILE_DIR "code/game/mecha/working" +#define FILE_DIR "code/game/objects" +#define FILE_DIR "code/game/objects/effects" +#define FILE_DIR "code/game/objects/effects/decals" +#define FILE_DIR "code/game/objects/effects/decals/Cleanable" +#define FILE_DIR "code/game/objects/effects/spawners" +#define FILE_DIR "code/game/objects/items" +#define FILE_DIR "code/game/objects/items/devices" +#define FILE_DIR "code/game/objects/items/devices/PDA" +#define FILE_DIR "code/game/objects/items/devices/radio" +#define FILE_DIR "code/game/objects/items/robot" +#define FILE_DIR "code/game/objects/items/stacks" +#define FILE_DIR "code/game/objects/items/stacks/sheets" +#define FILE_DIR "code/game/objects/items/stacks/tiles" +#define FILE_DIR "code/game/objects/items/weapons" +#define FILE_DIR "code/game/objects/items/weapons/grenades" +#define FILE_DIR "code/game/objects/items/weapons/implants" +#define FILE_DIR "code/game/objects/items/weapons/melee" +#define FILE_DIR "code/game/objects/items/weapons/storage" +#define FILE_DIR "code/game/objects/items/weapons/tanks" +#define FILE_DIR "code/game/objects/structures" +#define FILE_DIR "code/game/objects/structures/crates_lockers" +#define FILE_DIR "code/game/objects/structures/crates_lockers/closets" +#define FILE_DIR "code/game/objects/structures/crates_lockers/closets/secure" +#define FILE_DIR "code/game/objects/structures/stool_bed_chair_nest" +#define FILE_DIR "code/game/turfs" +#define FILE_DIR "code/game/turfs/simulated" +#define FILE_DIR "code/game/turfs/space" +#define FILE_DIR "code/game/turfs/unsimulated" +#define FILE_DIR "code/game/verbs" +#define FILE_DIR "code/js" +#define FILE_DIR "code/LINDA" +#define FILE_DIR "code/modules" +#define FILE_DIR "code/modules/admin" +#define FILE_DIR "code/modules/admin/DB ban" +#define FILE_DIR "code/modules/admin/permissionverbs" +#define FILE_DIR "code/modules/admin/verbs" +#define FILE_DIR "code/modules/assembly" +#define FILE_DIR "code/modules/awaymissions" +#define FILE_DIR "code/modules/awaymissions/maploader" +#define FILE_DIR "code/modules/client" +#define FILE_DIR "code/modules/clothing" +#define FILE_DIR "code/modules/clothing/glasses" +#define FILE_DIR "code/modules/clothing/gloves" +#define FILE_DIR "code/modules/clothing/head" +#define FILE_DIR "code/modules/clothing/masks" +#define FILE_DIR "code/modules/clothing/shoes" +#define FILE_DIR "code/modules/clothing/spacesuits" +#define FILE_DIR "code/modules/clothing/suits" +#define FILE_DIR "code/modules/clothing/under" +#define FILE_DIR "code/modules/clothing/under/jobs" +#define FILE_DIR "code/modules/detectivework" +#define FILE_DIR "code/modules/events" +#define FILE_DIR "code/modules/events/holiday" +#define FILE_DIR "code/modules/flufftext" +#define FILE_DIR "code/modules/food" +#define FILE_DIR "code/modules/hydroponics" +#define FILE_DIR "code/modules/library" +#define FILE_DIR "code/modules/mining" +#define FILE_DIR "code/modules/mining/laborcamp" +#define FILE_DIR "code/modules/mob" +#define FILE_DIR "code/modules/mob/camera" +#define FILE_DIR "code/modules/mob/dead" +#define FILE_DIR "code/modules/mob/dead/observer" +#define FILE_DIR "code/modules/mob/living" +#define FILE_DIR "code/modules/mob/living/carbon" +#define FILE_DIR "code/modules/mob/living/carbon/alien" +#define FILE_DIR "code/modules/mob/living/carbon/alien/humanoid" +#define FILE_DIR "code/modules/mob/living/carbon/alien/humanoid/caste" +#define FILE_DIR "code/modules/mob/living/carbon/alien/larva" +#define FILE_DIR "code/modules/mob/living/carbon/alien/special" +#define FILE_DIR "code/modules/mob/living/carbon/brain" +#define FILE_DIR "code/modules/mob/living/carbon/human" +#define FILE_DIR "code/modules/mob/living/carbon/metroid" +#define FILE_DIR "code/modules/mob/living/carbon/monkey" +#define FILE_DIR "code/modules/mob/living/silicon" +#define FILE_DIR "code/modules/mob/living/silicon/ai" +#define FILE_DIR "code/modules/mob/living/silicon/ai/freelook" +#define FILE_DIR "code/modules/mob/living/silicon/decoy" +#define FILE_DIR "code/modules/mob/living/silicon/pai" +#define FILE_DIR "code/modules/mob/living/silicon/robot" +#define FILE_DIR "code/modules/mob/living/simple_animal" +#define FILE_DIR "code/modules/mob/living/simple_animal/friendly" +#define FILE_DIR "code/modules/mob/living/simple_animal/hostile" +#define FILE_DIR "code/modules/mob/living/simple_animal/hostile/retaliate" +#define FILE_DIR "code/modules/mob/new_player" +#define FILE_DIR "code/modules/nano" +#define FILE_DIR "code/modules/paperwork" +#define FILE_DIR "code/modules/power" +#define FILE_DIR "code/modules/power/antimatter" +#define FILE_DIR "code/modules/power/singularity" +#define FILE_DIR "code/modules/power/singularity/particle_accelerator" +#define FILE_DIR "code/modules/projectiles" +#define FILE_DIR "code/modules/projectiles/ammunition" +#define FILE_DIR "code/modules/projectiles/guns" +#define FILE_DIR "code/modules/projectiles/guns/energy" +#define FILE_DIR "code/modules/projectiles/guns/projectile" +#define FILE_DIR "code/modules/projectiles/projectile" +#define FILE_DIR "code/modules/reagents" +#define FILE_DIR "code/modules/reagents/reagent_containers" +#define FILE_DIR "code/modules/reagents/reagent_containers/food" +#define FILE_DIR "code/modules/reagents/reagent_containers/food/drinks" +#define FILE_DIR "code/modules/reagents/reagent_containers/food/drinks/bottle" +#define FILE_DIR "code/modules/reagents/reagent_containers/food/snacks" +#define FILE_DIR "code/modules/reagents/reagent_containers/glass" +#define FILE_DIR "code/modules/reagents/reagent_containers/glass/bottle" +#define FILE_DIR "code/modules/recycling" +#define FILE_DIR "code/modules/research" +#define FILE_DIR "code/modules/scripting" +#define FILE_DIR "code/modules/scripting/AST" +#define FILE_DIR "code/modules/scripting/AST/Operators" +#define FILE_DIR "code/modules/scripting/Implementations" +#define FILE_DIR "code/modules/scripting/Interpreter" +#define FILE_DIR "code/modules/scripting/Parser" +#define FILE_DIR "code/modules/scripting/Scanner" +#define FILE_DIR "code/modules/security levels" +#define FILE_DIR "code/modules/shuttle" +#define FILE_DIR "code/modules/surgery" +#define FILE_DIR "code/modules/surgery/organs" +#define FILE_DIR "code/modules/telesci" +#define FILE_DIR "code/unused" +#define FILE_DIR "code/unused/beast" +#define FILE_DIR "code/unused/computer2" +#define FILE_DIR "code/unused/disease2" +#define FILE_DIR "code/unused/gamemodes" +#define FILE_DIR "code/unused/hivebot" +#define FILE_DIR "code/unused/mining" +#define FILE_DIR "code/unused/optics" +#define FILE_DIR "code/unused/pda2" +#define FILE_DIR "code/unused/powerarmor" +#define FILE_DIR "code/unused/spacecraft" +#define FILE_DIR "code/WorkInProgress" +#define FILE_DIR "code/WorkInProgress/carn" +#define FILE_DIR "code/WorkInProgress/mapload" +#define FILE_DIR "code/WorkInProgress/organs" +#define FILE_DIR "code/WorkInProgress/Sigyn" +#define FILE_DIR "code/WorkInProgress/Sigyn/Department Sec" +#define FILE_DIR "code/WorkInProgress/Sigyn/Softcurity" +#define FILE_DIR "code/WorkInProgress/virus2" +#define FILE_DIR "html" +#define FILE_DIR "icons" +#define FILE_DIR "icons/ass" +#define FILE_DIR "icons/effects" +#define FILE_DIR "icons/mecha" +#define FILE_DIR "icons/misc" +#define FILE_DIR "icons/mob" +#define FILE_DIR "icons/obj" +#define FILE_DIR "icons/obj/assemblies" +#define FILE_DIR "icons/obj/atmospherics" +#define FILE_DIR "icons/obj/clothing" +#define FILE_DIR "icons/obj/doors" +#define FILE_DIR "icons/obj/flora" +#define FILE_DIR "icons/obj/machines" +#define FILE_DIR "icons/obj/pipes" +#define FILE_DIR "icons/obj/power_cond" +#define FILE_DIR "icons/pda_icons" +#define FILE_DIR "icons/spideros_icons" +#define FILE_DIR "icons/stamp_icons" +#define FILE_DIR "icons/Testing" +#define FILE_DIR "icons/turf" +#define FILE_DIR "icons/vending_icons" +#define FILE_DIR "interface" +#define FILE_DIR "maps" +#define FILE_DIR "maps/RandomZLevels" +#define FILE_DIR "nano" +#define FILE_DIR "nano/images" +#define FILE_DIR "sound" +#define FILE_DIR "sound/AI" +#define FILE_DIR "sound/ambience" +#define FILE_DIR "sound/effects" +#define FILE_DIR "sound/hallucinations" +#define FILE_DIR "sound/items" +#define FILE_DIR "sound/machines" +#define FILE_DIR "sound/mecha" +#define FILE_DIR "sound/misc" +#define FILE_DIR "sound/piano" +#define FILE_DIR "sound/violin" +#define FILE_DIR "sound/voice" +#define FILE_DIR "sound/voice/complionator" +#define FILE_DIR "sound/vox_fem" +#define FILE_DIR "sound/weapons" +#define FILE_DIR "tools" +#define FILE_DIR "tools/AddToChangelog" +#define FILE_DIR "tools/AddToChangelog/AddToChangelog" +#define FILE_DIR "tools/Redirector" // END_FILE_DIR // BEGIN_PREFERENCES From edb4597dfe8b18b71ae5e39385a1f7d2d4ada4a8 Mon Sep 17 00:00:00 2001 From: Laharl Montogmmery Date: Mon, 18 Nov 2013 00:01:53 +0100 Subject: [PATCH 02/12] Changelog updated. Added commit's description to changelog. --- html/changelog.html | 7 +++++++ html/longchangelog.html | 8 +++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/html/changelog.html b/html/changelog.html index 99f5340256c..56259b91a2f 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -54,6 +54,13 @@ should be listed in the changelog upon commit tho. Thanks. --> +
+

17/11/2013

+

Laharl Montgommery updated:

+
    +
  • AI can now anchor and unanchor itself. In short, it means the AI can be dragged, if it wants to.
  • +
+

15 November 2013

diff --git a/html/longchangelog.html b/html/longchangelog.html index 2985ea6b448..344caa61bf4 100644 --- a/html/longchangelog.html +++ b/html/longchangelog.html @@ -58,7 +58,13 @@ should be listed in the changelog upon commit tho. Thanks. --> - +
+

17/11/2013

+

Laharl Montgommery updated:

+
    +
  • AI can now anchor and unanchor itself. In short, it means the AI can be dragged, if it wants to.
  • +
+

29 September 2013

From 65897b4fde9d58f37d932058fd213ce0c6c17e51 Mon Sep 17 00:00:00 2001 From: Laharl Montogmmery Date: Mon, 18 Nov 2013 00:16:46 +0100 Subject: [PATCH 03/12] Corrected the date formay in the changelog. YOU SAW NOTHING! --- html/changelog.html | 2 +- html/longchangelog.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/html/changelog.html b/html/changelog.html index 56259b91a2f..a8be63132ac 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -55,7 +55,7 @@ should be listed in the changelog upon commit tho. Thanks. -->
-

17/11/2013

+

17 November 2013

Laharl Montgommery updated:

  • AI can now anchor and unanchor itself. In short, it means the AI can be dragged, if it wants to.
  • diff --git a/html/longchangelog.html b/html/longchangelog.html index 344caa61bf4..c07456e3f04 100644 --- a/html/longchangelog.html +++ b/html/longchangelog.html @@ -59,7 +59,7 @@ should be listed in the changelog upon commit tho. Thanks. -->
    -

    17/11/2013

    +

    17 November 2013

    Laharl Montgommery updated:

    • AI can now anchor and unanchor itself. In short, it means the AI can be dragged, if it wants to.
    • From 912399e756570f08b05d2210deed5e96476ae278 Mon Sep 17 00:00:00 2001 From: LaharlMontogmmery Date: Mon, 18 Nov 2013 11:46:04 +0100 Subject: [PATCH 04/12] Unanchored AIs can now be pushed and can bump. --- code/modules/mob/living/silicon/ai/ai.dm | 27 +++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index b5da208ca02..272f9179e42 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -18,7 +18,7 @@ var/list/ai_list = list() icon_state = "ai" anchored = 1 // -- TLE density = 1 - status_flags = CANSTUN|CANPARALYSE + status_flags = CANSTUN|CANPARALYSE|CANPUSH var/list/network = list("SS13") var/obj/machinery/camera/current = null var/list/connected_robots = list() @@ -266,6 +266,31 @@ var/list/ai_list = list() /mob/living/silicon/ai/update_canmove() return 0 +/mob/living/silicon/ai/Bump(atom/movable/AM as mob|obj, yes) + if ((!( yes ) || now_pushing)) + return + now_pushing = 1 + if(ismob(AM)) + var/mob/tmob = AM + if(!(tmob.status_flags & CANPUSH)) + now_pushing = 0 + return + now_pushing = 0 + ..() + if (!istype(AM, /atom/movable)) + return + if (!now_pushing) + now_pushing = 1 + if (!AM.anchored) + var/t = get_dir(src, AM) + if (istype(AM, /obj/structure/window)) + if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST) + for(var/obj/structure/window/win in get_step(AM,t)) + now_pushing = 0 + return + step(AM, t) + now_pushing = null + /mob/living/silicon/ai/proc/ai_cancel_call() set category = "AI Commands" if(src.stat == 2) From 389355f35a38f72187a85c684422b0e1a489eee6 Mon Sep 17 00:00:00 2001 From: LaharlMontogmmery Date: Mon, 18 Nov 2013 11:51:06 +0100 Subject: [PATCH 05/12] Changed tgstation.dme back to his original state. --- tgstation.dme | 242 -------------------------------------------------- 1 file changed, 242 deletions(-) diff --git a/tgstation.dme b/tgstation.dme index 8c11744cf22..a454b46ea68 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -6,248 +6,6 @@ // BEGIN_FILE_DIR #define FILE_DIR . -#define FILE_DIR "code" -#define FILE_DIR "code/__DEFINES" -#define FILE_DIR "code/__HELPERS" -#define FILE_DIR "code/_globalvars" -#define FILE_DIR "code/_globalvars/lists" -#define FILE_DIR "code/_onclick" -#define FILE_DIR "code/_onclick/hud" -#define FILE_DIR "code/ATMOSPHERICS" -#define FILE_DIR "code/ATMOSPHERICS/components" -#define FILE_DIR "code/ATMOSPHERICS/components/binary_devices" -#define FILE_DIR "code/ATMOSPHERICS/components/trinary_devices" -#define FILE_DIR "code/ATMOSPHERICS/components/unary" -#define FILE_DIR "code/controllers" -#define FILE_DIR "code/datums" -#define FILE_DIR "code/datums/diseases" -#define FILE_DIR "code/datums/diseases/advance" -#define FILE_DIR "code/datums/diseases/advance/symptoms" -#define FILE_DIR "code/datums/helper_datums" -#define FILE_DIR "code/datums/spells" -#define FILE_DIR "code/datums/wires" -#define FILE_DIR "code/defines" -#define FILE_DIR "code/defines/obj" -#define FILE_DIR "code/defines/procs" -#define FILE_DIR "code/FEA" -#define FILE_DIR "code/game" -#define FILE_DIR "code/game/area" -#define FILE_DIR "code/game/gamemodes" -#define FILE_DIR "code/game/gamemodes/blob" -#define FILE_DIR "code/game/gamemodes/blob/blobs" -#define FILE_DIR "code/game/gamemodes/changeling" -#define FILE_DIR "code/game/gamemodes/cult" -#define FILE_DIR "code/game/gamemodes/extended" -#define FILE_DIR "code/game/gamemodes/malfunction" -#define FILE_DIR "code/game/gamemodes/meteor" -#define FILE_DIR "code/game/gamemodes/nuclear" -#define FILE_DIR "code/game/gamemodes/revolution" -#define FILE_DIR "code/game/gamemodes/sandbox" -#define FILE_DIR "code/game/gamemodes/traitor" -#define FILE_DIR "code/game/gamemodes/wizard" -#define FILE_DIR "code/game/jobs" -#define FILE_DIR "code/game/jobs/job" -#define FILE_DIR "code/game/machinery" -#define FILE_DIR "code/game/machinery/atmoalter" -#define FILE_DIR "code/game/machinery/bots" -#define FILE_DIR "code/game/machinery/camera" -#define FILE_DIR "code/game/machinery/computer" -#define FILE_DIR "code/game/machinery/doors" -#define FILE_DIR "code/game/machinery/embedded_controller" -#define FILE_DIR "code/game/machinery/kitchen" -#define FILE_DIR "code/game/machinery/pipe" -#define FILE_DIR "code/game/machinery/telecomms" -#define FILE_DIR "code/game/mecha" -#define FILE_DIR "code/game/mecha/combat" -#define FILE_DIR "code/game/mecha/equipment" -#define FILE_DIR "code/game/mecha/equipment/tools" -#define FILE_DIR "code/game/mecha/equipment/weapons" -#define FILE_DIR "code/game/mecha/medical" -#define FILE_DIR "code/game/mecha/working" -#define FILE_DIR "code/game/objects" -#define FILE_DIR "code/game/objects/effects" -#define FILE_DIR "code/game/objects/effects/decals" -#define FILE_DIR "code/game/objects/effects/decals/Cleanable" -#define FILE_DIR "code/game/objects/effects/spawners" -#define FILE_DIR "code/game/objects/items" -#define FILE_DIR "code/game/objects/items/devices" -#define FILE_DIR "code/game/objects/items/devices/PDA" -#define FILE_DIR "code/game/objects/items/devices/radio" -#define FILE_DIR "code/game/objects/items/robot" -#define FILE_DIR "code/game/objects/items/stacks" -#define FILE_DIR "code/game/objects/items/stacks/sheets" -#define FILE_DIR "code/game/objects/items/stacks/tiles" -#define FILE_DIR "code/game/objects/items/weapons" -#define FILE_DIR "code/game/objects/items/weapons/grenades" -#define FILE_DIR "code/game/objects/items/weapons/implants" -#define FILE_DIR "code/game/objects/items/weapons/melee" -#define FILE_DIR "code/game/objects/items/weapons/storage" -#define FILE_DIR "code/game/objects/items/weapons/tanks" -#define FILE_DIR "code/game/objects/structures" -#define FILE_DIR "code/game/objects/structures/crates_lockers" -#define FILE_DIR "code/game/objects/structures/crates_lockers/closets" -#define FILE_DIR "code/game/objects/structures/crates_lockers/closets/secure" -#define FILE_DIR "code/game/objects/structures/stool_bed_chair_nest" -#define FILE_DIR "code/game/turfs" -#define FILE_DIR "code/game/turfs/simulated" -#define FILE_DIR "code/game/turfs/space" -#define FILE_DIR "code/game/turfs/unsimulated" -#define FILE_DIR "code/game/verbs" -#define FILE_DIR "code/js" -#define FILE_DIR "code/LINDA" -#define FILE_DIR "code/modules" -#define FILE_DIR "code/modules/admin" -#define FILE_DIR "code/modules/admin/DB ban" -#define FILE_DIR "code/modules/admin/permissionverbs" -#define FILE_DIR "code/modules/admin/verbs" -#define FILE_DIR "code/modules/assembly" -#define FILE_DIR "code/modules/awaymissions" -#define FILE_DIR "code/modules/awaymissions/maploader" -#define FILE_DIR "code/modules/client" -#define FILE_DIR "code/modules/clothing" -#define FILE_DIR "code/modules/clothing/glasses" -#define FILE_DIR "code/modules/clothing/gloves" -#define FILE_DIR "code/modules/clothing/head" -#define FILE_DIR "code/modules/clothing/masks" -#define FILE_DIR "code/modules/clothing/shoes" -#define FILE_DIR "code/modules/clothing/spacesuits" -#define FILE_DIR "code/modules/clothing/suits" -#define FILE_DIR "code/modules/clothing/under" -#define FILE_DIR "code/modules/clothing/under/jobs" -#define FILE_DIR "code/modules/detectivework" -#define FILE_DIR "code/modules/events" -#define FILE_DIR "code/modules/events/holiday" -#define FILE_DIR "code/modules/flufftext" -#define FILE_DIR "code/modules/food" -#define FILE_DIR "code/modules/hydroponics" -#define FILE_DIR "code/modules/library" -#define FILE_DIR "code/modules/mining" -#define FILE_DIR "code/modules/mining/laborcamp" -#define FILE_DIR "code/modules/mob" -#define FILE_DIR "code/modules/mob/camera" -#define FILE_DIR "code/modules/mob/dead" -#define FILE_DIR "code/modules/mob/dead/observer" -#define FILE_DIR "code/modules/mob/living" -#define FILE_DIR "code/modules/mob/living/carbon" -#define FILE_DIR "code/modules/mob/living/carbon/alien" -#define FILE_DIR "code/modules/mob/living/carbon/alien/humanoid" -#define FILE_DIR "code/modules/mob/living/carbon/alien/humanoid/caste" -#define FILE_DIR "code/modules/mob/living/carbon/alien/larva" -#define FILE_DIR "code/modules/mob/living/carbon/alien/special" -#define FILE_DIR "code/modules/mob/living/carbon/brain" -#define FILE_DIR "code/modules/mob/living/carbon/human" -#define FILE_DIR "code/modules/mob/living/carbon/metroid" -#define FILE_DIR "code/modules/mob/living/carbon/monkey" -#define FILE_DIR "code/modules/mob/living/silicon" -#define FILE_DIR "code/modules/mob/living/silicon/ai" -#define FILE_DIR "code/modules/mob/living/silicon/ai/freelook" -#define FILE_DIR "code/modules/mob/living/silicon/decoy" -#define FILE_DIR "code/modules/mob/living/silicon/pai" -#define FILE_DIR "code/modules/mob/living/silicon/robot" -#define FILE_DIR "code/modules/mob/living/simple_animal" -#define FILE_DIR "code/modules/mob/living/simple_animal/friendly" -#define FILE_DIR "code/modules/mob/living/simple_animal/hostile" -#define FILE_DIR "code/modules/mob/living/simple_animal/hostile/retaliate" -#define FILE_DIR "code/modules/mob/new_player" -#define FILE_DIR "code/modules/nano" -#define FILE_DIR "code/modules/paperwork" -#define FILE_DIR "code/modules/power" -#define FILE_DIR "code/modules/power/antimatter" -#define FILE_DIR "code/modules/power/singularity" -#define FILE_DIR "code/modules/power/singularity/particle_accelerator" -#define FILE_DIR "code/modules/projectiles" -#define FILE_DIR "code/modules/projectiles/ammunition" -#define FILE_DIR "code/modules/projectiles/guns" -#define FILE_DIR "code/modules/projectiles/guns/energy" -#define FILE_DIR "code/modules/projectiles/guns/projectile" -#define FILE_DIR "code/modules/projectiles/projectile" -#define FILE_DIR "code/modules/reagents" -#define FILE_DIR "code/modules/reagents/reagent_containers" -#define FILE_DIR "code/modules/reagents/reagent_containers/food" -#define FILE_DIR "code/modules/reagents/reagent_containers/food/drinks" -#define FILE_DIR "code/modules/reagents/reagent_containers/food/drinks/bottle" -#define FILE_DIR "code/modules/reagents/reagent_containers/food/snacks" -#define FILE_DIR "code/modules/reagents/reagent_containers/glass" -#define FILE_DIR "code/modules/reagents/reagent_containers/glass/bottle" -#define FILE_DIR "code/modules/recycling" -#define FILE_DIR "code/modules/research" -#define FILE_DIR "code/modules/scripting" -#define FILE_DIR "code/modules/scripting/AST" -#define FILE_DIR "code/modules/scripting/AST/Operators" -#define FILE_DIR "code/modules/scripting/Implementations" -#define FILE_DIR "code/modules/scripting/Interpreter" -#define FILE_DIR "code/modules/scripting/Parser" -#define FILE_DIR "code/modules/scripting/Scanner" -#define FILE_DIR "code/modules/security levels" -#define FILE_DIR "code/modules/shuttle" -#define FILE_DIR "code/modules/surgery" -#define FILE_DIR "code/modules/surgery/organs" -#define FILE_DIR "code/modules/telesci" -#define FILE_DIR "code/unused" -#define FILE_DIR "code/unused/beast" -#define FILE_DIR "code/unused/computer2" -#define FILE_DIR "code/unused/disease2" -#define FILE_DIR "code/unused/gamemodes" -#define FILE_DIR "code/unused/hivebot" -#define FILE_DIR "code/unused/mining" -#define FILE_DIR "code/unused/optics" -#define FILE_DIR "code/unused/pda2" -#define FILE_DIR "code/unused/powerarmor" -#define FILE_DIR "code/unused/spacecraft" -#define FILE_DIR "code/WorkInProgress" -#define FILE_DIR "code/WorkInProgress/carn" -#define FILE_DIR "code/WorkInProgress/mapload" -#define FILE_DIR "code/WorkInProgress/organs" -#define FILE_DIR "code/WorkInProgress/Sigyn" -#define FILE_DIR "code/WorkInProgress/Sigyn/Department Sec" -#define FILE_DIR "code/WorkInProgress/Sigyn/Softcurity" -#define FILE_DIR "code/WorkInProgress/virus2" -#define FILE_DIR "html" -#define FILE_DIR "icons" -#define FILE_DIR "icons/ass" -#define FILE_DIR "icons/effects" -#define FILE_DIR "icons/mecha" -#define FILE_DIR "icons/misc" -#define FILE_DIR "icons/mob" -#define FILE_DIR "icons/obj" -#define FILE_DIR "icons/obj/assemblies" -#define FILE_DIR "icons/obj/atmospherics" -#define FILE_DIR "icons/obj/clothing" -#define FILE_DIR "icons/obj/doors" -#define FILE_DIR "icons/obj/flora" -#define FILE_DIR "icons/obj/machines" -#define FILE_DIR "icons/obj/pipes" -#define FILE_DIR "icons/obj/power_cond" -#define FILE_DIR "icons/pda_icons" -#define FILE_DIR "icons/spideros_icons" -#define FILE_DIR "icons/stamp_icons" -#define FILE_DIR "icons/Testing" -#define FILE_DIR "icons/turf" -#define FILE_DIR "icons/vending_icons" -#define FILE_DIR "interface" -#define FILE_DIR "maps" -#define FILE_DIR "maps/RandomZLevels" -#define FILE_DIR "nano" -#define FILE_DIR "nano/images" -#define FILE_DIR "sound" -#define FILE_DIR "sound/AI" -#define FILE_DIR "sound/ambience" -#define FILE_DIR "sound/effects" -#define FILE_DIR "sound/hallucinations" -#define FILE_DIR "sound/items" -#define FILE_DIR "sound/machines" -#define FILE_DIR "sound/mecha" -#define FILE_DIR "sound/misc" -#define FILE_DIR "sound/piano" -#define FILE_DIR "sound/violin" -#define FILE_DIR "sound/voice" -#define FILE_DIR "sound/voice/complionator" -#define FILE_DIR "sound/vox_fem" -#define FILE_DIR "sound/weapons" -#define FILE_DIR "tools" -#define FILE_DIR "tools/AddToChangelog" -#define FILE_DIR "tools/AddToChangelog/AddToChangelog" -#define FILE_DIR "tools/Redirector" // END_FILE_DIR // BEGIN_PREFERENCES From fbf6f7485aacc6dd258691bc5b1eee944f0b66cf Mon Sep 17 00:00:00 2001 From: Laharl Montogmmery Date: Tue, 19 Nov 2013 00:20:58 +0100 Subject: [PATCH 06/12] Prototype of Ai tracking in MALF. Need help for testing. I have currently in need of help for testing out the strings I added in malf mode, as I'm having trouble booting up the game mode properly. --- code/game/gamemodes/malfunction/malfunction.dm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/code/game/gamemodes/malfunction/malfunction.dm b/code/game/gamemodes/malfunction/malfunction.dm index fddf35569ae..dc59a9b331c 100644 --- a/code/game/gamemodes/malfunction/malfunction.dm +++ b/code/game/gamemodes/malfunction/malfunction.dm @@ -5,7 +5,7 @@ name = "AI malfunction" config_tag = "malfunction" antag_flag = BE_MALF - required_players = 20 + required_players = 0 required_enemies = 1 recommended_enemies = 1 pre_setup_before_jobs = 1 @@ -31,7 +31,7 @@ //Triumvirate? if (ticker.triai == 1) required_enemies = 3 - required_players = max(required_enemies+1, required_players) //to prevent issues if players are set too low + //required_players = max(required_enemies+1, required_players) //to prevent issues if players are set too low return ..() /datum/game_mode/malfunction/get_players_for_role(var/role = BE_MALF) @@ -187,6 +187,12 @@ command_alert("Hostile runtimes detected in all station systems, please deactivate your AI to prevent possible damage to its morality core.", "Anomaly Alert") set_security_level("delta") + for(var/obj/item/weapon/pinpointer/point in world) + for(var/datum/mind/AI_mind in malf_ai) + var/mob/living/silicon/ai/A = AI_mind.current // the current mob the mind owns + if(A.stat != DEAD) + point.the_disk = A + ticker.mode:malf_mode_declared = 1 for(var/datum/mind/AI_mind in ticker.mode:malf_ai) AI_mind.current.verbs -= /datum/game_mode/malfunction/proc/takeover From af59eb54f8434564fec985405c5db0e8aeaecc01 Mon Sep 17 00:00:00 2001 From: Laharl Montogmmery Date: Tue, 19 Nov 2013 19:37:10 +0100 Subject: [PATCH 07/12] Removed comment, and indented a line in malf.dm. This was muckin' with the normal can_start() due to a missing, it should make future MALF test easier now. --- code/game/gamemodes/malfunction/malfunction.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/gamemodes/malfunction/malfunction.dm b/code/game/gamemodes/malfunction/malfunction.dm index dc59a9b331c..cda82e11072 100644 --- a/code/game/gamemodes/malfunction/malfunction.dm +++ b/code/game/gamemodes/malfunction/malfunction.dm @@ -31,7 +31,7 @@ //Triumvirate? if (ticker.triai == 1) required_enemies = 3 - //required_players = max(required_enemies+1, required_players) //to prevent issues if players are set too low + required_players = max(required_enemies+1, required_players) //to prevent issues if players are set too low return ..() /datum/game_mode/malfunction/get_players_for_role(var/role = BE_MALF) From ec8f753545bd2ec6b94ef10406c26c2087ed77df Mon Sep 17 00:00:00 2001 From: Laharl Montogmmery Date: Wed, 20 Nov 2013 00:11:27 +0100 Subject: [PATCH 08/12] Delta : Pinpointer now points toward the AI. Pinpointer now points in the malf AI direction (so it won't track innocent AIs), and follow it through shunting, or if it goes back to its core after shunting. Bloody hell was it a pain to just test that. --- code/game/gamemodes/malfunction/malfunction.dm | 6 +++--- code/modules/power/apc.dm | 10 +++++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/code/game/gamemodes/malfunction/malfunction.dm b/code/game/gamemodes/malfunction/malfunction.dm index cda82e11072..f0a078f313c 100644 --- a/code/game/gamemodes/malfunction/malfunction.dm +++ b/code/game/gamemodes/malfunction/malfunction.dm @@ -5,7 +5,7 @@ name = "AI malfunction" config_tag = "malfunction" antag_flag = BE_MALF - required_players = 0 + required_players = 20 required_enemies = 1 recommended_enemies = 1 pre_setup_before_jobs = 1 @@ -188,10 +188,10 @@ set_security_level("delta") for(var/obj/item/weapon/pinpointer/point in world) - for(var/datum/mind/AI_mind in malf_ai) + for(var/datum/mind/AI_mind in ticker.mode.malf_ai) var/mob/living/silicon/ai/A = AI_mind.current // the current mob the mind owns if(A.stat != DEAD) - point.the_disk = A + point.the_disk = A //The pinpointer now tracks the AI core. ticker.mode:malf_mode_declared = 1 for(var/datum/mind/AI_mind in ticker.mode:malf_ai) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index df608c245bd..1a1b1cddefc 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -791,6 +791,11 @@ src.occupant.parent.adjustOxyLoss(src.occupant.getOxyLoss()) src.occupant.parent.cancel_camera() del(src.occupant) + for(var/obj/item/weapon/pinpointer/point in world) + for(var/datum/mind/AI_mind in ticker.mode.malf_ai) + var/mob/living/silicon/ai/A = AI_mind.current // the current mob the mind owns + if(A.stat != DEAD) + point.the_disk = A //The pinpointer tracks the AI back into its core. else src.occupant << "\red Primary core damaged, unable to return core processes." @@ -798,9 +803,8 @@ src.occupant.loc = src.loc src.occupant.death() src.occupant.gib() - - for(var/obj/item/weapon/pinpointer/point in world) - point.the_disk = null //the pinpointer will go back to pointing at the nuke disc. + for(var/obj/item/weapon/pinpointer/point in world) + point.the_disk = null //the pinpointer will go back to pointing at the nuke disc. /obj/machinery/power/apc/proc/ion_act() From d008bbb5ffb979d56c190f35d503577aa3f884b4 Mon Sep 17 00:00:00 2001 From: Laharl Montogmmery Date: Wed, 20 Nov 2013 00:22:10 +0100 Subject: [PATCH 09/12] A lil' bit of commenting. Who the hell reads those commit comments anyway? --- code/modules/mob/living/silicon/ai/ai.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 272f9179e42..e96d2f185bd 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -263,10 +263,10 @@ var/list/ai_list = list() src << "[anchored ? "You are now anchored." : "You are now unanchored."]" // the message in the [] will change depending whether or not the AI is anchored -/mob/living/silicon/ai/update_canmove() +/mob/living/silicon/ai/update_canmove() //If the AI dies, mobs won't go through it anymore return 0 -/mob/living/silicon/ai/Bump(atom/movable/AM as mob|obj, yes) +/mob/living/silicon/ai/Bump(atom/movable/AM as mob|obj, yes) //Allows the AI to bump into mobs if it's itself pushed if ((!( yes ) || now_pushing)) return now_pushing = 1 From b50b1d56335d263157209030ae9f8bf4ecf803f6 Mon Sep 17 00:00:00 2001 From: Laharl Montogmmery Date: Wed, 20 Nov 2013 14:31:16 +0100 Subject: [PATCH 10/12] Moved up Bump() in silicon.dm, and tested it. According to my tests, unachored AI and Borgs behave as normal when bumped by a mob. A human can swap places with a borg if both have help intent on when moving... But a borg can't swap places with a human if both have help intent on, if it's the borg that's moving. Apparently it's a normal behavior, tested it on Sibyl. AI don't have intents so they just get pushed. pAIs aren't affected by bump, as they seem to act like as objects when walked over or thrown. Decoys seems to be some old MALF module that isn't in use anymore, so I didn't touch it. --- code/modules/mob/living/silicon/ai/ai.dm | 25 ----------------- .../modules/mob/living/silicon/robot/robot.dm | 26 ------------------ code/modules/mob/living/silicon/silicon.dm | 27 ++++++++++++++++++- 3 files changed, 26 insertions(+), 52 deletions(-) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index e96d2f185bd..ad7d3a54f22 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -266,31 +266,6 @@ var/list/ai_list = list() /mob/living/silicon/ai/update_canmove() //If the AI dies, mobs won't go through it anymore return 0 -/mob/living/silicon/ai/Bump(atom/movable/AM as mob|obj, yes) //Allows the AI to bump into mobs if it's itself pushed - if ((!( yes ) || now_pushing)) - return - now_pushing = 1 - if(ismob(AM)) - var/mob/tmob = AM - if(!(tmob.status_flags & CANPUSH)) - now_pushing = 0 - return - now_pushing = 0 - ..() - if (!istype(AM, /atom/movable)) - return - if (!now_pushing) - now_pushing = 1 - if (!AM.anchored) - var/t = get_dir(src, AM) - if (istype(AM, /obj/structure/window)) - if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST) - for(var/obj/structure/window/win in get_step(AM,t)) - now_pushing = 0 - return - step(AM, t) - now_pushing = null - /mob/living/silicon/ai/proc/ai_cancel_call() set category = "AI Commands" if(src.stat == 2) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 8048a536def..d304938bd40 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -339,32 +339,6 @@ if(prob(75) && Proj.damage > 0) spark_system.start() return 2 - -/mob/living/silicon/robot/Bump(atom/movable/AM as mob|obj, yes) - if ((!( yes ) || now_pushing)) - return - now_pushing = 1 - if(ismob(AM)) - var/mob/tmob = AM - if(!(tmob.status_flags & CANPUSH)) - now_pushing = 0 - return - now_pushing = 0 - ..() - if (!istype(AM, /atom/movable)) - return - if (!now_pushing) - now_pushing = 1 - if (!AM.anchored) - var/t = get_dir(src, AM) - if (istype(AM, /obj/structure/window)) - if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST) - for(var/obj/structure/window/win in get_step(AM,t)) - now_pushing = 0 - return - step(AM, t) - now_pushing = null - /mob/living/silicon/robot/triggerAlarm(var/class, area/A, var/O, var/alarmsource) if (stat == 2) return 1 diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index 62f4791ae0e..d1e95a6fea6 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -253,4 +253,29 @@ number++ list += {"

      State Laws"} - usr << browse(list, "window=laws") \ No newline at end of file + usr << browse(list, "window=laws") + +/mob/living/silicon/Bump(atom/movable/AM as mob|obj, yes) //Allows the AI to bump into mobs if it's itself pushed + if ((!( yes ) || now_pushing)) + return + now_pushing = 1 + if(ismob(AM)) + var/mob/tmob = AM + if(!(tmob.status_flags & CANPUSH)) + now_pushing = 0 + return + now_pushing = 0 + ..() + if (!istype(AM, /atom/movable)) + return + if (!now_pushing) + now_pushing = 1 + if (!AM.anchored) + var/t = get_dir(src, AM) + if (istype(AM, /obj/structure/window)) + if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST) + for(var/obj/structure/window/win in get_step(AM,t)) + now_pushing = 0 + return + step(AM, t) + now_pushing = null \ No newline at end of file From c9649138e64b0379c4f8854cdaf53dc71100aeee Mon Sep 17 00:00:00 2001 From: Laharl Montogmmery Date: Wed, 20 Nov 2013 23:07:36 +0100 Subject: [PATCH 11/12] Add a check for Delta in the shunt tracking code. This is to avoid the AI being tracked by the pinpointer before Delta is triggered. --- code/modules/power/apc.dm | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 1a1b1cddefc..57904fde91b 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -778,9 +778,9 @@ src.occupant.verbs += /mob/living/silicon/ai/proc/corereturn src.occupant.verbs += /datum/game_mode/malfunction/proc/takeover src.occupant.cancel_camera() - - for(var/obj/item/weapon/pinpointer/point in world) - point.the_disk = src //the pinpointer will detect the shunted AI + if (seclevel2num(get_security_level()) == SEC_LEVEL_DELTA) + for(var/obj/item/weapon/pinpointer/point in world) + point.the_disk = src //the pinpointer will detect the shunted AI /obj/machinery/power/apc/proc/malfvacate(var/forced) @@ -791,11 +791,12 @@ src.occupant.parent.adjustOxyLoss(src.occupant.getOxyLoss()) src.occupant.parent.cancel_camera() del(src.occupant) - for(var/obj/item/weapon/pinpointer/point in world) - for(var/datum/mind/AI_mind in ticker.mode.malf_ai) - var/mob/living/silicon/ai/A = AI_mind.current // the current mob the mind owns - if(A.stat != DEAD) - point.the_disk = A //The pinpointer tracks the AI back into its core. + if (seclevel2num(get_security_level()) == SEC_LEVEL_DELTA) + for(var/obj/item/weapon/pinpointer/point in world) + for(var/datum/mind/AI_mind in ticker.mode.malf_ai) + var/mob/living/silicon/ai/A = AI_mind.current // the current mob the mind owns + if(A.stat != DEAD) + point.the_disk = A //The pinpointer tracks the AI back into its core. else src.occupant << "\red Primary core damaged, unable to return core processes." From 55387d293defe16ae6e73f37247ce0bf6fd47fb6 Mon Sep 17 00:00:00 2001 From: Laharl Montogmmery Date: Thu, 21 Nov 2013 16:34:20 +0100 Subject: [PATCH 12/12] Kaze's Req : inactive AIs are wrenchable. Wrench an inactive AI core, and you can drag it around. Tested it, AI can be carded in when you are dragging the core, or carded out. --- code/game/machinery/computer/ai_core.dm | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/code/game/machinery/computer/ai_core.dm b/code/game/machinery/computer/ai_core.dm index 7a9b02e5b6a..4a60b8b387a 100644 --- a/code/game/machinery/computer/ai_core.dm +++ b/code/game/machinery/computer/ai_core.dm @@ -175,10 +175,21 @@ anchored = 1 state = 20//So it doesn't interact based on the above. Not really necessary. - attackby(var/obj/item/device/aicard/A as obj, var/mob/user as mob) - if(istype(A, /obj/item/device/aicard))//Is it? - A.transfer_ai("INACTIVE","AICARD",src,user) - return +/obj/structure/AIcore/deactivated/attackby(var/obj/item/A as obj, var/mob/user as mob) + if(istype(A, /obj/item/device/aicard))//Is it? + A.transfer_ai("INACTIVE","AICARD",src,user) + if(istype(A, /obj/item/weapon/wrench)) + playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) + switch(anchored) + if(0) + if(do_after(user, 20)) + user << "\blue You wrench the core into place." + anchored = 1 + if(1) + if(do_after(user, 20)) + user << "\blue You unfasten the core." + anchored = 0 + return /* This is a good place for AI-related object verbs so I'm sticking it here.