Cyborgs now use storage datum (#90927)

## About The Pull Request

This moves Cyborgs onto using storage datums, removing the remenants of
the shitcode that was Cyborg inventory. It's now done mostly by
equipping/unequipping/storage items, much like how other mobs do.
This allows borgs to take advantage of more hand support stuff and
things like ``dropped()``, so borgs no longer have to copy paste drop
code to ``cyborg_unequip``

It also:
- Removes ``CYBORG_ITEM_TRAIT``
- Removes all borg items being ``NODROP``


https://github.com/user-attachments/assets/11442a10-3443-41f2-8c72-b38fb0126cdb

## Why It's Good For The Game

Currently borgs are able to have their entire inventory open and a bag
below it, which I thought was a little weird. I always assumed they WERE
storage items, so I guess I'm doing it myself.
Cyborgs using storage code makes it easier for contributors to actually
do stuff with, without risking breaking everything. It also hopefully
will make borg items more resilient against breaking in the future, now
that we're not relying on nodrop.
Also just brings them more in line with other mobs, all of which make
use of storages.

## Changelog

🆑
refactor: Cyborg's modules now use storage (so opening a bag will close
modules instead of overlap one over the other).
qol: Observers can now see Cyborg's inventories (like they can for
humans).
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
This commit is contained in:
John Willard
2025-06-01 01:26:53 +00:00
committed by GitHub
co-authored by Ghom
parent 7f139ed9f3
commit c51ee7efa5
43 changed files with 390 additions and 428 deletions
@@ -290,7 +290,3 @@
/obj/item/borg/cookbook/dropped(mob/user, silent)
SStgui.close_uis(cooking)
return ..()
/obj/item/borg/cookbook/cyborg_unequip(mob/user)
SStgui.close_uis(cooking)
return ..()
+16 -1
View File
@@ -1,6 +1,21 @@
/obj/item/borg/sight
var/sight_mode = null
icon = 'icons/obj/clothing/glasses.dmi'
///Define to a sight mode that we give to a cyborg while this item is equipped.
var/sight_mode = null
/obj/item/borg/sight/equipped(mob/living/silicon/robot/user, slot, initial = FALSE)
. = ..()
if(!iscyborg(user))
return .
user.sight_mode |= sight_mode
user.update_sight()
/obj/item/borg/sight/dropped(mob/living/silicon/robot/user, silent)
if(!iscyborg(user))
return ..()
user.sight_mode &= ~sight_mode
user.update_sight()
return ..()
/obj/item/borg/sight/xray
name = "\proper X-ray vision"
+4 -3
View File
@@ -110,11 +110,11 @@
return host.loc
return null
/obj/item/borg/projectile_dampen/dropped()
/obj/item/borg/projectile_dampen/equipped()
host = loc
return ..()
/obj/item/borg/projectile_dampen/equipped()
/obj/item/borg/projectile_dampen/dropped()
host = loc
return ..()
@@ -224,7 +224,8 @@
//if all else fails just make a new one from scratch
tool = new reference(user)
ADD_TRAIT(tool, TRAIT_NODROP, CYBORG_ITEM_TRAIT)
//the internal tool is considered part of the tool itself.
tool.item_flags |= ABSTRACT
atoms[reference] = tool
return tool
+10 -10
View File
@@ -67,7 +67,7 @@
for(var/item_to_remove in items)
var/obj/item/module_item = locate(item_to_remove) in borg.model.modules
if (module_item)
borg.model.remove_module(module_item, TRUE)
borg.model.remove_module(module_item)
return TRUE
/obj/item/borg/upgrade/rename
@@ -162,8 +162,8 @@
model_type = list(/obj/item/robot_model/miner)
model_flags = BORG_MODEL_MINER
items_to_add = list(/obj/item/pickaxe/drill/cyborg/diamond)
items_to_remove = list(/obj/item/pickaxe/drill/cyborg, /obj/item/shovel)
items_to_add = list(/obj/item/pickaxe/drill/diamonddrill)
items_to_remove = list(/obj/item/pickaxe/drill, /obj/item/shovel)
/obj/item/borg/upgrade/soh
name = "mining cyborg satchel of holding"
@@ -185,7 +185,7 @@
model_flags = BORG_MODEL_JANITOR
items_to_add = list(/obj/item/storage/bag/trash/bluespace/cyborg)
items_to_remove = list(/obj/item/storage/bag/trash/cyborg)
items_to_remove = list(/obj/item/storage/bag/trash)
/obj/item/borg/upgrade/amop
name = "janitor cyborg advanced mop"
@@ -195,8 +195,8 @@
model_type = list(/obj/item/robot_model/janitor)
model_flags = BORG_MODEL_JANITOR
items_to_add = list(/obj/item/mop/advanced/cyborg)
items_to_remove = list(/obj/item/mop/cyborg)
items_to_add = list(/obj/item/mop/advanced)
items_to_remove = list(/obj/item/mop)
/obj/item/borg/upgrade/prt
name = "janitor cyborg plating repair tool"
@@ -216,7 +216,7 @@
model_type = list(/obj/item/robot_model/janitor)
model_flags = BORG_MODEL_JANITOR
items_to_add = list(/obj/item/plunger/cyborg)
items_to_add = list(/obj/item/plunger)
/obj/item/borg/upgrade/high_capacity_light_replacer
name = "janitor cyborg high capacity replacer"
@@ -226,8 +226,8 @@
model_type = list(/obj/item/robot_model/janitor)
model_flags = BORG_MODEL_JANITOR
items_to_add = list (/obj/item/lightreplacer/cyborg/advanced)
items_to_remove = list(/obj/item/lightreplacer/cyborg)
items_to_add = list (/obj/item/lightreplacer/advanced)
items_to_remove = list(/obj/item/lightreplacer)
/obj/item/borg/upgrade/syndicate
name = "illegal equipment module"
@@ -741,7 +741,7 @@
model_type = list(/obj/item/robot_model/janitor)
model_flags = BORG_MODEL_JANITOR
items_to_add = list(/obj/item/pushbroom/cyborg)
items_to_add = list(/obj/item/pushbroom)
/obj/item/borg/upgrade/condiment_synthesizer
name = "Service Cyborg Condiment Synthesiser"