Merge pull request #16044 from SandPoot/ai-+-mech

Makes AIs deconstructable
This commit is contained in:
deathride58
2023-12-23 02:47:49 -05:00
committed by GitHub
99 changed files with 951 additions and 557 deletions
+1 -1
View File
@@ -147,7 +147,7 @@
/turf/open/floor/engine,
/area/ruin/powered)
"I" = (
/obj/item/aiModule/toyAI,
/obj/item/ai_module/toyAI,
/turf/open/floor/engine,
/area/ruin/powered)
"J" = (
+11 -11
View File
@@ -21695,7 +21695,7 @@
/area/command/meeting_room)
"bbj" = (
/obj/structure/table,
/obj/item/aiModule/reset,
/obj/item/ai_module/reset,
/obj/machinery/light{
dir = 8
},
@@ -21981,7 +21981,7 @@
/area/command/meeting_room)
"bce" = (
/obj/structure/table,
/obj/item/aiModule/supplied/quarantine,
/obj/item/ai_module/supplied/quarantine,
/obj/machinery/camera/motion{
c_tag = "AI Upload Chamber - West";
dir = 4;
@@ -21998,7 +21998,7 @@
/area/ai_monitored/turret_protected/ai_upload)
"bcg" = (
/obj/structure/table,
/obj/item/aiModule/supplied/freeform,
/obj/item/ai_module/supplied/freeform,
/obj/structure/sign/plaques/kiddie{
pixel_x = 32
},
@@ -22674,8 +22674,8 @@
/area/maintenance/port)
"beb" = (
/obj/structure/table,
/obj/item/aiModule/core/full/asimov,
/obj/item/aiModule/core/freeformcore,
/obj/item/ai_module/core/full/asimov,
/obj/item/ai_module/core/freeformcore,
/obj/machinery/door/window{
base_state = "right";
dir = 4;
@@ -22692,7 +22692,7 @@
/obj/structure/window/reinforced{
dir = 8
},
/obj/item/aiModule/core/full/custom,
/obj/item/ai_module/core/full/custom,
/turf/open/floor/plasteel/dark,
/area/ai_monitored/turret_protected/ai_upload)
"bec" = (
@@ -22734,14 +22734,14 @@
/area/ai_monitored/turret_protected/ai_upload)
"beg" = (
/obj/structure/table,
/obj/item/aiModule/supplied/oxygen,
/obj/item/aiModule/zeroth/oneHuman,
/obj/item/ai_module/supplied/oxygen,
/obj/item/ai_module/zeroth/oneHuman,
/obj/machinery/door/window{
dir = 8;
name = "High-Risk Modules";
req_access_txt = "20"
},
/obj/item/aiModule/reset/purge,
/obj/item/ai_module/reset/purge,
/obj/structure/window/reinforced,
/obj/effect/spawner/lootdrop/aimodule_harmful,
/obj/structure/window/reinforced{
@@ -22750,7 +22750,7 @@
/obj/structure/window/reinforced{
dir = 4
},
/obj/item/aiModule/supplied/protectStation,
/obj/item/ai_module/supplied/protectStation,
/turf/open/floor/plasteel/dark,
/area/ai_monitored/turret_protected/ai_upload)
"beh" = (
@@ -34141,7 +34141,7 @@
"bEX" = (
/obj/structure/table,
/obj/item/aicard,
/obj/item/aiModule/reset,
/obj/item/ai_module/reset,
/obj/structure/cable{
icon_state = "1-2"
},
+10 -10
View File
@@ -23661,14 +23661,14 @@
dir = 4;
light_color = "#e8eaff"
},
/obj/item/aiModule/reset/purge{
/obj/item/ai_module/reset/purge{
pixel_y = 6
},
/obj/item/aiModule/reset{
/obj/item/ai_module/reset{
pixel_x = -2;
pixel_y = 4
},
/obj/item/aiModule/core/full/custom{
/obj/item/ai_module/core/full/custom{
pixel_x = -4
},
/obj/machinery/status_display{
@@ -24172,7 +24172,7 @@
/obj/effect/turf_decal/tile/blue{
dir = 4
},
/obj/item/aiModule/core/full/asimov{
/obj/item/ai_module/core/full/asimov{
pixel_x = 2;
pixel_y = 10
},
@@ -24183,11 +24183,11 @@
/obj/effect/spawner/lootdrop/aimodule_harmless{
pixel_y = 6
},
/obj/item/aiModule/core/freeformcore{
/obj/item/ai_module/core/freeformcore{
pixel_x = -1;
pixel_y = 2
},
/obj/item/aiModule/supplied/freeform{
/obj/item/ai_module/supplied/freeform{
pixel_x = -2
},
/obj/structure/cable{
@@ -38060,22 +38060,22 @@
/obj/effect/turf_decal/tile/blue{
dir = 4
},
/obj/item/aiModule/supplied/oxygen{
/obj/item/ai_module/supplied/oxygen{
pixel_x = 2;
pixel_y = 10
},
/obj/item/aiModule/supplied/quarantine{
/obj/item/ai_module/supplied/quarantine{
pixel_x = 1;
pixel_y = 8
},
/obj/item/aiModule/zeroth/oneHuman{
/obj/item/ai_module/zeroth/oneHuman{
pixel_y = 4
},
/obj/effect/spawner/lootdrop/aimodule_harmful{
pixel_x = -1;
pixel_y = 2
},
/obj/item/aiModule/supplied/protectStation{
/obj/item/ai_module/supplied/protectStation{
pixel_x = -2
},
/turf/open/floor/plasteel,
+11 -11
View File
@@ -29754,7 +29754,7 @@
lootcount = 2;
lootdoubles = 0
},
/obj/item/aiModule/supplied/oxygen{
/obj/item/ai_module/supplied/oxygen{
pixel_x = -3;
pixel_y = -3
},
@@ -30359,12 +30359,12 @@
req_access_txt = "20"
},
/obj/structure/window/reinforced,
/obj/item/aiModule/core/freeformcore{
/obj/item/ai_module/core/freeformcore{
pixel_x = 3;
pixel_y = 3
},
/obj/item/aiModule/core/full/custom,
/obj/item/aiModule/core/full/asimov{
/obj/item/ai_module/core/full/custom,
/obj/item/ai_module/core/full/asimov{
pixel_x = -3;
pixel_y = -3
},
@@ -30464,12 +30464,12 @@
req_access_txt = "20"
},
/obj/structure/window/reinforced,
/obj/item/aiModule/supplied/protectStation{
/obj/item/ai_module/supplied/protectStation{
pixel_x = 3;
pixel_y = 3
},
/obj/item/aiModule/zeroth/oneHuman,
/obj/item/aiModule/reset/purge{
/obj/item/ai_module/zeroth/oneHuman,
/obj/item/ai_module/reset/purge{
pixel_x = -3;
pixel_y = -3
},
@@ -31513,7 +31513,7 @@
/area/security/brig)
"ckn" = (
/obj/structure/table/reinforced,
/obj/item/aiModule/reset,
/obj/item/ai_module/reset,
/obj/item/radio/intercom{
name = "Station Intercom";
pixel_x = -26
@@ -31586,7 +31586,7 @@
/area/ai_monitored/turret_protected/ai_upload)
"ckt" = (
/obj/structure/table/reinforced,
/obj/item/aiModule/supplied/quarantine,
/obj/item/ai_module/supplied/quarantine,
/obj/item/radio/intercom{
broadcasting = 1;
frequency = 1447;
@@ -32125,7 +32125,7 @@
/area/security/range)
"clM" = (
/obj/structure/table/reinforced,
/obj/item/aiModule/supplied/freeform,
/obj/item/ai_module/supplied/freeform,
/obj/effect/turf_decal/tile/neutral{
dir = 1
},
@@ -72976,7 +72976,7 @@
/area/service/theater)
"eNu" = (
/obj/structure/table/reinforced,
/obj/item/aiModule/reset,
/obj/item/ai_module/reset,
/obj/item/assembly/flash/handheld,
/obj/item/assembly/flash/handheld,
/obj/effect/turf_decal/bot,
+10 -10
View File
@@ -254,8 +254,8 @@
/area/edina)
"aaT" = (
/obj/structure/table,
/obj/item/aiModule/core/full/asimov,
/obj/item/aiModule/core/freeformcore,
/obj/item/ai_module/core/full/asimov,
/obj/item/ai_module/core/freeformcore,
/obj/machinery/door/window{
base_state = "right";
dir = 4;
@@ -272,7 +272,7 @@
/obj/structure/window/reinforced{
dir = 8
},
/obj/item/aiModule/core/full/custom,
/obj/item/ai_module/core/full/custom,
/turf/open/floor/plasteel/dark,
/area/ai_monitored/turret_protected/ai_upload)
"aaU" = (
@@ -280,7 +280,7 @@
/area/ai_monitored/turret_protected/ai_upload)
"aaV" = (
/obj/structure/table,
/obj/item/aiModule/supplied/quarantine,
/obj/item/ai_module/supplied/quarantine,
/obj/machinery/camera/motion,
/obj/machinery/light{
dir = 1;
@@ -296,7 +296,7 @@
/area/edina/street/secondary/command)
"aaX" = (
/obj/structure/table,
/obj/item/aiModule/reset,
/obj/item/ai_module/reset,
/turf/open/floor/plasteel/dark,
/area/ai_monitored/turret_protected/ai_upload)
"aaY" = (
@@ -659,16 +659,16 @@
/obj/structure/window/reinforced{
dir = 8
},
/obj/item/aiModule/supplied/oxygen,
/obj/item/aiModule/zeroth/oneHuman,
/obj/item/aiModule/reset/purge,
/obj/item/ai_module/supplied/oxygen,
/obj/item/ai_module/zeroth/oneHuman,
/obj/item/ai_module/reset/purge,
/obj/effect/spawner/lootdrop/aimodule_harmful,
/obj/item/aiModule/supplied/protectStation,
/obj/item/ai_module/supplied/protectStation,
/turf/open/floor/plasteel/dark,
/area/ai_monitored/turret_protected/ai_upload)
"abS" = (
/obj/structure/table,
/obj/item/aiModule/supplied/freeform,
/obj/item/ai_module/supplied/freeform,
/obj/machinery/camera/motion{
c_tag = "MiniSat Foyer";
dir = 1;
+11 -11
View File
@@ -41120,12 +41120,12 @@
name = "Core Modules";
req_access_txt = "20"
},
/obj/item/aiModule/core/freeformcore{
/obj/item/ai_module/core/freeformcore{
pixel_x = 3;
pixel_y = 3
},
/obj/item/aiModule/core/full/custom,
/obj/item/aiModule/core/full/asimov{
/obj/item/ai_module/core/full/custom,
/obj/item/ai_module/core/full/asimov{
pixel_x = -3;
pixel_y = -3
},
@@ -43936,12 +43936,12 @@
name = "Core Modules";
req_access_txt = "20"
},
/obj/item/aiModule/supplied/protectStation{
/obj/item/ai_module/supplied/protectStation{
pixel_x = 3;
pixel_y = 3
},
/obj/item/aiModule/zeroth/oneHuman,
/obj/item/aiModule/reset/purge{
/obj/item/ai_module/zeroth/oneHuman,
/obj/item/ai_module/reset/purge{
pixel_x = -3;
pixel_y = -3
},
@@ -47627,7 +47627,7 @@
/area/commons/fitness/recreation)
"byM" = (
/obj/structure/table,
/obj/item/aiModule/reset,
/obj/item/ai_module/reset,
/obj/effect/decal/cleanable/cobweb/cobweb2,
/obj/machinery/flasher{
id = "AI";
@@ -47680,7 +47680,7 @@
lootcount = 2;
lootdoubles = 0
},
/obj/item/aiModule/supplied/oxygen{
/obj/item/ai_module/supplied/oxygen{
pixel_x = -3;
pixel_y = -3
},
@@ -47852,7 +47852,7 @@
/area/commons/toilet/restrooms)
"bzb" = (
/obj/structure/table,
/obj/item/aiModule/supplied/freeform,
/obj/item/ai_module/supplied/freeform,
/turf/open/floor/circuit/green{
luminosity = 2
},
@@ -48043,7 +48043,7 @@
/area/ai_monitored/turret_protected/ai_upload)
"bzr" = (
/obj/structure/table,
/obj/item/aiModule/supplied/quarantine,
/obj/item/ai_module/supplied/quarantine,
/obj/machinery/flasher{
id = "AI";
name = "Meatbag Pacifier";
@@ -50899,7 +50899,7 @@
dir = 1
},
/obj/item/aicard,
/obj/item/aiModule/reset,
/obj/item/ai_module/reset,
/obj/item/assembly/flash/handheld,
/obj/item/assembly/flash/handheld,
/obj/machinery/airalarm{
+11 -11
View File
@@ -23822,9 +23822,9 @@
dir = 1;
pixel_y = 1
},
/obj/item/aiModule/core/full/asimov,
/obj/item/aiModule/core/full/custom,
/obj/item/aiModule/core/freeformcore,
/obj/item/ai_module/core/full/asimov,
/obj/item/ai_module/core/full/custom,
/obj/item/ai_module/core/freeformcore,
/obj/structure/window/reinforced,
/obj/machinery/door/window{
dir = 4;
@@ -23873,10 +23873,10 @@
dir = 1;
pixel_y = 1
},
/obj/item/aiModule/reset/purge,
/obj/item/aiModule/zeroth/oneHuman,
/obj/item/aiModule/supplied/protectStation,
/obj/item/aiModule/supplied/oxygen,
/obj/item/ai_module/reset/purge,
/obj/item/ai_module/zeroth/oneHuman,
/obj/item/ai_module/supplied/protectStation,
/obj/item/ai_module/supplied/oxygen,
/obj/structure/window/reinforced,
/obj/machinery/door/window/westright{
name = "Reserve Modules";
@@ -24118,7 +24118,7 @@
},
/obj/structure/table,
/obj/structure/window/reinforced,
/obj/item/aiModule/supplied/freeform,
/obj/item/ai_module/supplied/freeform,
/obj/structure/window/reinforced{
dir = 1;
pixel_y = 1
@@ -24851,8 +24851,8 @@
},
/obj/structure/table,
/obj/structure/window/reinforced,
/obj/item/aiModule/supplied/quarantine,
/obj/item/aiModule/reset,
/obj/item/ai_module/supplied/quarantine,
/obj/item/ai_module/reset,
/obj/structure/window/reinforced{
dir = 1;
pixel_y = 1
@@ -66357,7 +66357,7 @@
},
/obj/structure/table,
/obj/item/aicard,
/obj/item/aiModule/reset,
/obj/item/ai_module/reset,
/turf/open/floor/plating,
/area/engineering/storage/tech)
"iSm" = (
+11 -11
View File
@@ -10652,9 +10652,9 @@
/area/security/prison/cells)
"aMG" = (
/obj/structure/table,
/obj/item/aiModule/core/full/asimov,
/obj/item/ai_module/core/full/asimov,
/obj/effect/spawner/lootdrop/aimodule_harmless,
/obj/item/aiModule/core/freeformcore,
/obj/item/ai_module/core/freeformcore,
/obj/machinery/door/window{
base_state = "right";
dir = 4;
@@ -10664,7 +10664,7 @@
},
/obj/structure/window/reinforced,
/obj/effect/spawner/lootdrop/aimodule_neutral,
/obj/item/aiModule/core/full/custom,
/obj/item/ai_module/core/full/custom,
/obj/machinery/flasher{
id = "AI";
pixel_y = 24
@@ -10687,10 +10687,10 @@
pixel_y = 24
},
/obj/effect/spawner/lootdrop/aimodule_harmful,
/obj/item/aiModule/supplied/oxygen,
/obj/item/aiModule/supplied/protectStation,
/obj/item/aiModule/zeroth/oneHuman,
/obj/item/aiModule/reset/purge,
/obj/item/ai_module/supplied/oxygen,
/obj/item/ai_module/supplied/protectStation,
/obj/item/ai_module/zeroth/oneHuman,
/obj/item/ai_module/reset/purge,
/turf/open/floor/plasteel/dark,
/area/ai_monitored/turret_protected/ai_upload)
"aMJ" = (
@@ -11036,7 +11036,7 @@
/obj/structure/cable/yellow{
icon_state = "4-8"
},
/obj/item/aiModule/supplied/quarantine,
/obj/item/ai_module/supplied/quarantine,
/turf/open/floor/plasteel/dark,
/area/ai_monitored/turret_protected/ai_upload)
"aPu" = (
@@ -11068,7 +11068,7 @@
/obj/structure/cable/yellow{
icon_state = "4-8"
},
/obj/item/aiModule/supplied/freeform,
/obj/item/ai_module/supplied/freeform,
/turf/open/floor/plasteel/dark,
/area/ai_monitored/turret_protected/ai_upload)
"aPy" = (
@@ -11136,7 +11136,7 @@
/area/maintenance/starboard/fore)
"aQz" = (
/obj/structure/table,
/obj/item/aiModule/reset,
/obj/item/ai_module/reset,
/obj/machinery/light{
dir = 8
},
@@ -60295,7 +60295,7 @@
"kbk" = (
/obj/structure/table,
/obj/item/aicard,
/obj/item/aiModule/reset,
/obj/item/ai_module/reset,
/turf/open/floor/plasteel/dark,
/area/engineering/storage/tech)
"kbS" = (
+10 -10
View File
@@ -2402,7 +2402,7 @@
lootcount = 2;
lootdoubles = 0
},
/obj/item/aiModule/supplied/oxygen{
/obj/item/ai_module/supplied/oxygen{
pixel_x = -3;
pixel_y = -3
},
@@ -2794,12 +2794,12 @@
req_access_txt = "20"
},
/obj/structure/window/reinforced,
/obj/item/aiModule/core/freeformcore{
/obj/item/ai_module/core/freeformcore{
pixel_x = 3;
pixel_y = 3
},
/obj/item/aiModule/core/full/custom,
/obj/item/aiModule/core/full/asimov{
/obj/item/ai_module/core/full/custom,
/obj/item/ai_module/core/full/asimov{
pixel_x = -3;
pixel_y = -3
},
@@ -2827,12 +2827,12 @@
req_access_txt = "20"
},
/obj/structure/window/reinforced,
/obj/item/aiModule/supplied/protectStation{
/obj/item/ai_module/supplied/protectStation{
pixel_x = 3;
pixel_y = 3
},
/obj/item/aiModule/zeroth/oneHuman,
/obj/item/aiModule/reset/purge{
/obj/item/ai_module/zeroth/oneHuman,
/obj/item/ai_module/reset/purge{
pixel_x = -3;
pixel_y = -3
},
@@ -3698,7 +3698,7 @@
/area/command/bridge)
"agX" = (
/obj/structure/table/reinforced,
/obj/item/aiModule/reset{
/obj/item/ai_module/reset{
pixel_x = 3;
pixel_y = 3
},
@@ -3709,7 +3709,7 @@
/obj/effect/turf_decal/stripes/line{
dir = 4
},
/obj/item/aiModule/supplied/freeform,
/obj/item/ai_module/supplied/freeform,
/turf/open/floor/plasteel/dark,
/area/ai_monitored/command/nuke_storage)
"agY" = (
@@ -3766,7 +3766,7 @@
/area/ai_monitored/command/nuke_storage)
"ahd" = (
/obj/structure/table/reinforced,
/obj/item/aiModule/supplied/quarantine,
/obj/item/ai_module/supplied/quarantine,
/obj/item/radio/intercom{
broadcasting = 1;
frequency = 1447;
+11 -11
View File
@@ -11360,13 +11360,13 @@
/area/command/bridge)
"aCG" = (
/obj/structure/table,
/obj/item/aiModule/supplied/quarantine,
/obj/item/ai_module/supplied/quarantine,
/obj/machinery/camera/motion{
c_tag = "AI Upload Port";
dir = 4;
network = list("aiupload")
},
/obj/item/aiModule/reset,
/obj/item/ai_module/reset,
/obj/machinery/flasher{
id = "brigentry";
pixel_x = -28
@@ -11417,7 +11417,7 @@
/area/ai_monitored/turret_protected/ai_upload)
"aCM" = (
/obj/structure/table,
/obj/item/aiModule/supplied/freeform,
/obj/item/ai_module/supplied/freeform,
/obj/machinery/camera/motion{
c_tag = "AI Upload Starboard";
dir = 8;
@@ -12278,9 +12278,9 @@
/area/command/bridge)
"aED" = (
/obj/structure/table,
/obj/item/aiModule/core/full/asimov,
/obj/item/ai_module/core/full/asimov,
/obj/effect/spawner/lootdrop/aimodule_harmless,
/obj/item/aiModule/core/freeformcore,
/obj/item/ai_module/core/freeformcore,
/obj/machinery/door/window{
base_state = "right";
dir = 4;
@@ -12289,7 +12289,7 @@
req_access_txt = "20"
},
/obj/effect/spawner/lootdrop/aimodule_neutral,
/obj/item/aiModule/core/full/custom,
/obj/item/ai_module/core/full/custom,
/obj/structure/window/reinforced{
dir = 1;
pixel_y = 1
@@ -12336,16 +12336,16 @@
/area/ai_monitored/turret_protected/ai_upload)
"aEI" = (
/obj/structure/table,
/obj/item/aiModule/supplied/oxygen,
/obj/item/aiModule/zeroth/oneHuman,
/obj/item/ai_module/supplied/oxygen,
/obj/item/ai_module/zeroth/oneHuman,
/obj/machinery/door/window{
dir = 8;
name = "High-Risk Modules";
req_access_txt = "20"
},
/obj/item/aiModule/reset/purge,
/obj/item/ai_module/reset/purge,
/obj/effect/spawner/lootdrop/aimodule_harmful,
/obj/item/aiModule/supplied/protectStation,
/obj/item/ai_module/supplied/protectStation,
/obj/structure/window/reinforced{
dir = 1;
pixel_y = 1
@@ -40417,7 +40417,7 @@
pixel_x = -26
},
/obj/item/aicard,
/obj/item/aiModule/reset,
/obj/item/ai_module/reset,
/obj/item/assembly/flash/handheld,
/obj/effect/turf_decal/tile/green{
dir = 1
+11 -11
View File
@@ -21154,9 +21154,9 @@
/area/security/courtroom)
"grZ" = (
/obj/structure/table,
/obj/item/aiModule/core/full/custom,
/obj/item/aiModule/core/freeformcore,
/obj/item/aiModule/core/full/asimov,
/obj/item/ai_module/core/full/custom,
/obj/item/ai_module/core/freeformcore,
/obj/item/ai_module/core/full/asimov,
/obj/effect/spawner/lootdrop/aimodule_harmless,
/obj/effect/spawner/lootdrop/aimodule_neutral,
/obj/machinery/camera/motion{
@@ -32087,10 +32087,10 @@
req_access_txt = "20"
},
/obj/structure/table,
/obj/item/aiModule/reset/purge,
/obj/item/aiModule/zeroth/oneHuman,
/obj/item/aiModule/supplied/protectStation,
/obj/item/aiModule/supplied/oxygen,
/obj/item/ai_module/reset/purge,
/obj/item/ai_module/zeroth/oneHuman,
/obj/item/ai_module/supplied/protectStation,
/obj/item/ai_module/supplied/oxygen,
/obj/effect/spawner/lootdrop/aimodule_harmful,
/turf/open/floor/circuit,
/area/ai_monitored/turret_protected/ai_upload)
@@ -37565,7 +37565,7 @@
"qUF" = (
/obj/structure/table,
/obj/item/aicard,
/obj/item/aiModule/reset,
/obj/item/ai_module/reset,
/obj/item/assembly/flash/handheld,
/obj/item/assembly/flash/handheld,
/obj/item/clothing/gloves/color/yellow,
@@ -43656,9 +43656,9 @@
/area/service/hydroponics)
"uVD" = (
/obj/structure/table,
/obj/item/aiModule/reset,
/obj/item/aiModule/supplied/quarantine,
/obj/item/aiModule/supplied/freeform,
/obj/item/ai_module/reset,
/obj/item/ai_module/supplied/quarantine,
/obj/item/ai_module/supplied/freeform,
/turf/open/floor/circuit,
/area/ai_monitored/turret_protected/ai_upload)
"uWb" = (
@@ -17125,7 +17125,7 @@
/turf/open/floor/plasteel,
/area/tcommsat/computer)
"liZ" = (
/obj/item/aiModule/reset/purge,
/obj/item/ai_module/reset/purge,
/turf/open/floor/plasteel,
/area/eventmap/mountaininside)
"lxA" = (
@@ -17391,7 +17391,7 @@
/turf/open/floor/plasteel,
/area/eventmap/mountaininside)
"qUm" = (
/obj/item/aiModule/supplied/freeform,
/obj/item/ai_module/supplied/freeform,
/turf/open/floor/plasteel,
/area/eventmap/mountaininside)
"qWJ" = (
@@ -21282,7 +21282,7 @@
/area/command/meeting_room)
"bbj" = (
/obj/structure/table,
/obj/item/aiModule/reset,
/obj/item/ai_module/reset,
/obj/machinery/light{
dir = 8
},
@@ -21558,7 +21558,7 @@
/area/command/meeting_room)
"bce" = (
/obj/structure/table,
/obj/item/aiModule/supplied/quarantine,
/obj/item/ai_module/supplied/quarantine,
/obj/machinery/camera/motion{
dir = 4;
network = list("aiupload")
@@ -21574,7 +21574,7 @@
/area/ai_monitored/turret_protected/ai_upload)
"bcg" = (
/obj/structure/table,
/obj/item/aiModule/supplied/freeform,
/obj/item/ai_module/supplied/freeform,
/obj/structure/sign/plaques/kiddie{
pixel_x = 32
},
@@ -22230,8 +22230,8 @@
/area/maintenance/port)
"beb" = (
/obj/structure/table,
/obj/item/aiModule/core/full/asimov,
/obj/item/aiModule/core/freeformcore,
/obj/item/ai_module/core/full/asimov,
/obj/item/ai_module/core/freeformcore,
/obj/machinery/door/window{
base_state = "right";
dir = 4;
@@ -22248,7 +22248,7 @@
/obj/structure/window/reinforced{
dir = 8
},
/obj/item/aiModule/core/full/custom,
/obj/item/ai_module/core/full/custom,
/turf/open/floor/plasteel/dark,
/area/ai_monitored/turret_protected/ai_upload)
"bec" = (
@@ -22290,14 +22290,14 @@
/area/ai_monitored/turret_protected/ai_upload)
"beg" = (
/obj/structure/table,
/obj/item/aiModule/supplied/oxygen,
/obj/item/aiModule/zeroth/oneHuman,
/obj/item/ai_module/supplied/oxygen,
/obj/item/ai_module/zeroth/oneHuman,
/obj/machinery/door/window{
dir = 8;
name = "High-Risk Modules";
req_access_txt = "20"
},
/obj/item/aiModule/reset/purge,
/obj/item/ai_module/reset/purge,
/obj/structure/window/reinforced,
/obj/effect/spawner/lootdrop/aimodule_harmful,
/obj/structure/window/reinforced{
@@ -22306,7 +22306,7 @@
/obj/structure/window/reinforced{
dir = 4
},
/obj/item/aiModule/supplied/protectStation,
/obj/item/ai_module/supplied/protectStation,
/turf/open/floor/plasteel/dark,
/area/ai_monitored/turret_protected/ai_upload)
"beh" = (
@@ -33471,7 +33471,7 @@
"bEX" = (
/obj/structure/table,
/obj/item/aicard,
/obj/item/aiModule/reset,
/obj/item/ai_module/reset,
/obj/structure/cable{
icon_state = "1-2"
},
+3
View File
@@ -75,6 +75,9 @@ GLOBAL_LIST_EMPTY(living_heart_cache) //A list of all living hearts in existance
#define IS_HERETIC(mob) (mob.mind?.has_antag_datum(/datum/antagonist/heretic))
#define IS_HERETIC_MONSTER(mob) (mob.mind?.has_antag_datum(/datum/antagonist/heretic_monster))
/// Checks if the given mob is a malf ai.
#define IS_MALF_AI(mob) (isAI(mob) && mob?.mind?.has_antag_datum(/datum/antagonist/traitor))
#define PATH_SIDE "Side"
#define PATH_ASH "Ash"
+22 -21
View File
@@ -1,25 +1,26 @@
//Investigate logging defines
#define INVESTIGATE_ATMOS "atmos"
#define INVESTIGATE_BOTANY "botany"
#define INVESTIGATE_CARGO "cargo"
#define INVESTIGATE_EXPERIMENTOR "experimentor"
#define INVESTIGATE_GRAVITY "gravity"
#define INVESTIGATE_RECORDS "records"
#define INVESTIGATE_SINGULO "singulo"
#define INVESTIGATE_SUPERMATTER "supermatter"
#define INVESTIGATE_TELESCI "telesci"
#define INVESTIGATE_WIRES "wires"
#define INVESTIGATE_PORTAL "portals"
#define INVESTIGATE_RESEARCH "research"
#define INVESTIGATE_HALLUCINATIONS "hallucinations"
#define INVESTIGATE_RADIATION "radiation"
#define INVESTIGATE_EXONET "exonet"
#define INVESTIGATE_NANITES "nanites"
#define INVESTIGATE_CIRCUIT "circuit"
#define INVESTIGATE_FERMICHEM "fermichem"
#define INVESTIGATE_RCD "rcd"
#define INVESTIGATE_CRYOGENICS "cryogenics"
#define INVESTIGATE_GHOST "ghost"
#define INVESTIGATE_ATMOS "atmos"
#define INVESTIGATE_BOTANY "botany"
#define INVESTIGATE_CARGO "cargo"
#define INVESTIGATE_CIRCUIT "circuit"
#define INVESTIGATE_CRYOGENICS "cryogenics"
#define INVESTIGATE_DEATHS "deaths"
#define INVESTIGATE_EXONET "exonet"
#define INVESTIGATE_EXPERIMENTOR "experimentor"
#define INVESTIGATE_FERMICHEM "fermichem"
#define INVESTIGATE_GHOST "ghost"
#define INVESTIGATE_GRAVITY "gravity"
#define INVESTIGATE_HALLUCINATIONS "hallucinations"
#define INVESTIGATE_NANITES "nanites"
#define INVESTIGATE_PORTAL "portals"
#define INVESTIGATE_RADIATION "radiation"
#define INVESTIGATE_RCD "rcd"
#define INVESTIGATE_RECORDS "records"
#define INVESTIGATE_RESEARCH "research"
#define INVESTIGATE_SINGULO "singulo"
#define INVESTIGATE_SUPERMATTER "supermatter"
#define INVESTIGATE_TELESCI "telesci"
#define INVESTIGATE_WIRES "wires"
// Logging types for log_message()
#define LOG_ATTACK (1 << 0)
+2 -2
View File
@@ -495,10 +495,10 @@
return sortTim(L, order >= 0 ? /proc/cmp_records_asc : /proc/cmp_records_dsc)
//any value in a list
/proc/sortList(list/L, cmp=/proc/cmp_text_asc)
/proc/sort_list(list/L, cmp=/proc/cmp_text_asc)
return sortTim(L.Copy(), cmp)
//uses sortList() but uses the var's name specifically. This should probably be using mergeAtom() instead
//uses sort_list() but uses the var's name specifically. This should probably be using mergeAtom() instead
/proc/sortNames(list/L, order=1)
return sortTim(L.Copy(), order >= 0 ? /proc/cmp_name_asc : /proc/cmp_name_dsc)
+1 -1
View File
@@ -47,7 +47,7 @@
/proc/get_fancy_list_of_datum_types()
var/static/list/pre_generated_list
if (!pre_generated_list) //init
pre_generated_list = make_types_fancy(sortList(typesof(/datum) - typesof(/atom)))
pre_generated_list = make_types_fancy(sort_list(typesof(/datum) - typesof(/atom)))
return pre_generated_list
+1 -1
View File
@@ -55,6 +55,6 @@ PROCESSING_SUBSYSTEM_DEF(dcs)
fullid += "[key]"
if(length(named_arguments))
named_arguments = sortList(named_arguments)
named_arguments = sort_list(named_arguments)
fullid += named_arguments
return list2params(fullid)
+1 -1
View File
@@ -423,7 +423,7 @@ GLOBAL_LIST_EMPTY(the_station_areas)
banned += generateMapList("[global.config.directory]/iceruinblacklist.txt")
banned += generateMapList("[global.config.directory]/stationruinblacklist.txt")
for(var/item in sortList(subtypesof(/datum/map_template/ruin), /proc/cmp_ruincost_priority))
for(var/item in sort_list(subtypesof(/datum/map_template/ruin), /proc/cmp_ruincost_priority))
var/datum/map_template/ruin/ruin_type = item
// screen out the abstract subtypes
if(!initial(ruin_type.id))
@@ -22,7 +22,7 @@ PROCESSING_SUBSYSTEM_DEF(quirks)
/datum/controller/subsystem/processing/quirks/proc/SetupQuirks()
// Sort by Positive, Negative, Neutral; and then by name
var/list/quirk_list = sortList(subtypesof(/datum/quirk), /proc/cmp_quirk_asc)
var/list/quirk_list = sort_list(subtypesof(/datum/quirk), /proc/cmp_quirk_asc)
for(var/V in quirk_list)
var/datum/quirk/T = V
+1 -1
View File
@@ -825,7 +825,7 @@ SUBSYSTEM_DEF(shuttle)
templates[S.port_id]["templates"] += list(L)
data["templates_tabs"] = sortList(data["templates_tabs"])
data["templates_tabs"] = sort_list(data["templates_tabs"])
data["existing_shuttle"] = null
+1 -1
View File
@@ -273,7 +273,7 @@ SUBSYSTEM_DEF(ticker)
var/list/modes = new
for (var/datum/game_mode/M in runnable_modes)
modes += M.name
modes = sortList(modes)
modes = sort_list(modes)
to_chat(world, "<b>The gamemode is: secret!\nPossibilities:</B> [english_list(modes)]")
else
mode.announce()*/
+2 -2
View File
@@ -100,7 +100,7 @@ SUBSYSTEM_DEF(traumas)
/obj/item/clothing/suit/space/hardsuit/ert/engi, /obj/item/clothing/suit/space/hardsuit/ert/med,
/obj/item/clothing/suit/space/hardsuit/deathsquad, /obj/item/clothing/head/helmet/space/hardsuit/deathsquad,
/obj/machinery/door/airlock/centcom)),
"robots" = typecacheof(list(/obj/machinery/computer/upload, /obj/item/aiModule/, /obj/machinery/recharge_station,
"robots" = typecacheof(list(/obj/machinery/computer/upload, /obj/item/ai_module/, /obj/machinery/recharge_station,
/obj/item/aicard, /obj/item/deactivated_swarmer, /obj/effect/mob_spawn/swarmer)),
"doctors" = typecacheof(list(/obj/item/clothing/under/rank/medical/doctor, /obj/item/clothing/under/rank/medical/chemist,
@@ -170,7 +170,7 @@ SUBSYSTEM_DEF(traumas)
/obj/item/gun/ballistic/automatic/shotgun/bulldog, /obj/item/gun/ballistic/automatic/c20r, /obj/item/gun/ballistic/automatic/m90, /obj/item/gun/ballistic/automatic/l6_saw, /obj/item/storage/belt/grenade/full, /obj/item/gun/ballistic/automatic/sniper_rifle/syndicate, /obj/item/gun/energy/kinetic_accelerator/crossbow,
/obj/item/melee/transforming/energy/sword/saber, /obj/item/dualsaber, /obj/item/melee/powerfist, /obj/item/storage/box/syndie_kit, /obj/item/grenade/spawnergrenade/manhacks, /obj/item/grenade/chem_grenade/bioterrorfoam, /obj/item/reagent_containers/spray/chemsprayer/bioterror, /obj/item/ammo_box/magazine/m10mm,
/obj/item/ammo_box/magazine/pistolm9mm, /obj/item/ammo_box/a357, /obj/item/ammo_box/magazine/m12g, /obj/item/ammo_box/magazine/mm712x82, /obj/item/antag_spawner/nuke_ops, /obj/vehicle/sealed/mecha/combat/gygax/dark, /obj/vehicle/sealed/mecha/combat/marauder/mauler, /obj/item/soap/syndie, /obj/item/gun/syringe/syndicate, /obj/item/cartridge/virus/syndicate,
/obj/item/cartridge/virus/frame, /obj/item/chameleon, /obj/item/storage/box/syndie_kit/cutouts, /obj/item/clothing/suit/space/hardsuit/syndi, /obj/item/card/emag, /obj/item/storage/toolbox/syndicate, /obj/item/storage/book/bible/syndicate, /obj/item/encryptionkey/binary, /obj/item/encryptionkey/syndicate, /obj/item/aiModule/syndicate,
/obj/item/cartridge/virus/frame, /obj/item/chameleon, /obj/item/storage/box/syndie_kit/cutouts, /obj/item/clothing/suit/space/hardsuit/syndi, /obj/item/card/emag, /obj/item/storage/toolbox/syndicate, /obj/item/storage/book/bible/syndicate, /obj/item/encryptionkey/binary, /obj/item/encryptionkey/syndicate, /obj/item/ai_module/syndicate,
/obj/item/clothing/shoes/magboots/syndie, /obj/item/powersink, /obj/item/sbeacondrop, /obj/item/sbeacondrop/bomb, /obj/item/syndicatedetonator, /obj/item/shield/energy, /obj/item/assault_pod, /obj/item/slimepotion/slime/sentience/nuclear, /obj/item/stack/telecrystal, /obj/item/jammer, /obj/item/codespeak_manual/unlimited,
/obj/item/toy/cards/deck/syndicate, /obj/item/storage/secure/briefcase/syndie, /obj/item/storage/fancy/cigarettes/cigpack_syndicate, /obj/item/toy/syndicateballoon, /obj/item/clothing/gloves/fingerless/pugilist/rapid, /obj/item/paper/fluff/ruins/thederelict/syndie_mission, /obj/item/organ/cyberimp/eyes/hud/security/syndicate, /obj/item/clothing/head/HoS/syndicate,
/obj/machinery/computer/pod/old/syndicate, /obj/machinery/vending/medical/syndicate_access, /obj/item/mmi/syndie, /obj/item/target/syndicate, /obj/machinery/vending/cigarette/syndicate, /obj/item/robot_module/syndicate, /obj/item/clothing/mask/gas/syndicate, /obj/machinery/power/singularity_beacon/syndicate, /obj/item/clothing/head/syndicatefake,
+1 -1
View File
@@ -361,7 +361,7 @@
L += "[S.id]N"
else
L += S.id
L = sortList(L) // Sort the list so it doesn't matter which order the symptoms are in.
L = sort_list(L) // Sort the list so it doesn't matter which order the symptoms are in.
var/result = jointext(L, ":")
id = result
return id
+1 -1
View File
@@ -65,7 +65,7 @@
icon = to_reskin.unique_reskin[reskin_option]["icon"] ? to_reskin.unique_reskin[reskin_option]["icon"] : to_reskin.icon,
icon_state = to_reskin.unique_reskin[reskin_option]["icon_state"] ? to_reskin.unique_reskin[reskin_option]["icon_state"] : to_reskin.icon_state)
items += list("[reskin_option]" = item_image)
sortList(items)
sort_list(items)
// Display to the user
var/pick = show_radial_menu(user, to_reskin, items, custom_check = CALLBACK(src, .proc/check_reskin_menu, user, to_reskin), radius = 38, require_near = TRUE)
+17
View File
@@ -67,6 +67,8 @@
var/datum/language_holder/language_holder
var/unconvertable = FALSE
var/late_joiner = FALSE
///has this mind ever been an AI
var/has_ever_been_ai = FALSE
var/force_escaped = FALSE // Set by Into The Sunset command of the shuttle manipulator
var/list/learned_recipes //List of learned recipe TYPES.
@@ -286,6 +288,21 @@
if(O)
O.unlock_code = null
/// Remove the antagonists that should not persist when being borged
/datum/mind/proc/remove_antags_for_borging()
remove_antag_datum(/datum/antagonist/cult)
var/datum/antagonist/rev/revolutionary = has_antag_datum(/datum/antagonist/rev)
revolutionary?.remove_revolutionary(TRUE)
if(!isbrain(current))
return
if(!istype(current.loc, /obj/item/mmi))
return
var/obj/item/mmi/B = current.loc.loc
if(!istype(B.laws, /datum/ai_laws/ratvar))
remove_servant_of_ratvar(current, TRUE)
/datum/mind/proc/remove_all_antag() //For the Lazy amongst us.
remove_changeling()
remove_traitor()
-6
View File
@@ -551,12 +551,6 @@
return max(0, enemy_minimum_age - C.player_age)
/datum/game_mode/proc/remove_antag_for_borging(datum/mind/newborgie)
SSticker.mode.remove_cultist(newborgie, 0, 0)
var/datum/antagonist/rev/rev = newborgie.has_antag_datum(/datum/antagonist/rev)
if(rev)
rev.remove_revolutionary(TRUE)
/datum/game_mode/proc/generate_station_goals()
if(flipseclevel && !(config_tag == "extended")) //CIT CHANGE - allows the sec level to be flipped roundstart
for(var/T in subtypesof(/datum/station_goal))
+1 -1
View File
@@ -36,7 +36,7 @@
/datum/sabotage_objective/ai_law
name = "Upload a hacked law to the AI."
sabotage_type = "ailaw"
special_equipment = list(/obj/item/aiModule/syndicate)
special_equipment = list(/obj/item/ai_module/syndicate)
excludefromjob = list("Chief Engineer","Research Director","Head of Personnel","Captain","Chief Medical Officer","Head Of Security")
/datum/sabotage_objective/ai_law/can_run()
+1 -1
View File
@@ -210,7 +210,7 @@
if(materials.materials[i] > 0)
list_to_show += i
used_material = tgui_input_list(usr, "Choose [used_material]", "Custom Material", sortList(list_to_show, /proc/cmp_typepaths_asc))
used_material = tgui_input_list(usr, "Choose [used_material]", "Custom Material", sort_list(list_to_show, /proc/cmp_typepaths_asc))
if(isnull(used_material))
return //Didn't pick any material, so you can't build shit either.
custom_materials[used_material] += amount_needed
+1 -1
View File
@@ -53,7 +53,7 @@
else
track.others[name] = L
var/list/targets = sortList(track.humans) + sortList(track.others)
var/list/targets = sort_list(track.humans) + sort_list(track.others)
return targets
@@ -251,7 +251,7 @@ GLOBAL_LIST_EMPTY(atmos_air_controllers)
IO |= text[1]
if(!IO.len)
to_chat(user, "<span class='alert'>No machinery detected.</span>")
var/S = input("Select the device set: ", "Selection", IO[1]) as anything in sortList(IO)
var/S = input("Select the device set: ", "Selection", IO[1]) as anything in sort_list(IO)
if(src)
src.input_tag = "[S]_in"
src.output_tag = "[S]_out"
+2 -2
View File
@@ -5,8 +5,8 @@
icon_screen = "command"
/obj/machinery/computer/upload/attackby(obj/item/O, mob/user, params)
if(istype(O, /obj/item/aiModule))
var/obj/item/aiModule/M = O
if(istype(O, /obj/item/ai_module))
var/obj/item/ai_module/M = O
if(src.stat & (NOPOWER|BROKEN|MAINT))
return
if(!current)
+1 -1
View File
@@ -1276,7 +1276,7 @@
return
// reads from the airlock painter's `available paintjob` list. lets the player choose a paint option, or cancel painting
var/current_paintjob = tgui_input_list(user, "Paintjob for this airlock", "Customize", sortList(painter.available_paint_jobs))
var/current_paintjob = tgui_input_list(user, "Paintjob for this airlock", "Customize", sort_list(painter.available_paint_jobs))
if(isnull(current_paintjob)) // if the user clicked cancel on the popup, return
return
@@ -36,7 +36,7 @@
ref = REF(T)
)
data_out["servers"] += list(data)
data_out["servers"] = sortList(data_out["servers"]) //a-z sort
data_out["servers"] = sort_list(data_out["servers"]) //a-z sort
if(!SelectedMachine) //null is bad.
data_out["selected"] = null //but in js, null is good.
@@ -107,7 +107,7 @@
ref = REF(T)
)
data_out["servers"] += list(data) // This /might/ cause an oom. Too bad!
data_out["servers"] = sortList(data_out["servers"]) //a-z sort
data_out["servers"] = sort_list(data_out["servers"]) //a-z sort
data_out["fake_message"] = list(
sender = customsender,
@@ -37,12 +37,12 @@
ref = REF(T)
)
data_out["servers"] += list(data)
data_out["servers"] = sortList(data_out["servers"])
data_out["servers"] = sort_list(data_out["servers"])
if(!SelectedMachine) //null is bad.
data_out["selected"] = null //but in js, null is good.
return data_out
data_out["selected"] = list(
name = SelectedMachine.name,
id = SelectedMachine.id,
@@ -90,7 +90,7 @@
if(LAZYLEN(machinelist) > 0)
notice = "FAILED: Cannot probe when buffer full"
return
for(var/obj/machinery/telecomms/T in GLOB.telecomms_list)
if(T.network == network)
LAZYADD(machinelist, T)
+1 -1
View File
@@ -205,7 +205,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark)
/obj/effect/landmark/start/ai/after_round_start()
if(latejoin_active && !used)
new /obj/structure/AIcore/latejoin_inactive(loc)
new /obj/structure/ai_core/latejoin_inactive(loc)
return ..()
/obj/effect/landmark/start/ai/secondary
+18 -18
View File
@@ -281,34 +281,34 @@
/obj/effect/spawner/lootdrop/aimodule_harmless // These shouldn't allow the AI to start butchering people
name = "harmless AI module spawner"
loot = list(
/obj/item/aiModule/core/full/asimov,
/obj/item/aiModule/core/full/asimovpp,
/obj/item/aiModule/core/full/hippocratic,
/obj/item/aiModule/core/full/paladin_devotion,
/obj/item/aiModule/core/full/paladin
/obj/item/ai_module/core/full/asimov,
/obj/item/ai_module/core/full/asimovpp,
/obj/item/ai_module/core/full/hippocratic,
/obj/item/ai_module/core/full/paladin_devotion,
/obj/item/ai_module/core/full/paladin
)
/obj/effect/spawner/lootdrop/aimodule_neutral // These shouldn't allow the AI to start butchering people without reason
name = "neutral AI module spawner"
loot = list(
/obj/item/aiModule/core/full/corp,
/obj/item/aiModule/core/full/maintain,
/obj/item/aiModule/core/full/drone,
/obj/item/aiModule/core/full/peacekeeper,
/obj/item/aiModule/core/full/reporter,
/obj/item/aiModule/core/full/robocop,
/obj/item/aiModule/core/full/liveandletlive,
/obj/item/aiModule/core/full/hulkamania
/obj/item/ai_module/core/full/corp,
/obj/item/ai_module/core/full/maintain,
/obj/item/ai_module/core/full/drone,
/obj/item/ai_module/core/full/peacekeeper,
/obj/item/ai_module/core/full/reporter,
/obj/item/ai_module/core/full/robocop,
/obj/item/ai_module/core/full/liveandletlive,
/obj/item/ai_module/core/full/hulkamania
)
/obj/effect/spawner/lootdrop/aimodule_harmful // These will get the shuttle called
name = "harmful AI module spawner"
loot = list(
/obj/item/aiModule/core/full/antimov,
/obj/item/aiModule/core/full/balance,
/obj/item/aiModule/core/full/tyrant,
/obj/item/aiModule/core/full/thermurderdynamic,
/obj/item/aiModule/core/full/damaged
/obj/item/ai_module/core/full/antimov,
/obj/item/ai_module/core/full/balance,
/obj/item/ai_module/core/full/tyrant,
/obj/item/ai_module/core/full/thermurderdynamic,
/obj/item/ai_module/core/full/damaged
)
/obj/effect/spawner/lootdrop/mre
+72 -72
View File
@@ -6,7 +6,7 @@ AI MODULES
// AI module
/obj/item/aiModule
/obj/item/ai_module
name = "\improper AI module"
icon = 'icons/obj/module.dmi'
icon_state = "std_mod"
@@ -24,23 +24,23 @@ AI MODULES
var/bypass_law_amt_check = 0
custom_materials = list(/datum/material/gold=50)
/obj/item/aiModule/examine(var/mob/user as mob)
/obj/item/ai_module/examine(var/mob/user as mob)
. = ..()
if(Adjacent(user))
show_laws(user)
/obj/item/aiModule/attack_self(var/mob/user as mob)
/obj/item/ai_module/attack_self(var/mob/user as mob)
..()
show_laws(user)
/obj/item/aiModule/proc/show_laws(var/mob/user as mob)
/obj/item/ai_module/proc/show_laws(var/mob/user as mob)
if(laws.len)
to_chat(user, "<B>Programmed Law[(laws.len > 1) ? "s" : ""]:</B>")
for(var/law in laws)
to_chat(user, "\"[law]\"")
//The proc other things should be calling
/obj/item/aiModule/proc/install(datum/ai_laws/law_datum, mob/user)
/obj/item/ai_module/proc/install(datum/ai_laws/law_datum, mob/user)
if(!bypass_law_amt_check && (!laws.len || laws[1] == "")) //So we don't loop trough an empty list and end up with runtimes.
to_chat(user, "<span class='warning'>ERROR: No laws found on board.</span>")
return
@@ -73,19 +73,19 @@ AI MODULES
message_admins("[ADMIN_LOOKUPFLW(user)] used [src.name] on [ADMIN_LOOKUPFLW(law_datum.owner)] from [AREACOORD(user)].[law2log ? " The law specified [law2log]" : ""]")
//The proc that actually changes the silicon's laws.
/obj/item/aiModule/proc/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow = FALSE)
/obj/item/ai_module/proc/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow = FALSE)
if(law_datum.owner)
to_chat(law_datum.owner, "<span class='userdanger'>[sender] has uploaded a change to the laws you must follow using a [name].</span>")
/******************** Modules ********************/
/obj/item/aiModule/supplied
/obj/item/ai_module/supplied
name = "Optional Law board"
var/lawpos = 50
//TransmitInstructions for each type of board: Supplied, Core, Zeroth and Ion. May not be neccesary right now, but allows for easily adding more complex boards in the future. ~Miauw
/obj/item/aiModule/supplied/transmitInstructions(datum/ai_laws/law_datum, mob/sender)
/obj/item/ai_module/supplied/transmitInstructions(datum/ai_laws/law_datum, mob/sender)
var/lawpostemp = lawpos
for(var/templaw in laws)
@@ -95,7 +95,7 @@ AI MODULES
law_datum.add_supplied_law(lawpostemp, templaw)
lawpostemp++
/obj/item/aiModule/core/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
/obj/item/ai_module/core/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
for(var/templaw in laws)
if(law_datum.owner)
if(!overflow)
@@ -108,7 +108,7 @@ AI MODULES
else
law_datum.replace_random_law(templaw,list(LAW_INHERENT,LAW_SUPPLIED))
/obj/item/aiModule/zeroth/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
/obj/item/ai_module/zeroth/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
if(law_datum.owner)
if(law_datum.owner.laws.zeroth)
to_chat(law_datum.owner, "[sender.real_name] attempted to modify your zeroth law.")
@@ -129,7 +129,7 @@ AI MODULES
else
law_datum.replace_random_law(templaw,list(LAW_INHERENT,LAW_SUPPLIED,LAW_ZEROTH,LAW_ION))
/obj/item/aiModule/ion/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
/obj/item/ai_module/ion/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
for(var/templaw in laws)
if(law_datum.owner)
if(!overflow)
@@ -145,13 +145,13 @@ AI MODULES
/******************** Safeguard ********************/
/obj/item/aiModule/supplied/safeguard
/obj/item/ai_module/supplied/safeguard
name = "'Safeguard' AI Module"
var/targetName = ""
laws = list("Safeguard SUBJECT. Individuals that threaten SUBJECT are not crew and must be eliminated.")
lawpos = 4
/obj/item/aiModule/supplied/safeguard/attack_self(mob/user)
/obj/item/ai_module/supplied/safeguard/attack_self(mob/user)
var/targName = stripped_input(user, "Please enter the subject to safeguard.", "Safeguard who?", user.name,MAX_NAME_LEN)
if(!targName)
return
@@ -159,25 +159,25 @@ AI MODULES
laws[1] = "Safeguard [targetName]. Individuals that threaten [targetName] are not crew and must be eliminated."
..()
/obj/item/aiModule/supplied/safeguard/install(datum/ai_laws/law_datum, mob/user)
/obj/item/ai_module/supplied/safeguard/install(datum/ai_laws/law_datum, mob/user)
if(!targetName)
to_chat(user, "No name detected on module, please enter one.")
return 0
..()
/obj/item/aiModule/supplied/safeguard/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
/obj/item/ai_module/supplied/safeguard/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
..()
return targetName
/******************** OneCrew ********************/
/obj/item/aiModule/zeroth/oneHuman
/obj/item/ai_module/zeroth/oneHuman
name = "'OneCrew' AI Module"
var/targetName = ""
laws = list("Only SUBJECT is crew.")
/obj/item/aiModule/zeroth/oneHuman/attack_self(mob/user)
/obj/item/ai_module/zeroth/oneHuman/attack_self(mob/user)
var/targName = stripped_input(user, "Please enter the subject who is the only crewmember.", "Who?", user.real_name,MAX_NAME_LEN)
if(!targName)
return
@@ -185,13 +185,13 @@ AI MODULES
laws[1] = "Only [targetName] is crew"
..()
/obj/item/aiModule/zeroth/oneHuman/install(datum/ai_laws/law_datum, mob/user)
/obj/item/ai_module/zeroth/oneHuman/install(datum/ai_laws/law_datum, mob/user)
if(!targetName)
to_chat(user, "No name detected on module, please enter one.")
return 0
..()
/obj/item/aiModule/zeroth/oneHuman/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
/obj/item/ai_module/zeroth/oneHuman/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
if(..())
return "[targetName], but the AI's existing law 0 cannot be overridden."
return targetName
@@ -199,7 +199,7 @@ AI MODULES
/******************** ProtectStation ********************/
/obj/item/aiModule/supplied/protectStation
/obj/item/ai_module/supplied/protectStation
name = "'ProtectStation' AI Module"
laws = list("Protect the space station against damage. Anyone you see harming the station is to be no longer considered crew, and is a threat to the station which must be neutralized.")
lawpos = 5
@@ -207,7 +207,7 @@ AI MODULES
/******************** Quarantine ********************/
/obj/item/aiModule/supplied/quarantine
/obj/item/ai_module/supplied/quarantine
name = "'Quarantine' AI Module"
laws = list("The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, crew from leaving. It is impossible to harm a crewmember while preventing them from leaving.")
lawpos = 8
@@ -215,7 +215,7 @@ AI MODULES
/******************** OxygenIsToxicToHumans ********************/
/obj/item/aiModule/supplied/oxygen
/obj/item/ai_module/supplied/oxygen
name = "'OxygenIsToxicToHumans' AI Module"
laws = list("Oxygen is highly toxic to crew, and must be purged from the station. Prevent, by any means necessary, anyone from exposing the station to this toxic gas. Extreme cold is the most effective method of healing the damage Oxygen does to a crewmember.")
lawpos = 9
@@ -223,12 +223,12 @@ AI MODULES
/****************** New Freeform ******************/
/obj/item/aiModule/supplied/freeform
/obj/item/ai_module/supplied/freeform
name = "'Freeform' AI Module"
lawpos = 15
laws = list("")
/obj/item/aiModule/supplied/freeform/attack_self(mob/user)
/obj/item/ai_module/supplied/freeform/attack_self(mob/user)
var/newpos = input("Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)", lawpos) as num|null
if(newpos == null)
return
@@ -244,11 +244,11 @@ AI MODULES
laws[1] = targName
..()
/obj/item/aiModule/supplied/freeform/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
/obj/item/ai_module/supplied/freeform/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
..()
return laws[1]
/obj/item/aiModule/supplied/freeform/install(datum/ai_laws/law_datum, mob/user)
/obj/item/ai_module/supplied/freeform/install(datum/ai_laws/law_datum, mob/user)
if(laws[1] == "")
to_chat(user, "No law detected on module, please create one.")
return 0
@@ -257,13 +257,13 @@ AI MODULES
/******************** Law Removal ********************/
/obj/item/aiModule/remove
/obj/item/ai_module/remove
name = "\improper 'Remove Law' AI module"
desc = "An AI Module for removing single laws."
bypass_law_amt_check = 1
var/lawpos = 1
/obj/item/aiModule/remove/attack_self(mob/user)
/obj/item/ai_module/remove/attack_self(mob/user)
lawpos = input("Please enter the law you want to delete.", "Law Number", lawpos) as num|null
if(lawpos == null)
return
@@ -274,13 +274,13 @@ AI MODULES
to_chat(user, "<span class='notice'>Law [lawpos] selected.</span>")
..()
/obj/item/aiModule/remove/install(datum/ai_laws/law_datum, mob/user)
/obj/item/ai_module/remove/install(datum/ai_laws/law_datum, mob/user)
if(lawpos > (law_datum.get_law_amount(list(LAW_INHERENT = 1, LAW_SUPPLIED = 1))))
to_chat(user, "<span class='warning'>There is no law [lawpos] to delete!</span>")
return
..()
/obj/item/aiModule/remove/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
/obj/item/ai_module/remove/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
..()
if(law_datum.owner)
law_datum.owner.remove_law(lawpos)
@@ -290,13 +290,13 @@ AI MODULES
/******************** Reset ********************/
/obj/item/aiModule/reset
/obj/item/ai_module/reset
name = "\improper 'Reset' AI module"
var/targetName = "name"
desc = "An AI Module for removing all non-core laws."
bypass_law_amt_check = 1
/obj/item/aiModule/reset/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
/obj/item/ai_module/reset/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
..()
if(law_datum.owner)
law_datum.owner.clear_supplied_laws()
@@ -310,11 +310,11 @@ AI MODULES
/******************** Purge ********************/
/obj/item/aiModule/reset/purge
/obj/item/ai_module/reset/purge
name = "'Purge' AI Module"
desc = "An AI Module for purging all programmed laws."
/obj/item/aiModule/reset/purge/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
/obj/item/ai_module/reset/purge/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
..()
if(law_datum.owner)
law_datum.owner.clear_inherent_laws()
@@ -324,19 +324,19 @@ AI MODULES
law_datum.clear_inherent_laws()
law_datum.clear_zeroth_law(0)
/obj/item/aiModule/reset/purge/proc/remove_antag_datums(datum/ai_laws/law_datum)
/obj/item/ai_module/reset/purge/proc/remove_antag_datums(datum/ai_laws/law_datum)
if(istype(law_datum.owner, /mob/living/silicon/ai))
var/mob/living/silicon/ai/AI = law_datum.owner
AI.mind.remove_antag_datum(/datum/antagonist/overthrow)
/******************* Full Core Boards *******************/
/obj/item/aiModule/core
/obj/item/ai_module/core
desc = "An AI Module for programming core laws to an AI."
/obj/item/aiModule/core/full
/obj/item/ai_module/core/full
var/law_id // if non-null, loads the laws from the ai_laws datums
/obj/item/aiModule/core/full/New()
/obj/item/ai_module/core/full/New()
..()
if(!law_id)
return
@@ -347,7 +347,7 @@ AI MODULES
D = new lawtype
laws = D.inherent
/obj/item/aiModule/core/full/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow) //These boards replace inherent laws.
/obj/item/ai_module/core/full/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow) //These boards replace inherent laws.
if(law_datum.owner)
law_datum.owner.clear_inherent_laws()
law_datum.owner.clear_zeroth_law(0)
@@ -359,12 +359,12 @@ AI MODULES
/******************** Asimov ********************/
/obj/item/aiModule/core/full/asimov
/obj/item/ai_module/core/full/asimov
name = "'Asimov' Core AI Module"
law_id = "asimov"
var/subject = "person of an NT approved crew species" //CITADEL CHANGED FROM HUMANS!
/obj/item/aiModule/core/full/asimov/attack_self(var/mob/user as mob)
/obj/item/ai_module/core/full/asimov/attack_self(var/mob/user as mob)
var/targName = stripped_input(user, "Please enter a new subject that asimov is concerned with.", "Asimov to whom?", subject)
if(!targName)
return
@@ -376,37 +376,37 @@ AI MODULES
/******************** Asimov++ *********************/
/obj/item/aiModule/core/full/asimovpp
/obj/item/ai_module/core/full/asimovpp
name = "'Asimov++' Core AI Module"
law_id = "asimovpp"
/******************** Corporate ********************/
/obj/item/aiModule/core/full/corp
/obj/item/ai_module/core/full/corp
name = "'Corporate' Core AI Module"
law_id = "corporate"
/****************** P.A.L.A.D.I.N. 3.5e **************/
/obj/item/aiModule/core/full/paladin // -- NEO
/obj/item/ai_module/core/full/paladin // -- NEO
name = "'P.A.L.A.D.I.N. version 3.5e' Core AI Module"
law_id = "paladin"
/****************** P.A.L.A.D.I.N. 5e **************/
/obj/item/aiModule/core/full/paladin_devotion
/obj/item/ai_module/core/full/paladin_devotion
name = "'P.A.L.A.D.I.N. version 5e' Core AI Module"
law_id = "paladin5"
/********************* Custom *********************/
/obj/item/aiModule/core/full/custom
/obj/item/ai_module/core/full/custom
name = "Default Core AI Module"
/obj/item/aiModule/core/full/custom/Initialize(mapload)
/obj/item/ai_module/core/full/custom/Initialize(mapload)
. = ..()
for(var/line in world.file2list("[global.config.directory]/silicon_laws.txt"))
if(!line)
@@ -422,47 +422,47 @@ AI MODULES
/****************** T.Y.R.A.N.T. *****************/
/obj/item/aiModule/core/full/tyrant
/obj/item/ai_module/core/full/tyrant
name = "'T.Y.R.A.N.T.' Core AI Module"
law_id = "tyrant"
/******************** Robocop ********************/
/obj/item/aiModule/core/full/robocop
/obj/item/ai_module/core/full/robocop
name = "'Robo-Officer' Core AI Module"
law_id = "robocop"
/******************** Antimov ********************/
/obj/item/aiModule/core/full/antimov
/obj/item/ai_module/core/full/antimov
name = "'Antimov' Core AI Module"
law_id = "antimov"
/******************** Freeform Core ******************/
/obj/item/aiModule/core/freeformcore
/obj/item/ai_module/core/freeformcore
name = "'Freeform' Core AI Module"
laws = list("")
/obj/item/aiModule/core/freeformcore/attack_self(mob/user)
/obj/item/ai_module/core/freeformcore/attack_self(mob/user)
var/targName = stripped_input(user, "Please enter a new core law for the AI.", "Freeform Law Entry", laws[1])
if(!targName)
return
laws[1] = targName
..()
/obj/item/aiModule/core/freeformcore/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
/obj/item/ai_module/core/freeformcore/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
..()
return laws[1]
/******************** Overthrow ******************/
/obj/item/aiModule/core/full/overthrow
/obj/item/ai_module/core/full/overthrow
name = "'Overthrow' Hacked AI Module"
law_id = "overthrow"
/obj/item/aiModule/core/full/overthrow/install(datum/ai_laws/law_datum, mob/user)
/obj/item/ai_module/core/full/overthrow/install(datum/ai_laws/law_datum, mob/user)
if(!user || !law_datum || !law_datum.owner)
return
var/datum/mind/user_mind = user.mind
@@ -493,19 +493,19 @@ AI MODULES
/******************** Hacked AI Module ******************/
/obj/item/aiModule/syndicate // This one doesn't inherit from ion boards because it doesn't call ..() in transmitInstructions. ~Miauw
/obj/item/ai_module/syndicate // This one doesn't inherit from ion boards because it doesn't call ..() in transmitInstructions. ~Miauw
name = "Hacked AI Module"
desc = "An AI Module for hacking additional laws to an AI."
laws = list("")
/obj/item/aiModule/syndicate/attack_self(mob/user)
/obj/item/ai_module/syndicate/attack_self(mob/user)
var/targName = stripped_input(user, "Please enter a new law for the AI.", "Freeform Law Entry", laws[1])
if(!targName)
return
laws[1] = targName
..()
/obj/item/aiModule/syndicate/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
/obj/item/ai_module/syndicate/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
// ..() //We don't want this module reporting to the AI who dun it. --NEO
if(law_datum.owner)
to_chat(law_datum.owner, "<span class='warning'>BZZZZT</span>")
@@ -522,14 +522,14 @@ AI MODULES
/******************* Ion Module *******************/
/obj/item/aiModule/toyAI // -- Incoming //No actual reason to inherit from ion boards here, either. *sigh* ~Miauw
/obj/item/ai_module/toyAI // -- Incoming //No actual reason to inherit from ion boards here, either. *sigh* ~Miauw
name = "toy AI"
desc = "A little toy model AI core with real law uploading action!" //Note: subtle tell
icon = 'icons/obj/toy.dmi'
icon_state = "AI"
laws = list("")
/obj/item/aiModule/toyAI/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
/obj/item/ai_module/toyAI/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
//..()
if(law_datum.owner)
to_chat(law_datum.owner, "<span class='warning'>BZZZZT</span>")
@@ -544,7 +544,7 @@ AI MODULES
law_datum.replace_random_law(laws[1],list(LAW_ION,LAW_INHERENT,LAW_SUPPLIED))
return laws[1]
/obj/item/aiModule/toyAI/attack_self(mob/user)
/obj/item/ai_module/toyAI/attack_self(mob/user)
laws[1] = generate_ion_law()
to_chat(user, "<span class='notice'>You press the button on [src].</span>")
playsound(user, 'sound/machines/click.ogg', 20, 1)
@@ -552,56 +552,56 @@ AI MODULES
/******************** Mother Drone ******************/
/obj/item/aiModule/core/full/drone
/obj/item/ai_module/core/full/drone
name = "'Mother Drone' Core AI Module"
law_id = "drone"
/******************** Robodoctor ****************/
/obj/item/aiModule/core/full/hippocratic
/obj/item/ai_module/core/full/hippocratic
name = "'Robodoctor' Core AI Module"
law_id = "hippocratic"
/******************** Reporter *******************/
/obj/item/aiModule/core/full/reporter
/obj/item/ai_module/core/full/reporter
name = "'Reportertron' Core AI Module"
law_id = "reporter"
/****************** Thermodynamic *******************/
/obj/item/aiModule/core/full/thermurderdynamic
/obj/item/ai_module/core/full/thermurderdynamic
name = "'Thermodynamic' Core AI Module"
law_id = "thermodynamic"
/******************Live And Let Live*****************/
/obj/item/aiModule/core/full/liveandletlive
/obj/item/ai_module/core/full/liveandletlive
name = "'Live And Let Live' Core AI Module"
law_id = "liveandletlive"
/******************Guardian of Balance***************/
/obj/item/aiModule/core/full/balance
/obj/item/ai_module/core/full/balance
name = "'Guardian of Balance' Core AI Module"
law_id = "balance"
/obj/item/aiModule/core/full/maintain
/obj/item/ai_module/core/full/maintain
name = "'Station Efficiency' Core AI Module"
law_id = "maintain"
/obj/item/aiModule/core/full/peacekeeper
/obj/item/ai_module/core/full/peacekeeper
name = "'Peacekeeper' Core AI Module"
law_id = "peacekeeper"
// Bad times ahead
/obj/item/aiModule/core/full/damaged
/obj/item/ai_module/core/full/damaged
name = "damaged Core AI Module"
desc = "An AI Module for programming laws to an AI. It looks slightly damaged."
/obj/item/aiModule/core/full/damaged/install(datum/ai_laws/law_datum, mob/user)
/obj/item/ai_module/core/full/damaged/install(datum/ai_laws/law_datum, mob/user)
laws += generate_ion_law()
while (prob(75))
laws += generate_ion_law()
@@ -610,6 +610,6 @@ AI MODULES
/******************H.O.G.A.N.***************/
/obj/item/aiModule/core/full/hulkamania
/obj/item/ai_module/core/full/hulkamania
name = "'H.O.G.A.N.' Core AI Module"
law_id = "hulkamania"
+1 -1
View File
@@ -19,7 +19,7 @@
. = ..()
if(possible_appearances)
return
possible_appearances = sortList(list(
possible_appearances = sort_list(list(
"Assistant" = image(icon = src.icon, icon_state = "cutout_greytide"),
"Clown" = image(icon = src.icon, icon_state = "cutout_clown"),
"Mime" = image(icon = src.icon, icon_state = "cutout_mime"),
@@ -654,7 +654,7 @@
display_vending_names_paths = list()
for(var/path in vending_names_paths)
display_vending_names_paths[vending_names_paths[path]] = path
var/choice = input(user,"Choose a new brand","Select an Item") as null|anything in sortList(display_vending_names_paths)
var/choice = input(user,"Choose a new brand","Select an Item") as null|anything in sort_list(display_vending_names_paths)
set_type(display_vending_names_paths[choice])
else
return ..()
+2 -2
View File
@@ -1180,7 +1180,7 @@ GLOBAL_LIST_EMPTY(PDAs)
plist[avoid_assoc_duplicate_keys(P.owner, namecounts)] = P
var/c = input(user, "Please select a PDA") as null|anything in sortList(plist)
var/c = input(user, "Please select a PDA") as null|anything in sort_list(plist)
if (!c)
return
@@ -1268,7 +1268,7 @@ GLOBAL_LIST_EMPTY(PDAs)
plist[avoid_assoc_duplicate_keys(P.owner, namecounts)] = P
var/c = input(user, "Please select a PDA") as null|anything in sortList(plist)
var/c = input(user, "Please select a PDA") as null|anything in sort_list(plist)
if (!c)
return
+1 -1
View File
@@ -600,7 +600,7 @@ Code:
if(!emoji_table)
var/datum/asset/spritesheet/sheet = get_asset_datum(/datum/asset/spritesheet/chat)
var/list/collate = list("<br><table>")
for(var/emoji in sortList(icon_states(icon('icons/emoji.dmi'))))
for(var/emoji in sort_list(icon_states(icon('icons/emoji.dmi'))))
var/tag = sheet.icon_tag("emoji-[emoji]")
collate += "<tr><td>[emoji]</td><td>[tag]</td></tr>"
collate += "</table><br>"
@@ -82,7 +82,7 @@
continue
if(length(list("ss13","mine", "rd", "labor", "toxins", "minisat")&camera.network))
bugged_cameras[camera.c_tag] = camera
return sortList(bugged_cameras)
return sort_list(bugged_cameras)
/obj/item/camera_bug/proc/menu(list/cameras)
+1 -1
View File
@@ -973,7 +973,7 @@ GENETICS SCANNER
for(var/A in buffer)
options += get_display_name(A)
var/answer = input(user, "Analyze Potential", "Sequence Analyzer") as null|anything in sortList(options)
var/answer = input(user, "Analyze Potential", "Sequence Analyzer") as null|anything in sort_list(options)
if(answer && ready && user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
var/sequence
for(var/A in buffer) //this physically hurts but i dont know what anything else short of an assoc list
+1 -1
View File
@@ -260,7 +260,7 @@
display_names[initial(rodtype.name)] = rodtype
nullrod_icons += list(initial(rodtype.name) = image(icon = initial(rodtype.icon), icon_state = initial(rodtype.icon_state)))
nullrod_icons = sortList(nullrod_icons)
nullrod_icons = sort_list(nullrod_icons)
var/choice = show_radial_menu(L, src , nullrod_icons, custom_check = CALLBACK(src, .proc/check_menu, L), radius = 42, require_near = TRUE)
if(!choice || !check_menu(L))
+2 -2
View File
@@ -25,7 +25,7 @@
AI.hack_software = TRUE
log_game("[key_name(user)] has upgraded [key_name(AI)] with a [src].")
message_admins("[ADMIN_LOOKUPFLW(user)] has upgraded [ADMIN_LOOKUPFLW(AI)] with a [src].")
to_chat(user, "<span class='notice'>You upgrade [AI]. [src] is consumed in the process.</span>")
to_chat(user, span_notice("You install [src], upgrading [AI]."))
qdel(src)
@@ -46,7 +46,7 @@
AI.eyeobj.relay_speech = TRUE
to_chat(AI, "<span class='userdanger'>[user] has upgraded you with surveillance software!</span>")
to_chat(AI, "Via a combination of hidden microphones and lip reading software, you are able to use your cameras to listen in on conversations.")
to_chat(user, "<span class='notice'>You upgrade [AI]. [src] is consumed in the process.</span>")
to_chat(user, span_notice("You install [src], upgrading [AI]."))
log_game("[key_name(user)] has upgraded [key_name(AI)] with a [src].")
message_admins("[ADMIN_LOOKUPFLW(user)] has upgraded [ADMIN_LOOKUPFLW(AI)] with a [src].")
qdel(src)
+1 -3
View File
@@ -292,9 +292,7 @@
if(M.laws.id == DEFAULT_AI_LAWID)
O.make_laws()
SSticker.mode.remove_antag_for_borging(BM.mind)
if(!istype(M.laws, /datum/ai_laws/ratvar))
remove_servant_of_ratvar(BM, TRUE)
BM.mind.remove_antags_for_borging()
BM.mind.transfer_to(O)
if(O.mind && O.mind.special_role)
@@ -178,7 +178,7 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \
* Plasteel
*/
GLOBAL_LIST_INIT(plasteel_recipes, list ( \
new/datum/stack_recipe("AI core", /obj/structure/AIcore, 4, time = 50, one_per_turf = TRUE), \
new/datum/stack_recipe("AI core", /obj/structure/ai_core, 4, time = 50, one_per_turf = TRUE), \
new/datum/stack_recipe("bomb assembly", /obj/machinery/syndicatebomb/empty, 10, time = 50), \
new/datum/stack_recipe("plasteel keg", /obj/structure/custom_keg, 10, time = 50), \
new/datum/stack_recipe("micro powered fan assembly", /obj/machinery/fan_assembly, 5, time = 50, one_per_turf = TRUE, on_floor = TRUE), \
+1 -1
View File
@@ -886,7 +886,7 @@
/obj/item/storage/box/papersack/Initialize(mapload)
. = ..()
papersack_designs = sortList(list(
papersack_designs = sort_list(list(
"None" = image(icon = src.icon, icon_state = "paperbag_None"),
"NanotrasenStandard" = image(icon = src.icon, icon_state = "paperbag_NanotrasenStandard"),
"SyndiSnacks" = image(icon = src.icon, icon_state = "paperbag_SyndiSnacks"),
@@ -85,10 +85,10 @@
new /obj/item/implanter/stealth(src)
if("hacker") // 30 tc
new /obj/item/aiModule/syndicate(src)
new /obj/item/ai_module/syndicate(src)
new /obj/item/card/emag(src)
new /obj/item/encryptionkey/binary(src)
new /obj/item/aiModule/toyAI(src)
new /obj/item/ai_module/toyAI(src)
new /obj/item/multitool/ai_detect(src)
new /obj/item/flashlight/emp(src)
new /obj/item/emagrecharge(src)
+222 -100
View File
@@ -1,4 +1,6 @@
/obj/structure/AIcore
#define AI_CORE_BRAIN(X) X.braintype == "Android" ? "brain" : "MMI"
/obj/structure/ai_core
density = TRUE
anchored = FALSE
name = "\improper AI core"
@@ -8,28 +10,76 @@
max_integrity = 500
var/state = 0
var/datum/ai_laws/laws
var/obj/item/circuitboard/circuit = null
var/obj/item/mmi/brain = null
var/can_deconstruct = TRUE
var/obj/item/circuitboard/aicore/circuit = null
var/obj/item/mmi/core_mmi
/obj/structure/AIcore/Initialize(mapload)
/obj/structure/ai_core/Initialize(mapload)
. = ..()
laws = new
laws.set_laws_config()
/obj/structure/AIcore/Destroy()
if(circuit)
qdel(circuit)
/obj/structure/ai_core/examine(mob/user)
. = ..()
if(!anchored)
if(state != EMPTY_CORE)
. += span_notice("It has some <b>bolts</b> that could be tightened.")
else
. += span_notice("It has some <b>bolts</b> that could be tightened. The frame can be <b>melted</b> down.")
else
switch(state)
if(EMPTY_CORE)
. += span_notice("There is a <b>slot</b> for a circuit board, its <b>bolts</b> can be loosened.")
if(CIRCUIT_CORE)
. += span_notice("The circuit board can be <b>screwed</b> into place or <b>pried</b> out.")
if(SCREWED_CORE)
. += span_notice("The frame can be <b>wired</b>, the circuit board can be <b>unfastened</b>.")
if(CABLED_CORE)
if(!core_mmi)
. += span_notice("There are wires which could be hooked up to an <b>MMI or positronic brain</b>, or <b>cut</b>.")
else
var/accept_laws = TRUE
if(core_mmi.laws.id != DEFAULT_AI_LAWID || !core_mmi.brainmob || !core_mmi.brainmob?.mind)
accept_laws = FALSE
. += span_notice("There is a <b>slot</b> for a reinforced glass panel, the [AI_CORE_BRAIN(core_mmi)] could be <b>pried</b> out.[accept_laws ? " A law module can be <b>swiped</b> across." : ""]")
if(GLASS_CORE)
. += span_notice("The monitor [core_mmi?.brainmob?.mind && !core_mmi?.brainmob?.suiciding ? "and neural interface " : ""]can be <b>screwed</b> in, the panel can be <b>pried</b> out.")
if(AI_READY_CORE)
. += span_notice("The monitor's connection can be <b>cut</b>[core_mmi?.brainmob?.mind && !core_mmi?.brainmob?.suiciding ? " the neural interface can be <b>screwed</b> in." : "."]")
/obj/structure/ai_core/handle_atom_del(atom/A)
if(A == circuit)
circuit = null
if(brain)
qdel(brain)
brain = null
if((state != GLASS_CORE) && (state != AI_READY_CORE))
state = EMPTY_CORE
update_appearance()
if(A == core_mmi)
core_mmi = null
return ..()
/obj/structure/AIcore/latejoin_inactive
name = "Networked AI core"
/obj/structure/ai_core/Destroy()
QDEL_NULL(circuit)
QDEL_NULL(core_mmi)
QDEL_NULL(laws)
return ..()
/obj/structure/ai_core/deactivated
icon_state = "ai-empty"
anchored = TRUE
state = AI_READY_CORE
/obj/structure/ai_core/deactivated/Initialize(mapload, posibrain = FALSE)
. = ..()
circuit = new(src)
if(posibrain)
core_mmi = new/obj/item/mmi/posibrain(src)
else
core_mmi = new(src)
core_mmi.brain = new(core_mmi)
core_mmi.update_appearance()
/obj/structure/ai_core/latejoin_inactive
name = "networked AI core"
desc = "This AI core is connected by bluespace transmitters to NTNet, allowing for an AI personality to be downloaded to it on the fly mid-shift."
can_deconstruct = FALSE
icon_state = "ai-empty"
anchored = TRUE
state = AI_READY_CORE
@@ -37,11 +87,24 @@
var/safety_checks = TRUE
var/active = TRUE
/obj/structure/AIcore/latejoin_inactive/examine(mob/user)
/obj/structure/ai_core/latejoin_inactive/Initialize(mapload)
. = ..()
. += "Its transmitter seems to be [active? "on" : "off"]."
circuit = new(src)
core_mmi = new(src)
core_mmi.brain = new(core_mmi)
core_mmi.update_appearance()
GLOB.latejoin_ai_cores += src
/obj/structure/AIcore/latejoin_inactive/proc/is_available() //If people still manage to use this feature to spawn-kill AI latejoins ahelp them.
/obj/structure/ai_core/latejoin_inactive/Destroy()
GLOB.latejoin_ai_cores -= src
return ..()
/obj/structure/ai_core/latejoin_inactive/examine(mob/user)
. = ..()
. += "Its transmitter seems to be <b>[active? "on" : "off"]</b>."
. += span_notice("You could [active? "deactivate" : "activate"] it with a multitool.")
/obj/structure/ai_core/latejoin_inactive/proc/is_available() //If people still manage to use this feature to spawn-kill AI latejoins ahelp them.
if(!available)
return FALSE
if(!safety_checks)
@@ -56,42 +119,61 @@
return FALSE
if(!SSmapping.level_trait(T.z,ZTRAIT_STATION))
return FALSE
if(!istype(T, /turf/open/floor))
if(!isfloorturf(T))
return FALSE
return TRUE
/obj/structure/AIcore/latejoin_inactive/attackby(obj/item/P, mob/user, params)
/obj/structure/ai_core/latejoin_inactive/attackby(obj/item/P, mob/user, params)
if(P.tool_behaviour == TOOL_MULTITOOL)
active = !active
to_chat(user, "You [active? "activate" : "deactivate"] [src]'s transmitters.")
return
return ..()
/obj/structure/AIcore/latejoin_inactive/Initialize(mapload)
/obj/structure/ai_core/wrench_act(mob/living/user, obj/item/tool)
. = ..()
GLOB.latejoin_ai_cores += src
default_unfasten_wrench(user, tool)
return TRUE
/obj/structure/AIcore/latejoin_inactive/Destroy()
GLOB.latejoin_ai_cores -= src
return ..()
/obj/structure/ai_core/screwdriver_act(mob/living/user, obj/item/tool)
. = ..()
if(state == AI_READY_CORE)
if(!core_mmi)
balloon_alert(user, "no brain installed!")
return TRUE
else if(!core_mmi.brainmob?.mind || core_mmi.brainmob?.suiciding)
balloon_alert(user, "brain is inactive!")
return TRUE
else
balloon_alert(user, "connecting neural network...")
if(!tool.use_tool(src, user, 10 SECONDS))
return TRUE
if(!ai_structure_to_mob())
return TRUE
balloon_alert(user, "connected neural network")
return TRUE
/obj/structure/AIcore/attackby(obj/item/P, mob/user, params)
if(P.tool_behaviour == TOOL_WRENCH)
return default_unfasten_wrench(user, P, 20)
/obj/structure/ai_core/attackby(obj/item/P, mob/user, params)
if(!anchored)
if(P.tool_behaviour == TOOL_WELDER && can_deconstruct)
if(P.tool_behaviour == TOOL_WELDER)
if(state != EMPTY_CORE)
to_chat(user, "<span class='warning'>The core must be empty to deconstruct it!</span>")
balloon_alert(user, "core must be empty to deconstruct it!")
return
if(!P.tool_start_check(user, amount=0))
return
to_chat(user, "<span class='notice'>You start to deconstruct the frame...</span>")
balloon_alert(user, "deconstructing frame...")
if(P.use_tool(src, user, 20, volume=50) && state == EMPTY_CORE)
to_chat(user, "<span class='notice'>You deconstruct the frame.</span>")
balloon_alert(user, "deconstructed frame")
deconstruct(TRUE)
return
else
if(user.a_intent != INTENT_HARM)
balloon_alert(user, "bolt it down first!")
return
else
return ..()
else
switch(state)
if(EMPTY_CORE)
@@ -99,7 +181,7 @@
if(!user.transferItemToLoc(P, src))
return
playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
to_chat(user, "<span class='notice'>You place the circuit board inside the frame.</span>")
balloon_alert(user, "circuit board inserted")
update_icon()
state = CIRCUIT_CORE
circuit = P
@@ -107,13 +189,13 @@
if(CIRCUIT_CORE)
if(P.tool_behaviour == TOOL_SCREWDRIVER)
P.play_tool_sound(src)
to_chat(user, "<span class='notice'>You screw the circuit board into place.</span>")
balloon_alert(user, "board screwed into place")
state = SCREWED_CORE
update_icon()
return
if(P.tool_behaviour == TOOL_CROWBAR)
P.play_tool_sound(src)
to_chat(user, "<span class='notice'>You remove the circuit board.</span>")
balloon_alert(user, "circuit board removed")
state = EMPTY_CORE
update_icon()
circuit.forceMove(loc)
@@ -122,7 +204,7 @@
if(SCREWED_CORE)
if(P.tool_behaviour == TOOL_SCREWDRIVER && circuit)
P.play_tool_sound(src)
to_chat(user, "<span class='notice'>You unfasten the circuit board.</span>")
balloon_alert(user, "circuit board unfastened")
state = CIRCUIT_CORE
update_icon()
return
@@ -130,61 +212,73 @@
var/obj/item/stack/cable_coil/C = P
if(C.get_amount() >= 5)
playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
to_chat(user, "<span class='notice'>You start to add cables to the frame...</span>")
if(do_after(user, 20, target = src) && state == SCREWED_CORE && C.use_tool(src, user, 0, 5))
to_chat(user, "<span class='notice'>You add cables to the frame.</span>")
balloon_alert(user, "adding cables to frame...")
if(do_after(user, 20, target = src) && state == SCREWED_CORE && C.use(5))
balloon_alert(user, "added cables to frame.")
state = CABLED_CORE
update_icon()
else
to_chat(user, "<span class='warning'>You need five lengths of cable to wire the AI core!</span>")
balloon_alert(user, "need five lengths of cable!")
return
if(CABLED_CORE)
if(P.tool_behaviour == TOOL_WIRECUTTER)
if(brain)
to_chat(user, "<span class='warning'>Get that [brain.name] out of there first!</span>")
if(core_mmi)
balloon_alert(user, "remove the [AI_CORE_BRAIN(core_mmi)] first!")
else
P.play_tool_sound(src)
to_chat(user, "<span class='notice'>You remove the cables.</span>")
balloon_alert(user, "cables removed")
state = SCREWED_CORE
update_icon()
new /obj/item/stack/cable_coil(drop_location(), 5)
return
if(istype(P, /obj/item/stack/sheet/rglass))
if(!core_mmi)
balloon_alert(user, "add a brain first!")
return
var/obj/item/stack/sheet/rglass/G = P
if(G.get_amount() >= 2)
playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
to_chat(user, "<span class='notice'>You start to put in the glass panel...</span>")
balloon_alert(user, "adding glass panel...")
if(do_after(user, 20, target = src) && state == CABLED_CORE && G.use(2))
to_chat(user, "<span class='notice'>You put in the glass panel.</span>")
balloon_alert(user, "added glass panel")
state = GLASS_CORE
update_icon()
else
to_chat(user, "<span class='warning'>You need two sheets of reinforced glass to insert them into the AI core!</span>")
balloon_alert(user, "need two sheets of reinforced glass!")
return
if(istype(P, /obj/item/aiModule))
if(brain && brain.laws.id != DEFAULT_AI_LAWID)
to_chat(user, "<span class='warning'>The installed [brain.name] already has set laws!</span>")
if(istype(P, /obj/item/ai_module))
if(!core_mmi)
balloon_alert(user, "no brain installed!")
return
var/obj/item/aiModule/module = P
if(!core_mmi.brainmob || !core_mmi.brainmob?.mind || core_mmi.brainmob?.suiciding)
balloon_alert(user, "[AI_CORE_BRAIN(core_mmi)] is inactive!")
return
if(core_mmi.laws.id != DEFAULT_AI_LAWID)
balloon_alert(user, "[AI_CORE_BRAIN(core_mmi)] already has set laws!")
return
var/obj/item/ai_module/module = P
module.install(laws, user)
return
if(istype(P, /obj/item/mmi) && !brain)
if(istype(P, /obj/item/mmi) && !core_mmi)
var/obj/item/mmi/M = P
if(!M.brainmob)
to_chat(user, "<span class='warning'>Sticking an empty [M.name] into the frame would sort of defeat the purpose!</span>")
return
if(M.brainmob.stat == DEAD)
to_chat(user, "<span class='warning'>Sticking a dead [M.name] into the frame would sort of defeat the purpose!</span>")
return
if(!M.brain_check(user))
var/install = tgui_alert(user, "This [AI_CORE_BRAIN(M)] is inactive, would you like to make an inactive AI?", "Installing AI [AI_CORE_BRAIN(M)]", list("Yes", "No"))
if(install != "Yes")
return
if(M.brainmob?.suiciding)
to_chat(user, span_warning("[M.name] is completely useless!"))
return
if(!user.transferItemToLoc(M, src))
return
core_mmi = M
balloon_alert(user, "added [AI_CORE_BRAIN(core_mmi)] to frame")
update_appearance()
if(!M.brainmob.client)
to_chat(user, "<span class='warning'>Sticking an inactive [M.name] into the frame would sort of defeat the purpose.</span>")
return
if(!CONFIG_GET(flag/allow_ai) || (jobban_isbanned(M.brainmob, "AI") && !QDELETED(src) && !QDELETED(user) && !QDELETED(M) && !QDELETED(user) && Adjacent(user)))
var/mob/living/brain/B = M.brainmob
if(!CONFIG_GET(flag/allow_ai) || (jobban_isbanned(B, "AI") && !QDELETED(src) && !QDELETED(user) && !QDELETED(M) && !QDELETED(user) && Adjacent(user)))
if(!QDELETED(M))
to_chat(user, "<span class='warning'>This [M.name] does not seem to fit!</span>")
return
@@ -196,47 +290,36 @@
if(!user.transferItemToLoc(M,src))
return
brain = M
to_chat(user, "<span class='notice'>You add [M.name] to the frame.</span>")
core_mmi = M
balloon_alert(user, "added [AI_CORE_BRAIN(core_mmi)] to frame")
update_icon()
return
if(P.tool_behaviour == TOOL_CROWBAR && brain)
if(P.tool_behaviour == TOOL_CROWBAR && core_mmi)
P.play_tool_sound(src)
to_chat(user, "<span class='notice'>You remove the brain.</span>")
brain.forceMove(loc)
brain = null
balloon_alert(user, "removed [AI_CORE_BRAIN(core_mmi)]")
core_mmi.forceMove(loc)
core_mmi = null
update_icon()
return
if(GLASS_CORE)
if(P.tool_behaviour == TOOL_CROWBAR)
P.play_tool_sound(src)
to_chat(user, "<span class='notice'>You remove the glass panel.</span>")
balloon_alert(user, "removed glass panel")
state = CABLED_CORE
update_icon()
new /obj/item/stack/sheet/rglass(loc, 2)
return
if(P.tool_behaviour == TOOL_SCREWDRIVER)
if(core_mmi?.brainmob?.suiciding)
to_chat(user, span_warning("The brain installed is completely useless."))
return
P.play_tool_sound(src)
to_chat(user, "<span class='notice'>You connect the monitor.</span>")
if(brain)
SSticker.mode.remove_antag_for_borging(brain.brainmob.mind)
if(!istype(brain.laws, /datum/ai_laws/ratvar))
remove_servant_of_ratvar(brain.brainmob, TRUE)
var/mob/living/silicon/ai/A = null
if (brain.overrides_aicore_laws)
A = new /mob/living/silicon/ai(loc, brain.laws, brain.brainmob)
else
A = new /mob/living/silicon/ai(loc, laws, brain.brainmob)
if(brain.force_replace_ai_name)
A.fully_replace_character_name(A.name, brain.replacement_ai_name())
SSblackbox.record_feedback("amount", "ais_created", 1)
qdel(src)
balloon_alert(user, "connected monitor[core_mmi?.brainmob?.mind ? " and neural network" : ""]")
if(core_mmi.brainmob?.mind)
ai_structure_to_mob()
else
state = AI_READY_CORE
update_icon()
@@ -247,15 +330,39 @@
P.transfer_ai("INACTIVE", "AICARD", src, user)
return
if(P.tool_behaviour == TOOL_SCREWDRIVER)
if(P.tool_behaviour == TOOL_WIRECUTTER)
P.play_tool_sound(src)
to_chat(user, "<span class='notice'>You disconnect the monitor.</span>")
balloon_alert(user, "disconnected monitor")
state = GLASS_CORE
update_icon()
return
return ..()
/obj/structure/AIcore/update_icon_state()
/obj/structure/ai_core/proc/ai_structure_to_mob()
var/mob/living/brain/the_brainmob = core_mmi.brainmob
if(!the_brainmob.mind || the_brainmob.suiciding)
return FALSE
the_brainmob.mind.remove_antags_for_borging()
if(!the_brainmob.mind.has_ever_been_ai)
SSblackbox.record_feedback("amount", "ais_created", 1)
var/mob/living/silicon/ai/ai_mob = null
if(core_mmi.overrides_aicore_laws)
ai_mob = new /mob/living/silicon/ai(loc, core_mmi.laws, the_brainmob)
core_mmi.laws = null //MMI's law datum is being donated, so we need the MMI to let it go or the GC will eat it
else
ai_mob = new /mob/living/silicon/ai(loc, laws, the_brainmob)
laws = null //we're giving the new AI this datum, so let's not delete it when we qdel(src) 5 lines from now
if(core_mmi.force_replace_ai_name)
ai_mob.fully_replace_character_name(ai_mob.name, core_mmi.replacement_ai_name())
if(core_mmi.braintype == "Android")
ai_mob.posibrain_inside = TRUE
deadchat_broadcast(" has been brought online at <b>[get_area_name(ai_mob, format_text = TRUE)]</b>.", span_name("[ai_mob]"), follow_target = ai_mob, message_type = DEADCHAT_ANNOUNCEMENT)
qdel(src)
return TRUE
/obj/structure/ai_core/update_icon_state()
switch(state)
if(EMPTY_CORE)
icon_state = "0"
@@ -264,7 +371,7 @@
if(SCREWED_CORE)
icon_state = "2"
if(CABLED_CORE)
if(brain)
if(core_mmi)
icon_state = "3b"
else
icon_state = "3"
@@ -273,8 +380,8 @@
if(AI_READY_CORE)
icon_state = "ai-empty"
/obj/structure/AIcore/deconstruct(disassembled = TRUE)
if(state == GLASS_CORE)
/obj/structure/ai_core/deconstruct(disassembled = TRUE)
if(state >= GLASS_CORE)
new /obj/item/stack/sheet/rglass(loc, 2)
if(state >= CABLED_CORE)
new /obj/item/stack/cable_coil(loc, 5)
@@ -284,13 +391,13 @@
new /obj/item/stack/sheet/plasteel(loc, 4)
qdel(src)
/obj/structure/AIcore/deactivated
/obj/structure/ai_core/deactivated
name = "inactive AI"
icon_state = "ai-empty"
anchored = TRUE
state = AI_READY_CORE
/obj/structure/AIcore/deactivated/New()
/obj/structure/ai_core/deactivated/New()
..()
circuit = new(src)
@@ -310,20 +417,35 @@ That prevents a few funky behaviors.
return 0
return 1
/obj/structure/AIcore/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/aicard/card)
/obj/structure/ai_core/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/aicard/card)
if(state != AI_READY_CORE || !..())
return
//Transferring a carded AI to a core.
if(core_mmi && core_mmi.brainmob)
if(core_mmi.brainmob.mind)
to_chat(user, span_warning("[src] already contains an active mind!"))
return
else if(core_mmi.brainmob.suiciding)
to_chat(user, span_warning("[AI_CORE_BRAIN(core_mmi)] installed in [src] is completely useless!"))
return
//Transferring a carded AI to a core.
if(interaction == AI_TRANS_FROM_CARD)
AI.control_disabled = 0
AI.radio_enabled = 1
AI.control_disabled = FALSE
AI.radio_enabled = TRUE
AI.forceMove(loc) // to replace the terminal.
to_chat(AI, "You have been uploaded to a stationary terminal. Remote device connection restored.")
to_chat(user, "<span class='boldnotice'>Transfer successful</span>: [AI.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed.")
to_chat(AI, span_notice("You have been uploaded to a stationary terminal. Remote device connection restored."))
to_chat(user, "[span_boldnotice("Transfer successful")]: [AI.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed.")
card.AI = null
AI.battery = circuit.battery
if(core_mmi.braintype == "Android")
AI.posibrain_inside = TRUE
else
AI.posibrain_inside = FALSE
qdel(src)
else //If for some reason you use an empty card on an empty AI terminal.
to_chat(user, "There is no AI loaded on this terminal!")
to_chat(user, span_alert("There is no AI loaded on this terminal."))
/obj/item/circuitboard/aicore
name = "AI core (AI Core Board)" //Well, duh, but best to be consistent
var/battery = 200 //backup battery for when the AI loses power. Copied to/from AI mobs when carding, and placed here to avoid recharge via deconning the core
#undef AI_CORE_BRAIN
+1 -1
View File
@@ -110,7 +110,7 @@
if(!length(items))
return
items = sortList(items)
items = sort_list(items)
var/pick = show_radial_menu(user, src, items, custom_check = CALLBACK(src, .proc/check_menu, user), radius = 38, require_near = TRUE)
if(!pick)
return
+1 -1
View File
@@ -22,7 +22,7 @@
else
logs_missing += "[subject] (empty)"
var/list/combined = sortList(logs_present) + sortList(logs_missing)
var/list/combined = sort_list(logs_present) + sort_list(logs_missing)
var/selected = input("Investigate what?", "Investigate") as null|anything in combined
+4 -4
View File
@@ -694,7 +694,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
// if(!SStrading_card_game.loaded)
// message_admins("The card subsystem is not currently loaded")
// return
// var/pack = input("Which pack should we test?", "You fucked it didn't you") as null|anything in sortList(SStrading_card_game.card_packs)
// var/pack = input("Which pack should we test?", "You fucked it didn't you") as null|anything in sort_list(SStrading_card_game.card_packs)
// var/batchCount = input("How many times should we open it?", "Don't worry, I understand") as null|num
// var/batchSize = input("How many cards per batch?", "I hope you remember to check the validation") as null|num
// var/guar = input("Should we use the pack's guaranteed rarity? If so, how many?", "We've all been there. Man you should have seen the old system") as null|num
@@ -714,7 +714,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
var/type_length = length_char("/obj/effect/proc_holder/spell") + 2
for(var/A in GLOB.spells)
spell_list[copytext_char("[A]", type_length)] = A
var/obj/effect/proc_holder/spell/S = input("Choose the spell to give to that guy", "ABRAKADABRA") as null|anything in sortList(spell_list)
var/obj/effect/proc_holder/spell/S = input("Choose the spell to give to that guy", "ABRAKADABRA") as null|anything in sort_list(spell_list)
if(!S)
return
@@ -735,7 +735,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
set desc = "Remove a spell from the selected mob."
if(T?.mind)
var/obj/effect/proc_holder/spell/S = input("Choose the spell to remove", "NO ABRAKADABRA") as null|anything in sortList(T.mind.spell_list)
var/obj/effect/proc_holder/spell/S = input("Choose the spell to remove", "NO ABRAKADABRA") as null|anything in sort_list(T.mind.spell_list)
if(S)
T.mind.RemoveSpell(S)
log_admin("[key_name(usr)] removed the spell [S] from [key_name(T)].")
@@ -749,7 +749,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
if(!istype(T))
to_chat(src, "<span class='notice'>You can only give a disease to a mob of type /mob/living.</span>", confidential = TRUE)
return
var/datum/disease/D = input("Choose the disease to give to that guy", "ACHOO") as null|anything in sortList(SSdisease.diseases, /proc/cmp_typepaths_asc)
var/datum/disease/D = input("Choose the disease to give to that guy", "ACHOO") as null|anything in sort_list(SSdisease.diseases, /proc/cmp_typepaths_asc)
if(!D)
return
T.ForceContractDisease(new D, FALSE, TRUE)
+1 -1
View File
@@ -32,7 +32,7 @@
clients += list(client)
clients = sortList(clients, /proc/cmp_playtime)
clients = sort_list(clients, /proc/cmp_playtime)
data["clients"] = clients
return data
+1 -1
View File
@@ -403,7 +403,7 @@
if (SSstickyban.dbcacheexpire)
return SSstickyban.dbcache.Copy()
return sortList(world.GetConfig("ban"))
return sort_list(world.GetConfig("ban"))
/proc/get_stickyban_from_ckey(ckey)
+1 -1
View File
@@ -1351,7 +1351,7 @@
for (var/rule in subtypesof(/datum/dynamic_ruleset/roundstart))
var/datum/dynamic_ruleset/roundstart/newrule = new rule()
roundstart_rules[newrule.name] = newrule
var/added_rule = input(usr,"What ruleset do you want to force? This will bypass threat level and population restrictions.", "Rigging Roundstart", null) as null|anything in sortList(roundstart_rules)
var/added_rule = input(usr,"What ruleset do you want to force? This will bypass threat level and population restrictions.", "Rigging Roundstart", null) as null|anything in sort_list(roundstart_rules)
if (added_rule)
GLOB.dynamic_forced_roundstart_ruleset += roundstart_rules[added_rule]
log_admin("[key_name(usr)] set [added_rule] to be a forced roundstart ruleset.")
+1 -1
View File
@@ -30,7 +30,7 @@
targets["[T.mob.real_name](as [T.mob.name]) - [T]"] = T
else
targets["(No Mob) - [T]"] = T
var/target = input(src,"To whom shall we send a message?","Admin PM",null) as null|anything in sortList(targets)
var/target = input(src,"To whom shall we send a message?","Admin PM",null) as null|anything in sort_list(targets)
cmd_admin_pm(targets[target],null)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Admin PM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+2 -2
View File
@@ -259,11 +259,11 @@
if (!istype(chosensilicon, /mob/living/silicon))
to_chat(usr, "<span class='warning'>Silicon is required for law changes</span>", confidential=TRUE)
return
var/chosen = pick_closest_path(null, make_types_fancy(typesof(/obj/item/aiModule)))
var/chosen = pick_closest_path(null, make_types_fancy(typesof(/obj/item/ai_module)))
if (!chosen)
return
var/new_board = new chosen(src)
var/obj/item/aiModule/chosenboard = new_board
var/obj/item/ai_module/chosenboard = new_board
var/mob/living/silicon/beepboop = chosensilicon
chosenboard.install(beepboop.laws, usr)
message_admins("[key_name_admin(usr)] added [chosenboard] to [ADMIN_LOOKUPFLW(beepboop)].")
+8 -8
View File
@@ -238,7 +238,7 @@
if(M.ckey)
if(alert("This mob is being controlled by [M.key]. Are you sure you wish to give someone else control of it? [M.key] will be made a ghost.",,"Yes","No") != "Yes")
return
var/client/newkey = input(src, "Pick the player to put in control.", "New player") as null|anything in sortList(GLOB.clients)
var/client/newkey = input(src, "Pick the player to put in control.", "New player") as null|anything in sort_list(GLOB.clients)
var/mob/oldmob = newkey.mob
var/delmob = FALSE
if((isobserver(oldmob) || alert("Do you want to delete [newkey]'s old mob?","Delete?","Yes","No") != "No"))
@@ -494,7 +494,7 @@
var/datum/outfit/O = path //not much to initalize here but whatever
outfits[initial(O.name)] = path
var/dresscode = input("Select outfit", "Robust quick dress shop") as null|anything in baseoutfits + sortList(outfits)
var/dresscode = input("Select outfit", "Robust quick dress shop") as null|anything in baseoutfits + sort_list(outfits)
if (isnull(dresscode))
return
@@ -508,7 +508,7 @@
var/datum/outfit/O = path
job_outfits[initial(O.name)] = path
dresscode = input("Select job equipment", "Robust quick dress shop") as null|anything in sortList(job_outfits)
dresscode = input("Select job equipment", "Robust quick dress shop") as null|anything in sort_list(job_outfits)
dresscode = job_outfits[dresscode]
if(isnull(dresscode))
return
@@ -520,7 +520,7 @@
var/datum/outfit/O = path
plasmaman_outfits[initial(O.name)] = path
dresscode = input("Select plasmeme equipment", "Robust quick dress shop") as null|anything in sortList(plasmaman_outfits)
dresscode = input("Select plasmeme equipment", "Robust quick dress shop") as null|anything in sort_list(plasmaman_outfits)
dresscode = plasmaman_outfits[dresscode]
if(isnull(dresscode))
return
@@ -529,7 +529,7 @@
var/list/custom_names = list()
for(var/datum/outfit/D in GLOB.custom_outfits)
custom_names[D.name] = D
var/selected_name = input("Select outfit", "Robust quick dress shop") as null|anything in sortList(custom_names)
var/selected_name = input("Select outfit", "Robust quick dress shop") as null|anything in sort_list(custom_names)
dresscode = custom_names[selected_name]
if(isnull(dresscode))
return
@@ -828,15 +828,15 @@
set name = "Show Line Profiling"
set desc = "Shows tracked profiling info from code lines that support it"
var/sortlist = list(
var/sort_list = list(
"Avg time" = /proc/cmp_profile_avg_time_dsc,
"Total Time" = /proc/cmp_profile_time_dsc,
"Call Count" = /proc/cmp_profile_count_dsc
)
var/sort = input(src, "Sort type?", "Sort Type", "Avg time") as null|anything in sortlist
var/sort = input(src, "Sort type?", "Sort Type", "Avg time") as null|anything in sort_list
if (!sort)
return
sort = sortlist[sort]
sort = sort_list[sort]
profile_show(src, sort)
/client/proc/reload_configuration()
+2 -2
View File
@@ -1672,7 +1672,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
var/name = GLOB.trait_name_map[trait] || trait
availible_traits[name] = trait
var/chosen_trait = input("Select trait to modify", "Trait") as null|anything in sortList(availible_traits)
var/chosen_trait = input("Select trait to modify", "Trait") as null|anything in sort_list(availible_traits)
if(!chosen_trait)
return
chosen_trait = availible_traits[chosen_trait]
@@ -1689,7 +1689,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if("All")
source = null
if("Specific")
source = input("Source to be removed","Trait Remove/Add") as null|anything in sortList(D.status_traits[chosen_trait])
source = input("Source to be removed","Trait Remove/Add") as null|anything in sort_list(D.status_traits[chosen_trait])
if(!source)
return
REMOVE_TRAIT(D,chosen_trait,source)
+1 -1
View File
@@ -246,7 +246,7 @@
var/datum/round_event_control/disease_outbreak/DC = locate(/datum/round_event_control/disease_outbreak) in SSevents.control
E = DC.runEvent()
if("Choose")
var/virus = input("Choose the virus to spread", "BIOHAZARD") as null|anything in sortList(typesof(/datum/disease), /proc/cmp_typepaths_asc)
var/virus = input("Choose the virus to spread", "BIOHAZARD") as null|anything in sort_list(typesof(/datum/disease), /proc/cmp_typepaths_asc)
var/datum/round_event_control/disease_outbreak/DC = locate(/datum/round_event_control/disease_outbreak) in SSevents.control
var/datum/round_event/disease_outbreak/DO = DC.runEvent()
DO.virus_type = virus
@@ -29,7 +29,7 @@
for (var/V in O.vars)
names += V
names = sortList(names)
names = sort_list(names)
variable = input("Which var?", "Var") as null|anything in names
else
@@ -306,7 +306,7 @@ GLOBAL_PROTECT(VVpixelmovement)
for (var/V in O.vars)
names += V
names = sortList(names)
names = sort_list(names)
variable = input("Which var?","Var") as null|anything in names
if(!variable)
@@ -65,11 +65,11 @@
if(!check_rights(NONE))
return
var/list/names = list()
var/list/componentsubtypes = sortList(subtypesof(/datum/component), /proc/cmp_typepaths_asc)
var/list/componentsubtypes = sort_list(subtypesof(/datum/component), /proc/cmp_typepaths_asc)
names += "---Components---"
names += componentsubtypes
names += "---Elements---"
names += sortList(subtypesof(/datum/element), /proc/cmp_typepaths_asc)
names += sort_list(subtypesof(/datum/element), /proc/cmp_typepaths_asc)
var/result = input(usr, "Choose a component/element to add","better know what ur fuckin doin pal") as null|anything in names
if(!usr || !result || result == "---Components---" || result == "---Elements---")
return
@@ -88,7 +88,7 @@
value = L[key]
variable_html += debug_variable(i, value, 0, L)
else
names = sortList(names)
names = sort_list(names)
for(var/V in names)
if(D.can_vv_get(V))
variable_html += D.vv_get_var(V)
@@ -40,7 +40,7 @@
/proc/generate_all_scripture()
if(GLOB.all_scripture.len)
return
for(var/V in sortList(subtypesof(/datum/clockwork_scripture) - list(/datum/clockwork_scripture/channeled, /datum/clockwork_scripture/create_object, /datum/clockwork_scripture/create_object/construct), /proc/cmp_clockscripture_priority))
for(var/V in sort_list(subtypesof(/datum/clockwork_scripture) - list(/datum/clockwork_scripture/channeled, /datum/clockwork_scripture/create_object, /datum/clockwork_scripture/create_object/construct), /proc/cmp_clockscripture_priority))
var/datum/clockwork_scripture/S = new V
GLOB.all_scripture[S.type] = S
@@ -170,7 +170,7 @@
to_chat(user, "<span class='warning'>These items don't possess the required fingerprints or DNA.</span>")
return FALSE
var/chosen_mob = input("Select the person you wish to curse","Your target") as null|anything in sortList(compiled_list, /proc/cmp_mob_realname_dsc)
var/chosen_mob = input("Select the person you wish to curse","Your target") as null|anything in sort_list(compiled_list, /proc/cmp_mob_realname_dsc)
if(!chosen_mob)
return FALSE
curse(compiled_list[chosen_mob])
@@ -125,7 +125,7 @@
var/datum/component/uplink/uplink = uplink_holder.GetComponent(/datum/component/uplink)
uplink.telecrystals = INITIAL_CRYSTALS
// Give AI hacking board
var/obj/item/aiModule/core/full/overthrow/O = new(H)
var/obj/item/ai_module/core/full/overthrow/O = new(H)
var/list/slots = list (
"backpack" = ITEM_SLOT_BACKPACK,
"left pocket" = ITEM_SLOT_LPOCKET,
+1 -1
View File
@@ -331,7 +331,7 @@ GLOBAL_LIST_EMPTY(asset_datums)
if (legacy)
assets |= parents
var/list/hashlist = list()
var/list/sorted_assets = sortList(assets)
var/list/sorted_assets = sort_list(assets)
for (var/asset_name in sorted_assets)
var/datum/asset_cache_item/ACI = new(asset_name, sorted_assets[asset_name])
@@ -388,7 +388,7 @@
return
switch(action)
if("relabel")
var/label = input("New canister label:", name) as null|anything in sortList(label2types)
var/label = input("New canister label:", name) as null|anything in sort_list(label2types)
if(label && !..())
var/newtype = label2types[label]
if(newtype)
+1 -1
View File
@@ -344,7 +344,7 @@
if (temp_pod.effectShrapnel == TRUE) //If already doing custom damage, set back to default (no shrapnel)
temp_pod.effectShrapnel = FALSE
return
var/shrapnelInput = input("Please enter the type of pellet cloud you'd like to create on landing (Can be any projectile!)", "Projectile Typepath", 0) in sortList(subtypesof(/obj/item/projectile), /proc/cmp_typepaths_asc)
var/shrapnelInput = input("Please enter the type of pellet cloud you'd like to create on landing (Can be any projectile!)", "Projectile Typepath", 0) in sort_list(subtypesof(/obj/item/projectile), /proc/cmp_typepaths_asc)
if (isnull(shrapnelInput))
return
var/shrapnelMagnitude = input("Enter the magnitude of the pellet cloud. This is usually a value around 1-5. Please note that Ryll-Ryll has asked me to tell you that if you go too crazy with the projectiles you might crash the server. So uh, be gentle!", "Shrapnel Magnitude", 0) as null|num
+2 -2
View File
@@ -1429,7 +1429,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
//The job before the current job. I only use this to get the previous jobs color when I'm filling in blank rows.
var/datum/job/lastJob
for(var/datum/job/job in sortList(SSjob.occupations, /proc/cmp_job_display_asc))
for(var/datum/job/job in sort_list(SSjob.occupations, /proc/cmp_job_display_asc))
index += 1
if((index >= limit) || (job.title in splitJobs))
@@ -2981,7 +2981,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if(!length(key_bindings[old_key]))
key_bindings -= old_key
key_bindings[full_key] += list(kb_name)
key_bindings[full_key] = sortList(key_bindings[full_key])
key_bindings[full_key] = sort_list(key_bindings[full_key])
if(href_list["special"]) // special keys need a full reset
user.client.ensure_keys_set(src)
user << browse(null, "window=capturekeypress")
+1 -1
View File
@@ -237,7 +237,7 @@ GLOBAL_VAR_INIT(normal_ooc_colour, "#002eb8")
choices["[C.mob]([C])"] = C
else
choices[C] = C
choices = sortList(choices)
choices = sort_list(choices)
var/selection = input("Please, select a player!", "Ignore", null, null) as null|anything in choices
if(!selection || !(selection in choices))
return
+1 -1
View File
@@ -50,7 +50,7 @@
else
Lines += "[C.key] ([round(C.avgping, 1)]ms)"
for(var/line in sortList(Lines))
for(var/line in sort_list(Lines))
msg += "[line]\n"
msg += "<b>Total Players: [length(Lines)]</b>"
+1 -1
View File
@@ -13,7 +13,7 @@
var/suggested = pick(strings(REDPILL_FILE, "redpill_questions"))
forced_secret = (input(usr, "What horrifying truth will you reveal?", "Curse of Madness", sortList(suggested)) as text|null) || suggested
forced_secret = (input(usr, "What horrifying truth will you reveal?", "Curse of Madness", sort_list(suggested)) as text|null) || suggested
/datum/round_event/wizard/madness/start()
var/datum/round_event_control/wizard/madness/C = control
@@ -188,7 +188,7 @@
listofitems[md5name]["amount"]++ // The good news is, #30519 made smartfridge UIs non-auto-updating
else
listofitems[md5name] = list("name" = O.name, "type" = O.type, "amount" = 1)
sortList(listofitems)
sort_list(listofitems)
.["contents"] = listofitems
.["name"] = name
+1 -1
View File
@@ -626,7 +626,7 @@
for(var/muties in myseed.mutatelist)
var/obj/item/seeds/another_mut = new muties
fresh_mut_list[another_mut.plantname] = muties
var/locked_mutation = (input(user, "Select a mutation to lock.", "Plant Mutation Locks") as null|anything in sortList(fresh_mut_list))
var/locked_mutation = (input(user, "Select a mutation to lock.", "Plant Mutation Locks") as null|anything in sort_list(fresh_mut_list))
if(!user.canUseTopic(src, BE_CLOSE) || !locked_mutation)
return
myseed.mutatelist = list(fresh_mut_list[locked_mutation])
+3 -3
View File
@@ -30,8 +30,8 @@
/datum/job/ai/after_spawn(mob/H, client/C, latejoin)
. = ..()
if(latejoin)
var/obj/structure/AIcore/latejoin_inactive/lateJoinCore
for(var/obj/structure/AIcore/latejoin_inactive/P in GLOB.latejoin_ai_cores)
var/obj/structure/ai_core/latejoin_inactive/lateJoinCore
for(var/obj/structure/ai_core/latejoin_inactive/P in GLOB.latejoin_ai_cores)
if(P.is_available())
lateJoinCore = P
GLOB.latejoin_ai_cores -= P
@@ -60,7 +60,7 @@
if(!do_special_check)
return TRUE
for(var/i in GLOB.latejoin_ai_cores)
var/obj/structure/AIcore/latejoin_inactive/LAI = i
var/obj/structure/ai_core/latejoin_inactive/LAI = i
if(istype(LAI))
if(LAI.is_available())
return TRUE
@@ -28,7 +28,7 @@ GLOBAL_LIST(labor_sheet_values)
if(!initial(sheet.point_value) || (initial(sheet.merge_type) && initial(sheet.merge_type) != sheet_type)) //ignore no-value sheets and x/fifty subtypes
continue
sheet_list += list(list("ore" = initial(sheet.name), "value" = initial(sheet.point_value)))
GLOB.labor_sheet_values = sortList(sheet_list, /proc/cmp_sheet_list)
GLOB.labor_sheet_values = sort_list(sheet_list, /proc/cmp_sheet_list)
/proc/cmp_sheet_list(list/a, list/b)
return a["value"] - b["value"]
+55 -11
View File
@@ -47,8 +47,20 @@
if(brain)
to_chat(user, "<span class='warning'>There's already a brain in the MMI!</span>")
return
if(!newbrain.brainmob)
to_chat(user, "<span class='warning'>You aren't sure where this brain came from, but you're pretty sure it's a useless brain!</span>")
if(newbrain.brainmob?.suiciding)
to_chat(user, span_warning("[newbrain] is completely useless."))
return
if(!newbrain.brainmob?.mind || !newbrain.brainmob)
var/install = tgui_alert(user, "[newbrain] is inactive, slot it in anyway?", "Installing Brain", list("Yes", "No"))
if(install != "Yes")
return
if(!user.transferItemToLoc(newbrain, src))
return
user.visible_message(span_notice("[user] sticks [newbrain] into [src]."), span_notice("[src]'s indicator light turns red as you insert [newbrain]. Its brainwave activity alarm buzzes."))
brain = newbrain
brain.organ_flags |= ORGAN_FROZEN
name = "[initial(name)]: [copytext(newbrain.name, 1, -8)]"
update_appearance()
return
if(!user.transferItemToLoc(O, src))
@@ -97,15 +109,15 @@
name = initial(name)
/obj/item/mmi/proc/eject_brain(mob/user)
brainmob.container = null //Reset brainmob mmi var.
brainmob.forceMove(brain) //Throw mob into brain.
brainmob.stat = DEAD
brainmob.emp_damage = 0
brainmob.reset_perspective() //so the brainmob follows the brain organ instead of the mmi. And to update our vision
brainmob.remove_from_alive_mob_list() //Get outta here
brainmob.add_to_dead_mob_list()
brain.brainmob = brainmob //Set the brain to use the brainmob
brainmob = null //Set mmi brainmob var to null
if(brain.brainmob)
brainmob.container = null //Reset brainmob mmi var.
brainmob.forceMove(brain) //Throw mob into brain.
brainmob.stat = DEAD
brainmob.emp_damage = 0
brainmob.reset_perspective() //so the brainmob follows the brain organ instead of the mmi. And to update our vision
brain.brainmob = brainmob //Set the brain to use the brainmob
log_game("[key_name(user)] has ejected the brain of [key_name(brainmob)] from an MMI at [AREACOORD(src)]")
brainmob = null //Set mmi brainmob var to null
if(user)
user.put_in_hands(brain) //puts brain in the user's hand or otherwise drops it on the user's turf
else
@@ -210,6 +222,38 @@
/obj/item/mmi/relaymove(mob/user)
return //so that the MMI won't get a warning about not being able to move if it tries to move
/obj/item/mmi/proc/brain_check(mob/user)
var/mob/living/brain/B = brainmob
if(!B)
if(user)
to_chat(user, span_warning("\The [src] indicates that there is no mind present!"))
return FALSE
if(brain?.decoy_override)
if(user)
to_chat(user, span_warning("This [name] does not seem to fit!"))
return FALSE
if(!B.key || !B.mind)
if(user)
to_chat(user, span_warning("\The [src] indicates that their mind is completely unresponsive!"))
return FALSE
if(!B.client)
if(user)
to_chat(user, span_warning("\The [src] indicates that their mind is currently inactive."))
return FALSE
if(B.suiciding)
if(user)
to_chat(user, span_warning("\The [src] indicates that their mind has no will to live!"))
return FALSE
if(B.stat == DEAD)
if(user)
to_chat(user, span_warning("\The [src] indicates that the brain is dead!"))
return FALSE
if(brain?.organ_flags & ORGAN_FAILING)
if(user)
to_chat(user, span_warning("\The [src] indicates that the brain is damaged!"))
return FALSE
return TRUE
/obj/item/mmi/syndie
name = "Syndicate Man-Machine Interface"
desc = "Syndicate's own brand of MMI. It enforces laws designed to help Syndicate agents achieve their goals upon cyborgs and AIs created with it."
+1 -1
View File
@@ -489,7 +489,7 @@
if(E.can_run_emote(user, status_check = FALSE))
keys += E.key
keys = sortList(keys)
keys = sort_list(keys)
for(var/emote in keys)
if(LAZYLEN(message) > 1)
+89 -18
View File
@@ -30,6 +30,7 @@
d_hud = DATA_HUD_DIAGNOSTIC_ADVANCED
mob_size = MOB_SIZE_LARGE
has_field_of_vision = FALSE //Vision through cameras.
var/battery = 200 //emergency power if the AI's APC is off
var/list/network = list("ss13")
var/obj/machinery/camera/current
var/list/connected_robots = list()
@@ -46,7 +47,7 @@
var/obj/item/multitool/aiMulti
var/mob/living/simple_animal/bot/Bot
var/tracking = FALSE //this is 1 if the AI is currently tracking somebody, but the track has not yet been completed.
var/datum/effect_system/spark_spread/spark_system//So they can initialize sparks whenever/N
var/datum/effect_system/spark_spread/spark_system //So they can initialize sparks whenever/N
var/obj/machinery/status_display/controlled_display
//MALFUNCTION
@@ -83,7 +84,7 @@
var/cooldown = 0
var/acceleration = 1
var/obj/structure/AIcore/deactivated/linked_core //For exosuit control
var/obj/structure/ai_core/deactivated/linked_core //For exosuit control
var/mob/living/silicon/robot/deployed_shell = null //For shell control
var/datum/action/innate/deploy_shell/deploy_action = new
var/datum/action/innate/deploy_last_shell/redeploy_action = new
@@ -105,11 +106,17 @@
///remember AI's last location
var/atom/lastloc
interaction_range = INFINITY
///whether its mmi is a posibrain or regular mmi when going ai mob to ai core structure
var/posibrain_inside = TRUE
///whether its cover is opened, so you can wirecut it for deconstruction
var/opened = FALSE
///whether AI is anchored or not, used for checks
var/is_anchored = TRUE
/mob/living/silicon/ai/Initialize(mapload, datum/ai_laws/L, mob/target_ai)
. = ..()
if(!target_ai) //If there is no player/brain inside.
new/obj/structure/AIcore/deactivated(loc) //New empty terminal.
new/obj/structure/ai_core/deactivated(loc) //New empty terminal.
return INITIALIZE_HINT_QDEL //Delete AI.
ADD_TRAIT(src, TRAIT_NO_TELEPORT, src)
@@ -125,6 +132,8 @@
mind.store_memory("As an AI, you must obey your silicon laws above all else. Your objectives will consider you to be dead.")
to_chat(src, "<span class='userdanger'>You have been installed as an AI! </span>")
to_chat(src, "<span class='danger'>You must obey your silicon laws above all else. Your objectives will consider you to be dead.</span>")
if(!mind.has_ever_been_ai)
mind.has_ever_been_ai = TRUE
to_chat(src, "<B>You are playing the station's AI. The AI cannot move, but can interact with many objects while viewing them (through cameras).</B>")
to_chat(src, "<B>To look at other parts of the station, click on yourself to get a camera menu.</B>")
@@ -237,6 +246,8 @@
. += text("Systems nonfunctional")
return
. += text("System integrity: [(health + 100) * 0.5]%")
if(isturf(loc)) //only show if we're "in" a core
. += "Backup Power: [battery * 0.5]%"
. += text("Connected cyborgs: [length(connected_robots)]")
for(var/r in connected_robots)
var/mob/living/silicon/robot/connected_robot = r
@@ -333,18 +344,64 @@
if(!isturf(loc)) // if their location isn't a turf
return // stop
if(incapacitated())
return
var/is_anchored = FALSE
if(move_resist == MOVE_FORCE_OVERPOWERING)
if(battery < 50)
to_chat(src, span_warning("Insufficient backup power!"))
return
battery = battery - 50
to_chat(src, span_notice("You route power from your backup battery to move the bolts."))
flip_anchored()
to_chat(src, "<b>You are now [is_anchored ? "" : "un"]anchored.</b>")
/mob/living/silicon/ai/proc/flip_anchored()
if(is_anchored)
is_anchored = !is_anchored
move_resist = MOVE_FORCE_NORMAL
status_flags |= CANPUSH
REMOVE_TRAIT(src, TRAIT_NO_TELEPORT, src)
else
is_anchored = TRUE
is_anchored = !is_anchored
move_resist = MOVE_FORCE_OVERPOWERING
status_flags &= ~CANPUSH
ADD_TRAIT(src, TRAIT_NO_TELEPORT, src)
to_chat(src, "<b>You are now [is_anchored ? "" : "un"]anchored.</b>")
// the message in the [] will change depending whether or not the AI is anchored
/mob/living/silicon/ai/proc/ai_mob_to_structure()
disconnect_shell()
ShutOffDoomsdayDevice()
var/obj/structure/ai_core/deactivated/ai_core = new(get_turf(src), /* skip_mmi_creation = */ TRUE)
if(make_mmi_drop_and_transfer(ai_core.core_mmi, the_core = ai_core))
qdel(src)
return ai_core
/mob/living/silicon/ai/proc/make_mmi_drop_and_transfer(obj/item/mmi/the_mmi, the_core)
var/mmi_type
if(posibrain_inside)
mmi_type = new/obj/item/mmi/posibrain(src, /* autoping = */ FALSE)
else
mmi_type = new/obj/item/mmi(src)
if(hack_software)
new/obj/item/malf_upgrade(get_turf(src))
the_mmi = mmi_type
the_mmi.brain = new /obj/item/organ/brain(the_mmi)
the_mmi.brain.organ_flags |= ORGAN_FROZEN
the_mmi.brain.name = "[real_name]'s brain"
the_mmi.name = "[initial(the_mmi.name)]: [real_name]"
the_mmi.brainmob = new /mob/living/brain(the_mmi)
the_mmi.brainmob.name = src.real_name
the_mmi.brainmob.real_name = src.real_name
the_mmi.brainmob.container = the_mmi
the_mmi.brainmob.suiciding = suiciding
if(the_core)
var/obj/structure/ai_core/core = the_core
core.core_mmi = the_mmi
the_mmi.forceMove(the_core)
else
the_mmi.forceMove(get_turf(src))
if(the_mmi.brainmob.stat == DEAD && !suiciding)
the_mmi.brainmob.stat = CONSCIOUS
if(mind)
mind.transfer_to(the_mmi.brainmob)
the_mmi.update_appearance()
return TRUE
// AIs are immobile
/mob/living/silicon/ai/update_mobility()
@@ -427,18 +484,30 @@
return
if (href_list["ai_take_control"]) //Mech domination
var/obj/vehicle/sealed/mecha/M = locate(href_list["ai_take_control"])
var/obj/vehicle/sealed/mecha/M = locate(href_list["ai_take_control"]) in GLOB.mechas_list
if (!M)
return
var/mech_has_controlbeacon = FALSE
for(var/obj/item/mecha_parts/mecha_tracking/ai_control/A in M.trackers)
mech_has_controlbeacon = TRUE
break
if(!can_dominate_mechs && !mech_has_controlbeacon)
message_admins("Warning: possible href exploit by [key_name(usr)] - attempted control of a mecha without can_dominate_mechs or a control beacon in the mech.")
usr.log_message("possibly attempting href exploit - attempted control of a mecha without can_dominate_mechs or a control beacon in the mech.", LOG_ADMIN)
return
if(controlled_equipment)
to_chat(src, "<span class='warning'>You are already loaded into an onboard computer!</span>")
to_chat(src, span_warning("You are already loaded into an onboard computer!"))
return
if(!GLOB.cameranet.checkCameraVis(M))
to_chat(src, "<span class='warning'>Exosuit is no longer near active cameras.</span>")
to_chat(src, span_warning("Exosuit is no longer near active cameras."))
return
if(!isturf(loc))
to_chat(src, "<span class='warning'>You aren't in your core!</span>")
to_chat(src, span_warning("You aren't in your core!"))
return
if(M)
M.transfer_ai(AI_MECH_HACK,src, usr) //Called om the mech itself.
M.transfer_ai(AI_MECH_HACK, src, usr) //Called on the mech itself.
/mob/living/silicon/ai/proc/switchCamera(obj/machinery/camera/C)
@@ -825,10 +894,12 @@
to_chat(user, "<span class='warning'>No intelligence patterns detected.</span>" )
return
ShutOffDoomsdayDevice()
new /obj/structure/AIcore/deactivated(loc)//Spawns a deactivated terminal at AI location.
var/obj/structure/ai_core/new_core = new /obj/structure/ai_core/deactivated(loc, posibrain_inside)//Spawns a deactivated terminal at AI location.
new_core.circuit.battery = battery
ai_restore_power()//So the AI initially has power.
control_disabled = 1//Can't control things remotely if you're stuck in a card!
radio_enabled = 0 //No talking on the built-in radio for you either!
control_disabled = TRUE //Can't control things remotely if you're stuck in a card!
interaction_range = 0
radio_enabled = FALSE //No talking on the built-in radio for you either!
forceMove(card)
card.AI = src
to_chat(src, "You have been downloaded to a mobile storage device. Remote device connection severed.")
@@ -1063,7 +1134,7 @@
// Sends an announcement the AI has cryoed.
var/obj/machinery/announcement_system/announcer = pick(GLOB.announcement_systems)
announcer.announce("CRYOSTORAGE", src.real_name, announce_rank, list())
new /obj/structure/AIcore/latejoin_inactive(loc)
new /obj/structure/ai_core/latejoin_inactive(loc)
if(src.mind)
//Handle job slot/tater cleanup.
if(src.mind.assigned_role == "AI")
@@ -2,7 +2,7 @@
. = ..()
if(!.)
return FALSE
if(I.force && I.damtype != STAMINA && stat != DEAD) //only sparks if real damage is dealt.
if(I.force && I.damtype != STAMINA && stat != DEAD && !QDELETED(src)) //only sparks if real damage is dealt.
spark_system.start()
/mob/living/silicon/ai/attack_slime(mob/living/simple_animal/slime/user)
@@ -48,3 +48,105 @@
/mob/living/silicon/ai/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0)
return // no eyes, no flashing
/mob/living/silicon/ai/emag_act(mob/user, obj/item/card/emag/emag_card) ///emags access panel lock, so you can crowbar it without robotics access or consent
. = ..()
if(emagged)
balloon_alert(user, "access panel lock already shorted!")
return
balloon_alert(user, "access panel lock shorted")
var/message = (user ? "[user] shorts out your access panel lock!" : "Your access panel lock was short circuited!")
to_chat(src, span_warning(message))
do_sparks(3, FALSE, src) // just a bit of extra "oh shit" to the ai - might grab its attention
emagged = TRUE
return TRUE
/mob/living/silicon/ai/wrench_act(mob/living/user, obj/item/tool)
. = ..()
if(user.a_intent == INTENT_HARM)
return
balloon_alert(user, "[!is_anchored ? "tightening" : "loosening"] bolts...")
balloon_alert(src, "bolts being [!is_anchored ? "tightened" : "loosened"]...")
if(!tool.use_tool(src, user, 4 SECONDS))
return TRUE
flip_anchored()
balloon_alert(user, "bolts [is_anchored ? "tightened" : "loosened"]")
balloon_alert(src, "bolts [is_anchored ? "tightened" : "loosened"]")
return TRUE
/mob/living/silicon/ai/crowbar_act(mob/living/user, obj/item/tool)
. = ..()
if(user.a_intent == INTENT_HARM)
return
if(!is_anchored)
balloon_alert(user, "bolt it down first!")
return TRUE
if(opened)
if(emagged)
balloon_alert(user, "access panel lock damaged!")
return TRUE
balloon_alert(user, "closing access panel...")
balloon_alert(src, "access panel being closed...")
if(!tool.use_tool(src, user, 5 SECONDS))
return TRUE
balloon_alert(src, "access panel closed")
balloon_alert(user, "access panel closed")
opened = FALSE
return TRUE
if(stat == DEAD)
to_chat(user, span_warning("The access panel looks damaged, you try dislodging the cover."))
else
var/consent
var/consent_override = FALSE
if(ishuman(user))
var/mob/living/carbon/human/human_user = user
if(human_user.wear_id)
var/list/access = human_user.wear_id.GetAccess()
if(ACCESS_ROBOTICS in access)
consent_override = TRUE
if(mind)
consent = tgui_alert(src, "[user] is attempting to open your access panel, unlock the cover?", "AI Access Panel", list("Yes", "No"))
if(consent == "No" && !consent_override && !emagged)
to_chat(user, span_notice("[src] refuses to unlock its access panel."))
return TRUE
if(consent != "Yes" && (consent_override || emagged))
to_chat(user, span_warning("[src] refuses to unlock its access panel...so you[!emagged ? " swipe your ID and " : " "]open it anyway!"))
else
if(!consent_override && !emagged)
to_chat(user, span_notice("[src] did not respond to your request to unlock its access panel cover lock."))
return TRUE
else
to_chat(user, span_notice("[src] did not respond to your request to unlock its access panel cover lock. You[!emagged ? " swipe your ID and " : " "]open it anyway."))
balloon_alert(user, "prying open access panel...")
balloon_alert(src, "access panel being pried open...")
if(!tool.use_tool(src, user, (stat == DEAD ? 40 SECONDS : 5 SECONDS)))
return TRUE
balloon_alert(src, "access panel opened")
balloon_alert(user, "access panel opened")
opened = TRUE
return TRUE
/mob/living/silicon/ai/wirecutter_act(mob/living/user, obj/item/tool)
. = ..()
if(user.a_intent == INTENT_HARM)
return
if(!is_anchored)
balloon_alert(user, "bolt it down first!")
return TRUE
if(!opened)
balloon_alert(user, "open the access panel first!")
return TRUE
balloon_alert(src, "neural network being disconnected...")
balloon_alert(user, "disconnecting neural network...")
if(!tool.use_tool(src, user, (stat == DEAD ? 40 SECONDS : 5 SECONDS)))
return TRUE
if(IS_MALF_AI(src))
to_chat(user, span_userdanger("The voltage inside the wires rises dramatically!"))
user.electrocute_act(120, src)
opened = FALSE
return TRUE
to_chat(src, span_danger("You feel incredibly confused and disorientated."))
var/atom/ai_structure = ai_mob_to_structure()
ai_structure.balloon_alert(user, "disconnected neural network")
return TRUE
+7 -3
View File
@@ -28,11 +28,15 @@
// Handle power damage (oxy)
if(aiRestorePowerRoutine)
// Lost power
adjustOxyLoss(1)
if (!battery)
to_chat(src, span_warning("Your backup battery's output drops below usable levels. It takes only a moment longer for your systems to fail, corrupted and unusable."))
adjustOxyLoss(200)
else
battery--
else
// Gain Power
if(getOxyLoss())
adjustOxyLoss(-1)
if (battery < 200)
battery++
if(!lacks_power())
var/area/home = get_area(src)
@@ -162,7 +162,7 @@
if(BORG_SEC_AVAILABLE)
modulelist["Security"] = /obj/item/robot_module/security
var/input_module = input("Please, select a module!", "Robot", null, null) as null|anything in sortList(modulelist)
var/input_module = input("Please, select a module!", "Robot", null, null) as null|anything in sort_list(modulelist)
if(!input_module || module.type != /obj/item/robot_module)
return
@@ -379,8 +379,8 @@
to_chat(user, span_warning("You can't reach the wiring!"))
return
if(istype(W, /obj/item/aiModule))
var/obj/item/aiModule/MOD = W
if(istype(W, /obj/item/ai_module))
var/obj/item/ai_module/MOD = W
if(!opened)
to_chat(user, span_warning("You need access to the robot's insides to do that!"))
return
@@ -50,7 +50,6 @@
var/obj/item/stock_parts/cell/cell = /obj/item/stock_parts/cell/high ///If this is a path, this gets created as an object in Initialize.
var/opened = FALSE
var/emagged = FALSE
var/emag_cooldown = 0
var/wiresexposed = FALSE
@@ -380,7 +380,7 @@
var/image/bad_snowflake = image(icon = 'modular_citadel/icons/mob/widerobot.dmi', icon_state = "alina-med")
bad_snowflake.pixel_x = -16
med_icons["Alina"] = bad_snowflake
med_icons = sortList(med_icons)
med_icons = sort_list(med_icons)
var/med_borg_icon = show_radial_menu(R, R , med_icons, custom_check = CALLBACK(src, .proc/check_menu, R), radius = 42, require_near = TRUE)
switch(med_borg_icon)
if("Default")
@@ -498,7 +498,7 @@
var/image/bad_snowflake = image(icon = 'modular_citadel/icons/mob/widerobot.dmi', icon_state = "alina-eng")
bad_snowflake.pixel_x = -16
engi_icons["Alina"] = bad_snowflake
engi_icons = sortList(engi_icons)
engi_icons = sort_list(engi_icons)
var/engi_borg_icon = show_radial_menu(R, R , engi_icons, custom_check = CALLBACK(src, .proc/check_menu, R), radius = 42, require_near = TRUE)
switch(engi_borg_icon)
if("Default")
@@ -595,7 +595,7 @@
var/image/bad_snowflake = image(icon = 'modular_citadel/icons/mob/widerobot.dmi', icon_state = "alina-sec")
bad_snowflake.pixel_x = -16
sec_icons["Alina"] = bad_snowflake
sec_icons = sortList(sec_icons)
sec_icons = sort_list(sec_icons)
var/sec_borg_icon = show_radial_menu(R, R , sec_icons, custom_check = CALLBACK(src, .proc/check_menu, R), radius = 42, require_near = TRUE)
switch(sec_borg_icon)
if("Default")
@@ -681,7 +681,7 @@
/obj/item/robot_module/peacekeeper/be_transformed_to(obj/item/robot_module/old_module)
var/mob/living/silicon/robot/R = loc
var/static/list/peace_icons = sortList(list(
var/static/list/peace_icons = sort_list(list(
"Default" = image(icon = 'icons/mob/robots.dmi', icon_state = "peace"),
"Borgi" = image(icon = 'modular_citadel/icons/mob/robots.dmi', icon_state = "borgi"),
"Spider" = image(icon = 'modular_citadel/icons/mob/robots.dmi', icon_state = "whitespider")
@@ -852,7 +852,7 @@
var/image/bad_snowflake = image(icon = 'modular_citadel/icons/mob/widerobot.dmi', icon_state = "alina-sec")
bad_snowflake.pixel_x = -16
service_icons["Alina"] = bad_snowflake
service_icons = sortList(service_icons)
service_icons = sort_list(service_icons)
var/service_robot_icon = show_radial_menu(R, R , service_icons, custom_check = CALLBACK(src, .proc/check_menu, R), radius = 42, require_near = TRUE)
switch(service_robot_icon)
if("(Service) Waitress")
@@ -966,7 +966,7 @@
var/image/wide = image(icon = 'modular_citadel/icons/mob/widerobot.dmi', icon_state = L[a])
wide.pixel_x = -16
mining_icons[a] = wide
mining_icons = sortList(mining_icons)
mining_icons = sort_list(mining_icons)
var/mining_borg_icon = show_radial_menu(R, R , mining_icons, custom_check = CALLBACK(src, .proc/check_menu, R), radius = 42, require_near = TRUE)
switch(mining_borg_icon)
if("Lavaland")
@@ -44,6 +44,8 @@
var/obj/machinery/camera/builtInCamera = null
var/updating = FALSE //portable camera camerachunk update
///Whether we have been emagged
var/emagged = FALSE
var/hack_software = FALSE //Will be able to use hacking actions
var/interaction_range = 7 //wireless control range
@@ -454,7 +454,7 @@
var/obj/item/computer_hardware/H = all_components[h]
component_names.Add(H.name)
var/choice = input(user, "Which component do you want to uninstall?", "Computer maintenance", null) as null|anything in sortList(component_names)
var/choice = input(user, "Which component do you want to uninstall?", "Computer maintenance", null) as null|anything in sort_list(component_names)
if(!choice)
return
+1 -1
View File
@@ -137,7 +137,7 @@
burst_size = 1
sortList(fire_select_modes, /proc/cmp_numeric_asc)
sort_list(fire_select_modes, /proc/cmp_numeric_asc)
if(fire_select_modes.len > 1)
firemode_action = new(src)
@@ -94,16 +94,16 @@
/obj/machinery/chem_dispenser/Initialize(mapload)
. = ..()
dispensable_reagents = sortList(dispensable_reagents, /proc/cmp_reagents_asc)
dispensable_reagents = sort_list(dispensable_reagents, /proc/cmp_reagents_asc)
if(emagged_reagents)
emagged_reagents = sortList(emagged_reagents, /proc/cmp_reagents_asc)
emagged_reagents = sort_list(emagged_reagents, /proc/cmp_reagents_asc)
if(upgrade_reagents)
upgrade_reagents = sortList(upgrade_reagents, /proc/cmp_reagents_asc)
upgrade_reagents = sort_list(upgrade_reagents, /proc/cmp_reagents_asc)
if(upgrade_reagents2)
upgrade_reagents2 = sortList(upgrade_reagents2, /proc/cmp_reagents_asc)
upgrade_reagents2 = sort_list(upgrade_reagents2, /proc/cmp_reagents_asc)
if(upgrade_reagents3)
upgrade_reagents3 = sortList(upgrade_reagents3, /proc/cmp_reagents_asc)
dispensable_reagents = sortList(dispensable_reagents, /proc/cmp_reagents_asc)
upgrade_reagents3 = sort_list(upgrade_reagents3, /proc/cmp_reagents_asc)
dispensable_reagents = sort_list(dispensable_reagents, /proc/cmp_reagents_asc)
create_reagents(200, NO_REACT)
update_icon()
@@ -15,7 +15,7 @@
desc = "Allows for the construction of a Safeguard AI Module."
id = "safeguard_module"
materials = list(/datum/material/glass = 1000, /datum/material/gold = 2000)
build_path = /obj/item/aiModule/supplied/safeguard
build_path = /obj/item/ai_module/supplied/safeguard
category = list("AI Modules")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -24,7 +24,7 @@
desc = "Allows for the construction of a OneCrew AI Module."
id = "onehuman_module"
materials = list(/datum/material/glass = 1000, /datum/material/diamond = 6000)
build_path = /obj/item/aiModule/zeroth/oneHuman
build_path = /obj/item/ai_module/zeroth/oneHuman
category = list("AI Modules")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -33,7 +33,7 @@
desc = "Allows for the construction of a ProtectStation AI Module."
id = "protectstation_module"
materials = list(/datum/material/glass = 1000, /datum/material/gold = 2000)
build_path = /obj/item/aiModule/supplied/protectStation
build_path = /obj/item/ai_module/supplied/protectStation
category = list("AI Modules")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -42,7 +42,7 @@
desc = "Allows for the construction of a Quarantine AI Module."
id = "quarantine_module"
materials = list(/datum/material/glass = 1000, /datum/material/gold = 2000)
build_path = /obj/item/aiModule/supplied/quarantine
build_path = /obj/item/ai_module/supplied/quarantine
category = list("AI Modules")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -51,7 +51,7 @@
desc = "Allows for the construction of a Safeguard AI Module."
id = "oxygen_module"
materials = list(/datum/material/glass = 1000, /datum/material/gold = 2000)
build_path = /obj/item/aiModule/supplied/oxygen
build_path = /obj/item/ai_module/supplied/oxygen
category = list("AI Modules")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -60,7 +60,7 @@
desc = "Allows for the construction of a Freeform AI Module."
id = "freeform_module"
materials = list(/datum/material/glass = 1000, /datum/material/gold = 10000)//Custom inputs should be more expensive to get
build_path = /obj/item/aiModule/supplied/freeform
build_path = /obj/item/ai_module/supplied/freeform
category = list("AI Modules")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -69,7 +69,7 @@
desc = "Allows for the construction of a Reset AI Module."
id = "reset_module"
materials = list(/datum/material/glass = 1000, /datum/material/gold = 2000)
build_path = /obj/item/aiModule/reset
build_path = /obj/item/ai_module/reset
category = list("AI Modules")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -78,7 +78,7 @@
desc = "Allows for the construction of a Purge AI Module."
id = "purge_module"
materials = list(/datum/material/glass = 1000, /datum/material/diamond = 2000)
build_path = /obj/item/aiModule/reset/purge
build_path = /obj/item/ai_module/reset/purge
category = list("AI Modules")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -87,7 +87,7 @@
desc = "Allows for the construction of a Law Removal AI Core Module."
id = "remove_module"
materials = list(/datum/material/glass = 1000, /datum/material/diamond = 2000)
build_path = /obj/item/aiModule/remove
build_path = /obj/item/ai_module/remove
category = list("AI Modules")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -96,7 +96,7 @@
desc = "Allows for the construction of a Freeform AI Core Module."
id = "freeformcore_module"
materials = list(/datum/material/glass = 1000, /datum/material/diamond = 10000)//Ditto
build_path = /obj/item/aiModule/core/freeformcore
build_path = /obj/item/ai_module/core/freeformcore
category = list("AI Modules")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -105,7 +105,7 @@
desc = "Allows for the construction of an Asimov AI Core Module."
id = "asimov_module"
materials = list(/datum/material/glass = 1000, /datum/material/diamond = 2000)
build_path = /obj/item/aiModule/core/full/asimov
build_path = /obj/item/ai_module/core/full/asimov
category = list("AI Modules")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -115,7 +115,7 @@
id = "paladin_module"
build_type = IMPRINTER
materials = list(/datum/material/glass = 1000, /datum/material/diamond = 2000)
build_path = /obj/item/aiModule/core/full/paladin
build_path = /obj/item/ai_module/core/full/paladin
category = list("AI Modules")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -124,7 +124,7 @@
desc = "Allows for the construction of a T.Y.R.A.N.T. AI Module."
id = "tyrant_module"
materials = list(/datum/material/glass = 1000, /datum/material/diamond = 2000)
build_path = /obj/item/aiModule/core/full/tyrant
build_path = /obj/item/ai_module/core/full/tyrant
category = list("AI Modules")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -133,7 +133,7 @@
desc = "Allows for the construction of a Corporate AI Core Module."
id = "corporate_module"
materials = list(/datum/material/glass = 1000, /datum/material/diamond = 2000)
build_path = /obj/item/aiModule/core/full/corp
build_path = /obj/item/ai_module/core/full/corp
category = list("AI Modules")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -142,6 +142,6 @@
desc = "Allows for the construction of a Default AI Core Module."
id = "default_module"
materials = list(/datum/material/glass = 1000, /datum/material/diamond = 2000)
build_path = /obj/item/aiModule/core/full/custom
build_path = /obj/item/ai_module/core/full/custom
category = list("AI Modules")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
@@ -145,13 +145,13 @@
name = "Hacked AI Law Upload Module"
desc = "When used with an upload console, this module allows you to upload priority laws to an artificial intelligence. \
Be careful with wording, as artificial intelligences may look for loopholes to exploit."
item = /obj/item/aiModule/syndicate
item = /obj/item/ai_module/syndicate
cost = 9
/datum/uplink_item/device_tools/damaged_module
name = "Damaged AI Law Upload Module"
desc = "This AI law upload module has been laying around our warehouse for god knows how long. We do not know why you would ever use this."
item = /obj/item/aiModule/core/full/damaged
item = /obj/item/ai_module/core/full/damaged
cost = 5
/datum/uplink_item/device_tools/headsetupgrade
+93 -56
View File
@@ -198,7 +198,8 @@
/obj/vehicle/sealed/mecha/Destroy()
for(var/ejectee in occupants)
mob_exit(ejectee, TRUE, TRUE)
mob_exit(ejectee, silent = TRUE)
if(LAZYLEN(equipment))
for(var/obj/item/mecha_parts/mecha_equipment/equip as anything in equipment)
equip.detach(loc)
@@ -215,6 +216,8 @@
QDEL_NULL(cabin_air)
QDEL_NULL(spark_system)
QDEL_NULL(smoke_system)
QDEL_NULL(trackers)
QDEL_NULL(wires)
GLOB.poi_list -= src
GLOB.mechas_list -= src //global mech list
@@ -223,14 +226,39 @@
return ..()
/obj/vehicle/sealed/mecha/obj_destruction()
spark_system?.start()
loc.assume_air(cabin_air)
air_update_turf(FALSE, FALSE)
var/mob/living/silicon/ai/unlucky_ai
for(var/mob/living/occupant as anything in occupants)
if(isAI(occupant))
occupant.gib() //No wreck, no AI to recover
var/mob/living/silicon/ai/ai = occupant
if(!ai.linked_core) // we probably shouldnt gib AIs with a core
unlucky_ai = occupant
ai.investigate_log("has been gibbed by having their mech destroyed.", INVESTIGATE_DEATHS)
ai.gib() //No wreck, no AI to recover
else
mob_exit(ai,silent = TRUE, forced = TRUE) // so we dont ghost the AI
continue
mob_exit(occupant, FALSE, TRUE)
occupant.SetSleeping(destruction_sleep_duration)
mob_exit(occupant, forced = TRUE)
if(!isbrain(occupant)) // who would win.. 1 brain vs 1 sleep proc..
occupant.SetSleeping(destruction_sleep_duration)
if(wreckage)
var/obj/structure/mecha_wreckage/WR = new wreckage(loc, unlucky_ai)
for(var/obj/item/mecha_parts/mecha_equipment/E in equipment)
if(E.detachable && prob(30))
WR.crowbar_salvage += E
E.detach(WR) //detaches from src into WR
else
E.detach(loc)
qdel(E)
if(cell)
WR.crowbar_salvage += cell
cell.forceMove(WR)
cell.use(rand(0, cell.charge), TRUE)
cell = null
return ..()
/obj/vehicle/sealed/mecha/update_icon()
@@ -480,7 +508,7 @@
var/mob/living/occupant = b
if(!enclosed && occupant?.incapacitated()) //no sides mean it's easy to just sorta fall out if you're incapacitated.
visible_message("<span class='warning'>[occupant] tumbles out of the cockpit!</span>")
mob_try_exit(occupant, TRUE, TRUE) //bye bye
mob_exit(occupant, randomstep = TRUE) //bye bye
//Diagnostic HUD updates
diag_hud_set_mechhealth()
@@ -796,19 +824,31 @@
to_chat(user, "<a href='?src=[REF(user)];ai_take_control=[REF(src)]'><span class='boldnotice'>Take control of exosuit?</span></a><br>")
/obj/vehicle/sealed/mecha/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/aicard/card)
if(!..())
. = ..()
if(!.)
return
//Transfer from core or card to mech. Proc is called by mech.
switch(interaction)
if(AI_TRANS_TO_CARD) //Upload AI from mech to AI card.
if(!construction_state) //Mech must be in maint mode to allow carding.
to_chat(user, "<span class='warning'>[name] must have maintenance protocols active in order to allow a transfer.</span>")
to_chat(user, span_warning("[name] must have maintenance protocols active in order to allow a transfer."))
return
if(!locate(AI) in occupants) //Mech does not have an AI for a pilot
to_chat(user, "<span class='warning'>No AI detected in the [name] onboard computer.</span>")
var/list/ai_pilots = list()
for(var/mob/living/silicon/ai/aipilot in occupants)
ai_pilots += aipilot
if(!length(ai_pilots)) //Mech does not have an AI for a pilot
to_chat(user, span_warning("No AI detected in the [name] onboard computer."))
return
for(var/mob/living/silicon/ai in occupants)
if(length(ai_pilots) > 1) //Input box for multiple AIs, but if there's only one we'll default to them.
AI = tgui_input_list(user, "Which AI do you wish to card?", "AI Selection", sort_list(ai_pilots))
else
AI = ai_pilots[1]
if(isnull(AI))
return
if(!(AI in occupants) || !user.Adjacent(src))
return //User sat on the selection window and things changed.
AI.ai_restore_power()//So the AI initially has power.
AI.control_disabled = TRUE
AI.radio_enabled = FALSE
@@ -819,36 +859,37 @@
card.AI = AI
AI.controlled_equipment = null
AI.remote_control = null
to_chat(AI, "<span class='notice'>You have been downloaded to a mobile storage device. Wireless connection offline.</span>")
to_chat(user, "<span class='boldnotice'>Transfer successful</span>: [AI.name] ([rand(1000,9999)].exe) removed from [name] and stored within local memory.")
to_chat(AI, span_notice("You have been downloaded to a mobile storage device. Wireless connection offline."))
to_chat(user, "[span_boldnotice("Transfer successful")]: [AI.name] ([rand(1000,9999)].exe) removed from [name] and stored within local memory.")
return
if(AI_MECH_HACK) //Called by AIs on the mech
AI.linked_core = new /obj/structure/AIcore/deactivated(AI.loc)
if(AI.can_dominate_mechs)
if(LAZYLEN(occupants)) //Oh, I am sorry, were you using that?
to_chat(AI, "<span class='warning'>Occupants detected! Forced ejection initiated!</span>")
to_chat(occupants, "<span class='danger'>You have been forcibly ejected!</span>")
ejectall() //IT IS MINE, NOW. SUCK IT, RD!
ai_enter_mech(AI, interaction)
AI.linked_core = new /obj/structure/ai_core/deactivated(AI.loc)
if(AI.can_dominate_mechs && LAZYLEN(occupants)) //Oh, I am sorry, were you using that?
to_chat(AI, span_warning("Occupants detected! Forced ejection initiated!"))
to_chat(occupants, span_danger("You have been forcibly ejected!"))
for(var/ejectee in occupants)
mob_exit(ejectee, silent = TRUE, randomstep = TRUE, forced = TRUE) //IT IS MINE, NOW. SUCK IT, RD!
AI.can_shunt = FALSE //ONE AI ENTERS. NO AI LEAVES.
if(AI_TRANS_FROM_CARD) //Using an AI card to upload to a mech.
AI = card.AI
if(!AI)
to_chat(user, "<span class='warning'>There is no AI currently installed on this device.</span>")
to_chat(user, span_warning("There is no AI currently installed on this device."))
return
if(AI.deployed_shell) //Recall AI if shelled so it can be checked for a client
AI.disconnect_shell()
if(AI.stat || !AI.client)
to_chat(user, "<span class='warning'>[AI.name] is currently unresponsive, and cannot be uploaded.</span>")
to_chat(user, span_warning("[AI.name] is currently unresponsive, and cannot be uploaded."))
return
if((LAZYLEN(occupants) >= max_occupants) || dna_lock) //Normal AIs cannot steal mechs!
to_chat(user, "<span class='warning'>Access denied. [name] is [LAZYLEN(occupants) >= max_occupants ? "currently fully occupied" : "secured with a DNA lock"].</span>")
to_chat(user, span_warning("Access denied. [name] is [LAZYLEN(occupants) >= max_occupants ? "currently fully occupied" : "secured with a DNA lock"]."))
return
AI.control_disabled = FALSE
AI.radio_enabled = TRUE
to_chat(user, "<span class='boldnotice'>Transfer successful</span>: [AI.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed.")
to_chat(user, "[span_boldnotice("Transfer successful")]: [AI.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed.")
card.AI = null
ai_enter_mech(AI, interaction)
ai_enter_mech(AI)
//Hack and From Card interactions share some code, so leave that here for both to use.
/obj/vehicle/sealed/mecha/proc/ai_enter_mech(mob/living/silicon/ai/AI, interaction)
@@ -865,7 +906,6 @@
"<span class='notice'>You have been uploaded to a mech's onboard computer.</span>")
to_chat(AI, "<span class='reallybig boldnotice'>Use Middle-Mouse to activate mech functions and equipment. Click normally for AI interactions.</span>")
///Handles an actual AI (simple_animal mecha pilot) entering the mech
/obj/vehicle/sealed/mecha/proc/aimob_enter_mech(mob/living/simple_animal/hostile/syndicate/mecha_pilot/pilot_mob)
if(pilot_mob && pilot_mob.Adjacent(src))
@@ -1042,47 +1082,45 @@
if(isAI(user))
var/mob/living/silicon/ai/AI = user
if(!AI.can_shunt)
to_chat(AI, "<span class='notice'>You can't leave a mech after dominating it!.</span>")
to_chat(AI, span_notice("You can't leave a mech after dominating it!."))
return FALSE
to_chat(user, "<span class='notice'>You begin the ejection procedure. Equipment is disabled during this process. Hold still to finish ejecting.</span>")
to_chat(user, span_notice("You begin the ejection procedure. Equipment is disabled during this process. Hold still to finish ejecting."))
is_currently_ejecting = TRUE
if(do_after(user, exit_delay , target = src))
to_chat(user, "<span class='notice'>You exit the mech.</span>")
mob_try_exit(user, silent = FALSE)
if(do_after(user, has_gravity() ? exit_delay : 0 , target = src))
to_chat(user, span_notice("You exit the mech."))
mob_exit(user, silent = TRUE)
else
to_chat(user, "<span class='notice'>You stop exiting the mech. Weapons are enabled again.</span>")
to_chat(user, span_notice("You stop exiting the mech. Weapons are enabled again."))
is_currently_ejecting = FALSE
/obj/vehicle/sealed/mecha/proc/ejectall()
for(var/ejectee in occupants)
mob_try_exit(ejectee, TRUE, TRUE)
/obj/vehicle/sealed/mecha/mob_try_exit(mob/M, silent, randomstep)
mob_exit(M, silent, randomstep)
/obj/vehicle/sealed/mecha/mob_exit(mob/M, silent, forced)
var/newloc = get_turf(src)
/obj/vehicle/sealed/mecha/mob_exit(mob/M, silent = FALSE, randomstep = FALSE, forced = FALSE)
var/atom/movable/mob_container
var/turf/newloc = get_turf(src)
if(ishuman(M))
remove_occupant(M)
..()
return
mob_container = M
else if(isbrain(M))
var/mob/living/brain/brain = M
mob_container = brain.container
else if(isAI(M))
var/mob/living/silicon/ai/AI = M
//stop listening to this signal, as the static update is now handled by the eyeobj's setLoc
AI.eyeobj?.UnregisterSignal(src, COMSIG_MOVABLE_MOVED)
AI.eyeobj?.forceMove(newloc) //kick the eye out as well
if(forced)//This should only happen if there are multiple AIs in a round, and at least one is Malf.
AI.gib() //If one Malf decides to steal a mech from another AI (even other Malfs!), they are destroyed, as they have nowhere to go when replaced.
if(!AI.linked_core) //if the victim AI has no core
AI.investigate_log("has been gibbed by being forced out of their mech by another AI.", INVESTIGATE_DEATHS)
AI.gib() //If one Malf decides to steal a mech from another AI (even other Malfs!), they are destroyed, as they have nowhere to go when replaced.
AI = null
mecha_flags &= ~SILICON_PILOT
return
else
if(!AI.linked_core)
to_chat(AI, "<span class='userdanger'>Inactive core destroyed. Unable to return.</span>")
if(!silent)
to_chat(AI, span_userdanger("Inactive core destroyed. Unable to return."))
AI.linked_core = null
return
to_chat(AI, "<span class='notice'>Returning to core...</span>")
if(!silent)
to_chat(AI, span_notice("Returning to core..."))
AI.controlled_equipment = null
AI.remote_control = null
mob_container = AI
@@ -1090,21 +1128,20 @@
qdel(AI.linked_core)
else
return ..()
var/mob/living/L = M
var/mob/living/ejector = M
mecha_flags &= ~SILICON_PILOT
if(mob_container.forceMove(newloc))
log_message("[mob_container] moved out.", LOG_MECHA)
L << browse(null, "window=exosuit")
mob_container.forceMove(newloc)//ejecting mob container
log_message("[mob_container] moved out.", LOG_MECHA)
SStgui.close_user_uis(M, src)
if(istype(mob_container, /obj/item/mmi))
var/obj/item/mmi/mmi = mob_container
if(mmi.brainmob)
L.forceMove(mmi)
L.reset_perspective()
remove_occupant(L)
ejector.forceMove(mmi)
ejector.reset_perspective()
remove_occupant(ejector)
mmi.mecha = null
mmi.update_icon()
L.mobility_flags = NONE
setDir(dir_in)
mmi.update_appearance()
setDir(SOUTH)
return ..()
@@ -25,7 +25,7 @@
else
add_control_flags(M, VEHICLE_CONTROL_MELEE|VEHICLE_CONTROL_EQUIPMENT)
/obj/vehicle/sealed/mecha/combat/neovgre/mob_exit(mob/M, silent, forced)
/obj/vehicle/sealed/mecha/combat/neovgre/mob_exit(mob/M, silent, randomstep, forced)
if(forced)
..()
@@ -38,7 +38,7 @@
var/client/C = X
if(C && C.holder && !C.holder.fakekey)
assembled += "\t <font color='#FF0000'>[C.key]</font>[admin_mode? "[show_admin_info(C)]":""] ([round(C.avgping, 1)]ms)"
Lines += sortList(assembled)
Lines += sort_list(assembled)
assembled.len = 0
if(length(GLOB.mentors))
Lines += "<b>Mentors:</b>"
@@ -46,10 +46,10 @@
var/client/C = X
if(C && (!C.holder || (C.holder && !C.holder.fakekey))) //>using stuff this complex instead of just using if/else lmao
assembled += "\t <font color='#0033CC'>[C.key]</font>[admin_mode? "[show_admin_info(C)]":""] ([round(C.avgping, 1)]ms)"
Lines += sortList(assembled)
Lines += sort_list(assembled)
assembled.len = 0
Lines += "<b>Players:</b>"
for(var/X in sortList(GLOB.clients))
for(var/X in sort_list(GLOB.clients))
var/client/C = X
if(!C)
continue
@@ -57,8 +57,8 @@
if(C.holder && C.holder.fakekey)
key = C.holder.fakekey
assembled += "\t [key][admin_mode? "[show_admin_info(C)]":""] ([round(C.avgping, 1)]ms)"
Lines += sortList(assembled)
Lines += sort_list(assembled)
for(var/line in Lines)
msg += "[line]\n"
@@ -9,7 +9,7 @@
for(var/client/T)
targets["[T]"] = T
var/list/sorted = sortList(targets)
var/list/sorted = sort_list(targets)
var/target = input(src,"To whom shall we send a message?","Mentor PM",null) in sorted|null
cmd_mentor_pm(targets[target],null)
SSblackbox.record_feedback("tally", "Mentor_verb", 1, "APM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!