]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Potato battery update + potato AI (#21142)
authorDoru991 <75124791+Doru991@users.noreply.github.com>
Wed, 25 Oct 2023 13:52:49 +0000 (16:52 +0300)
committerGitHub <noreply@github.com>
Wed, 25 Oct 2023 13:52:49 +0000 (00:52 +1100)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
23 files changed:
Content.Shared/Containers/ItemSlot/ItemSlotsComponent.cs
Content.Shared/Containers/ItemSlot/ItemSlotsSystem.cs
Resources/Locale/en-US/pai/pai-system.ftl
Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml
Resources/Prototypes/Entities/Objects/Fun/pai.yml
Resources/Prototypes/Entities/Objects/Misc/potatoai_chip.yml [new file with mode: 0644]
Resources/Prototypes/Entities/Objects/Power/powercells.yml
Resources/Prototypes/Entities/Objects/Specific/Robotics/mmi.yml
Resources/Prototypes/Entities/Structures/Power/chargers.yml
Resources/Prototypes/Recipes/Crafting/Graphs/improvised/potato.yml [new file with mode: 0644]
Resources/Prototypes/Recipes/Crafting/potato.yml [new file with mode: 0644]
Resources/Prototypes/tags.yml
Resources/Textures/Objects/Fun/pai.rsi/icon-potato-off.png [new file with mode: 0644]
Resources/Textures/Objects/Fun/pai.rsi/meta.json
Resources/Textures/Objects/Fun/pai.rsi/potato-base.png [new file with mode: 0644]
Resources/Textures/Objects/Fun/pai.rsi/potato-off-overlay.png [new file with mode: 0644]
Resources/Textures/Objects/Fun/pai.rsi/potato-on-overlay.png [new file with mode: 0644]
Resources/Textures/Objects/Fun/pai.rsi/potato-searching-overlay.png [new file with mode: 0644]
Resources/Textures/Objects/Misc/potatoai_chip.rsi/icon.png [new file with mode: 0644]
Resources/Textures/Objects/Misc/potatoai_chip.rsi/meta.json [new file with mode: 0644]
Resources/Textures/Objects/Power/power_cells.rsi/meta.json
Resources/Textures/Objects/Power/power_cells.rsi/potato.png
Resources/Textures/Objects/Specific/Robotics/mmi.rsi/meta.json

index effba18210df39894d3bb915add0f6272db4b277..9310617634de31875c4330e70e7121f8a2c99cca 100644 (file)
@@ -71,6 +71,9 @@ namespace Content.Shared.Containers.ItemSlots
         [DataField("whitelist")]
         public EntityWhitelist? Whitelist;
 
+        [DataField("blacklist")]
+        public EntityWhitelist? Blacklist;
+
         [DataField("insertSound")]
         public SoundSpecifier InsertSound = new SoundPathSpecifier("/Audio/Weapons/Guns/MagIn/revolver_magin.ogg");
 
index 902b56427afefcc8ffd52f01e87a184106c88fb6..9194a8208e315d3dd94527214636905bef3a6616 100644 (file)
@@ -255,7 +255,7 @@ namespace Content.Shared.Containers.ItemSlots
             if (!swap && slot.HasItem)
                 return false;
 
-            if (slot.Whitelist != null && !slot.Whitelist.IsValid(usedUid))
+            if ((slot.Whitelist != null && !slot.Whitelist.IsValid(usedUid)) || (slot.Blacklist != null && slot.Blacklist.IsValid(usedUid)))
             {
                 if (_netManager.IsClient && _timing.IsFirstTimePredicted && popup.HasValue && !string.IsNullOrWhiteSpace(slot.WhitelistFailPopup))
                     _popupSystem.PopupEntity(Loc.GetString(slot.WhitelistFailPopup), uid, popup.Value);
index d8ee6eaa086f8e6c1a7397f52d440dc6b9690d16..d64d7f56234ced16ecbcfd8f3e10e9c9f099213c 100644 (file)
@@ -9,6 +9,8 @@ pai-system-role-description = Be someone's electronic pal!
 pai-system-role-name-syndicate = Syndicate personal ai
 pai-system-role-description-syndicate = Be someone's Syndicate pal!
                                         (Memories *not* included.)
+pai-system-role-name-potato = potato artificial intelligence
+pai-system-role-description-potato = It's a toy for children. And now you live in it.
 
 pai-system-wipe-device-verb-text = Remove pAI
 pai-system-wiped-device = The pAI was wiped from the device.
index 699997c123296121c4764df32cb3ed104151f477..6439b2eb6c57f69a02b5b55e3ca7106e4099897e 100644 (file)
       reagents:
       - ReagentId: JuicePotato
         Quantity: 10
+  - type: Tag
+    tags:
+    - Potato
 
 - type: entity
   name: tomato
index 6c0dc8f4baf754f6b04982a465832f85cbc7c772..b9da6775c9521fe62f12f278ab9cfdc3f415c7c1 100644 (file)
@@ -80,6 +80,7 @@
     - state: pai-base
     - state: syndicate-pai-off-overlay
       shader: unshaded
+      map: ["screen"]
   - type: ToggleableGhostRole
     roleName: pai-system-role-name-syndicate
     roleDescription: pai-system-role-description-syndicate
           Searching: { state: syndicate-pai-searching-overlay }
           On: { state: syndicate-pai-on-overlay }
 
+- type: entity
+  parent: PersonalAI
+  id: PotatoAI
+  name: potato artificial intelligence
+  description: It's a potato. You forced it to be sentient, you monster.
+  components:
+  - type: Sprite
+    sprite: Objects/Fun/pai.rsi
+    layers:
+    - state: potato-base
+    - state: potato-off-overlay
+      shader: unshaded
+      map: ["screen"]
+  - type: ToggleableGhostRole
+    roleName: pai-system-role-name-potato
+    roleDescription: pai-system-role-description-potato
+  - type: Appearance
+  - type: GenericVisualizer
+    visuals:
+      enum.ToggleableGhostRoleVisuals.Status:
+        screen:
+          Off: { state: potato-off-overlay }
+          Searching: { state: potato-searching-overlay }
+          On: { state: potato-on-overlay }
+  - type: Construction
+    graph: PotatoAI
+    node: potatoai
+
 - type: entity
   id: ActionPAIPlayMidi
   name: Play MIDI
diff --git a/Resources/Prototypes/Entities/Objects/Misc/potatoai_chip.yml b/Resources/Prototypes/Entities/Objects/Misc/potatoai_chip.yml
new file mode 100644 (file)
index 0000000..528aa30
--- /dev/null
@@ -0,0 +1,17 @@
+- type: entity
+  id: PotatoAIChip
+  name: supercompact AI chip
+  parent: BaseItem
+  description: This high-tech AI chip requires a voltage of exactly 1.1V to function correctly.
+  components:
+    - type: Sprite
+      sprite: Objects/Misc/potatoai_chip.rsi
+      state: icon
+    - type: Item
+      size: 3
+    - type: Tag
+      tags:
+        - SmallAIChip
+    - type: Construction
+      graph: PotatoAIChip
+      node: potatoaichip
\ No newline at end of file
index 82c1bb37e96a6526191523470c4090c030a3c306..4ed3e207c5bd1999a9f0c9b8e84e41fb00f6a77e 100644 (file)
     layers:
     - state: potato
   - type: Battery
-    maxCharge: 200
-    startingCharge: 200
+    maxCharge: 70
+    startingCharge: 70
+  - type: Tag
+    tags:
+      - DroneUsable
+      - PotatoBattery
+  - type: Construction
+    graph: PowerCellPotato
+    node: potatobattery
 
 - type: entity
   name: small-capacity power cell
index 6382d69e58d778b0322d43d21b3c1990fe2497d9..b4e69b37805016f916b7dbbf4eff00d14c9965db 100644 (file)
           base:
             Off: { state: posibrain }
             Searching: { state: posibrain-searching }
-            On: { state: posibrain-occupied }
+            On: { state: posibrain-occupied }
\ No newline at end of file
index e5edc63df3ce64b2f9be79012517902a55b35d43..7630610bd89f8e293beb043609aee4538ba262b7 100644 (file)
@@ -85,6 +85,9 @@
         whitelist:
           components:
           - PowerCell
+        blacklist:
+          tags:
+          - PotatoBattery
 
 - type: entity
   parent: BaseItemRecharger
diff --git a/Resources/Prototypes/Recipes/Crafting/Graphs/improvised/potato.yml b/Resources/Prototypes/Recipes/Crafting/Graphs/improvised/potato.yml
new file mode 100644 (file)
index 0000000..e3f972c
--- /dev/null
@@ -0,0 +1,74 @@
+- type: constructionGraph
+  id: PowerCellPotato
+  start: start
+  graph:
+    - node: start
+      edges:
+        - to: potatobattery
+          steps:
+            - tag: Potato
+              name: a potato
+              icon:
+                sprite: Objects/Specific/Hydroponics/potato.rsi
+                state: produce
+              doAfter: 1
+            - material: MetalRod
+              amount: 2
+              doAfter: 1
+            - material: Cable
+              amount: 1
+              doAfter: 1
+    - node: potatobattery
+      entity: PowerCellPotato
+
+- type: constructionGraph
+  id: PotatoAI
+  start: start
+  graph:
+    - node: start
+      edges:
+        - to: potatoai
+          steps:
+            - tag: PotatoBattery
+              name: a potato battery
+              icon:
+                sprite: Objects/Power/power_cells.rsi
+                state: potato
+              doAfter: 1
+            - tag: SmallAIChip
+              name: a super-compact AI chip
+              icon:
+                sprite: Objects/Misc/potatoai_chip.rsi
+                state: icon
+    - node: potatoai
+      entity: PotatoAI
+
+- type: constructionGraph
+  id: PotatoAIChip
+  start: start
+  graph:
+    - node: start
+      edges:
+        - to: potatoaichip
+          steps:
+            - material: Steel
+              amount: 1
+              doAfter: 1
+            - material: Glass
+              amount: 1
+              doAfter: 1
+            - material: Cable
+              amount: 2
+              doAfter: 1
+            - tag: CapacitorStockPart
+              name: capacitor
+              icon:
+                sprite: Objects/Misc/stock_parts.rsi
+                state: capacitor
+            - tag: CapacitorStockPart
+              name: capacitor
+              icon:
+                sprite: Objects/Misc/stock_parts.rsi
+                state: capacitor
+    - node: potatoaichip
+      entity: PotatoAIChip
\ No newline at end of file
diff --git a/Resources/Prototypes/Recipes/Crafting/potato.yml b/Resources/Prototypes/Recipes/Crafting/potato.yml
new file mode 100644 (file)
index 0000000..17f2cc4
--- /dev/null
@@ -0,0 +1,32 @@
+- type: construction
+  name: potato battery
+  id: PowerCellPotato
+  graph: PowerCellPotato
+  startNode: start
+  targetNode: potatobattery
+  category: construction-category-misc
+  description: A truly ingenious source of power.
+  icon: { sprite: Objects/Power/power_cells.rsi, state: potato }
+  objectType: Item
+
+- type: construction
+  name: potato artificial intelligence
+  id: PotatoAI
+  graph: PotatoAI
+  startNode: start
+  targetNode: potatoai
+  category: construction-category-misc
+  description: The potato happens to be the perfect power source for this chip.
+  icon: { sprite: Objects/Fun/pai.rsi, state: icon-potato-off }
+  objectType: Item
+  
+- type: construction
+  name: supercompact AI chip
+  id: PotatoAIChip
+  graph: PotatoAIChip
+  startNode: start
+  targetNode: potatoaichip
+  category: construction-category-misc
+  description: A masterfully(?) crafted AI chip, requiring a similarly improvised power source.
+  icon: { sprite: Objects/Misc/potatoai_chip.rsi, state: icon }
+  objectType: Item
\ No newline at end of file
index a74fde7710ea01ca1c26c4eae744785bc2892134..67a27be41607b1add224fb31b922b39cb920cb8b 100644 (file)
 - type: Tag
   id: PlushieSharkGrey
 
+- type: Tag
+  id: Potato
+
+- type: Tag
+  id: PotatoBattery
+
 - type: Tag
   id: PowerCellSmall
 
 - type: Tag
   id: SkeletonMotorcycleKeys
 
+- type: Tag
+  id: SmallAIChip
+
 - type: Tag
   id: SmallMech
 
diff --git a/Resources/Textures/Objects/Fun/pai.rsi/icon-potato-off.png b/Resources/Textures/Objects/Fun/pai.rsi/icon-potato-off.png
new file mode 100644 (file)
index 0000000..806d02d
Binary files /dev/null and b/Resources/Textures/Objects/Fun/pai.rsi/icon-potato-off.png differ
index 905a3684f8d9f27535b150ab0c931a7867696aef..f819450aa88d4840a3e8a30164cbfd01ebdc1ee5 100644 (file)
@@ -1,7 +1,7 @@
 {
   "version": 1,
   "license": "CC-BY-SA-3.0",
-  "copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/9ddb8cf084e292571d4e9c79745db25befbd82fe. pai-searching-overlay heavily modified. Syndicate variants by fedKotikeD",
+  "copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/9ddb8cf084e292571d4e9c79745db25befbd82fe. pai-searching-overlay heavily modified. Syndicate variants by fedKotikeD, and potato by Doru991",
   "size": {
     "x": 32,
     "y": 32
@@ -13,6 +13,9 @@
     {
       "name": "pai-base"
     },
+    {
+      "name": "potato-base"
+    },
     {
       "name": "pai-off-overlay"
     },
           0.8
         ]
       ]
+    },
+    {
+      "name": "icon-potato-off"
+    },
+    {
+      "name": "potato-off-overlay"
+    },
+    {
+      "name": "potato-on-overlay"
+    },
+    {
+      "name": "potato-searching-overlay"
     }
   ]
 }
diff --git a/Resources/Textures/Objects/Fun/pai.rsi/potato-base.png b/Resources/Textures/Objects/Fun/pai.rsi/potato-base.png
new file mode 100644 (file)
index 0000000..b6e5944
Binary files /dev/null and b/Resources/Textures/Objects/Fun/pai.rsi/potato-base.png differ
diff --git a/Resources/Textures/Objects/Fun/pai.rsi/potato-off-overlay.png b/Resources/Textures/Objects/Fun/pai.rsi/potato-off-overlay.png
new file mode 100644 (file)
index 0000000..0d3f735
Binary files /dev/null and b/Resources/Textures/Objects/Fun/pai.rsi/potato-off-overlay.png differ
diff --git a/Resources/Textures/Objects/Fun/pai.rsi/potato-on-overlay.png b/Resources/Textures/Objects/Fun/pai.rsi/potato-on-overlay.png
new file mode 100644 (file)
index 0000000..9926823
Binary files /dev/null and b/Resources/Textures/Objects/Fun/pai.rsi/potato-on-overlay.png differ
diff --git a/Resources/Textures/Objects/Fun/pai.rsi/potato-searching-overlay.png b/Resources/Textures/Objects/Fun/pai.rsi/potato-searching-overlay.png
new file mode 100644 (file)
index 0000000..5d8d7cd
Binary files /dev/null and b/Resources/Textures/Objects/Fun/pai.rsi/potato-searching-overlay.png differ
diff --git a/Resources/Textures/Objects/Misc/potatoai_chip.rsi/icon.png b/Resources/Textures/Objects/Misc/potatoai_chip.rsi/icon.png
new file mode 100644 (file)
index 0000000..68ba38d
Binary files /dev/null and b/Resources/Textures/Objects/Misc/potatoai_chip.rsi/icon.png differ
diff --git a/Resources/Textures/Objects/Misc/potatoai_chip.rsi/meta.json b/Resources/Textures/Objects/Misc/potatoai_chip.rsi/meta.json
new file mode 100644 (file)
index 0000000..dec5a8d
--- /dev/null
@@ -0,0 +1,14 @@
+{
+  "version": 1,
+  "license": "CC-BY-SA-3.0",
+  "copyright": "Drawn by @Doru991 for SS14",
+  "size": {
+    "x": 32,
+    "y": 32
+  },
+  "states": [
+    {
+      "name": "icon"
+    }
+  ]
+}
index 01c2300621b4c8e506ac93453dfcce962c45bf65..66dbf308412c9a3d42e61e984dc79c04d9c4566d 100644 (file)
@@ -5,7 +5,7 @@
         "y": 32
     },
     "license": "CC-BY-SA-3.0",
-    "copyright": "https://github.com/tgstation/tgstation/commit/7dcdbc1468ffdc8689b984cb6b181d48ae41dbf2",
+    "copyright": "https://github.com/tgstation/tgstation/commit/7dcdbc1468ffdc8689b984cb6b181d48ae41dbf2, potato based on https://github.com/vgstation-coders/vgstation13/commit/1dbcf389b0ec6b2c51b002df5fef8dd1519f8068 edited by @Doru991",
     "states": [
         {
             "name": "potato"
index 5b0f7a5fe04b8b62f804fa629e1861933144196d..53572f46a122188df257488e291ff405b8d68d08 100644 (file)
Binary files a/Resources/Textures/Objects/Power/power_cells.rsi/potato.png and b/Resources/Textures/Objects/Power/power_cells.rsi/potato.png differ
index 6499772c7a5906276ea2cbe01613bf346d6e1257..fcdd9e1b26e2438d49bd350d267538f1523affb4 100644 (file)
@@ -76,4 +76,4 @@
       ]
     }
   ]
-}
\ No newline at end of file
+}