Adds a Material Stack manipulation apparatus for Engineer Cyborgs, replaces the R-Glass tool (#74297)

## About The Pull Request
- Adds a new apparatus for Engineer Cyborgs that can pick up and
manipulate material sheet stacks. Once holding a stack, interactions are
passed to the stack.
- Sheets in the new apparatus will always show as single sheets while
held, regardless of the actual count.
- Removes the R-Glass tool from Engineer Cyborgs.
- Sabotage borgs have the same changes
## Why It's Good For The Game
Allows Engiborgs to repair or build with various materials, without
(further) destroying the concept of material economy.

The R-Glass tool, in my experience, is generally unused, as the RCD can
create R-Windows and that's the main use for the sheets. So the tool has
been removed to keep the Engineer Borg Toolkit from exploding. The new
tool can also pick up R-Glass, if a need for it arises.
## Changelog
🆑
balance: Engineer Borgs now have a tool to manipulate material stacks
(and also tile stacks). This replaces the R-Glass tool.
/🆑
Pictured: Apparatus carrying titanium.

![image](https://user-images.githubusercontent.com/37497534/228021045-0f5a6c76-9caa-47de-ad0a-d20e7e1f4eb2.png)
This commit is contained in:
zxaber
2023-04-15 18:23:02 -07:00
committed by GitHub
parent 15576f0de5
commit 697c8fdc40
5 changed files with 39 additions and 30 deletions
@@ -230,6 +230,41 @@
to_chat(user, span_notice("[src] is empty."))
return
///Apparatus to allow Engineering/Sabo borgs to manipulate any material sheets.
/obj/item/borg/apparatus/sheet_manipulator
name = "material manipulation apparatus"
desc = "An apparatus for carrying, deploying, and manipulating sheets of material. The device can also carry custom floor tiles."
icon_state = "borg_stack_apparatus"
storable = list(/obj/item/stack/sheet,
/obj/item/stack/tile)
/obj/item/borg/apparatus/sheet_manipulator/Initialize(mapload)
update_appearance()
return ..()
/obj/item/borg/apparatus/sheet_manipulator/update_overlays()
. = ..()
var/mutable_appearance/arm = mutable_appearance(icon, "borg_stack_apparatus_arm1")
if(stored)
stored.pixel_x = 0
stored.pixel_y = 0
arm.icon_state = "borg_stack_apparatus_arm2"
var/mutable_appearance/stored_copy = new /mutable_appearance(stored)
var/underscore = findtext(stored_copy.icon_state, "_")
if(underscore)
stored_copy.icon_state = initial(stored.icon_state) //how we use the icon_state of single sheets, even with full stacks
stored_copy.layer = FLOAT_LAYER
stored_copy.plane = FLOAT_PLANE
. += stored_copy
. += arm
/obj/item/borg/apparatus/sheet_manipulator/examine()
. = ..()
if(stored)
. += "The apparatus currently has [stored] secured."
. += span_notice(" <i>Alt-click</i> will drop the currently stored sheets. ")
///Apparatus allowing Engineer/Sabo borgs to manipulate Machine and Computer circuit boards
/obj/item/borg/apparatus/circuit
name = "circuit manipulation apparatus"
desc = "A special apparatus for carrying and manipulating circuit boards."
@@ -167,29 +167,6 @@ GLOBAL_LIST_INIT(reinforced_glass_recipes, list ( \
add_fingerprint(user)
..()
/obj/item/stack/sheet/rglass/cyborg
mats_per_unit = null
cost = 250
source = /datum/robot_energy_storage/iron
/// What energy storage this draws glass from as a robot module.
var/datum/robot_energy_storage/glasource = /datum/robot_energy_storage/glass
/// The amount of energy this draws from the glass source per stack unit.
var/glacost = 500
/obj/item/stack/sheet/rglass/cyborg/get_amount()
return min(round(source.energy / cost), round(glasource.energy / glacost))
/obj/item/stack/sheet/rglass/cyborg/use(used, transfer = FALSE, check = TRUE) // Requires special checks, because it uses two storages
if(get_amount(used)) //ensure we still have enough energy if called in a do_after chain
source.use_charge(used * cost)
glasource.use_charge(used * glacost)
return TRUE
/obj/item/stack/sheet/rglass/cyborg/add(amount)
source.add_charge(amount * cost)
glasource.add_charge(amount * glacost)
/obj/item/stack/sheet/rglass/get_main_recipes()
. = ..()
. += GLOB.reinforced_glass_recipes
@@ -282,6 +282,8 @@
/mob/living/silicon/robot/proc/activated(obj/item/item_module)
if(item_module in held_items)
return TRUE
if(item_module.loc in held_items) //Apparatus check
return TRUE
return FALSE
/**
@@ -89,11 +89,6 @@
if(ispath(sheet_module.source, /datum/robot_energy_storage))
sheet_module.source = get_or_create_estorage(sheet_module.source)
if(istype(sheet_module, /obj/item/stack/sheet/rglass/cyborg))
var/obj/item/stack/sheet/rglass/cyborg/rglass_module = sheet_module
if(ispath(rglass_module.glasource, /datum/robot_energy_storage))
rglass_module.glasource = get_or_create_estorage(rglass_module.glasource)
if(istype(sheet_module.source))
sheet_module.cost = max(sheet_module.cost, 1) // Must not cost 0 to prevent div/0 errors.
sheet_module.is_cyborg = TRUE
@@ -333,7 +328,7 @@
/obj/item/electroadaptive_pseudocircuit,
/obj/item/stack/sheet/iron,
/obj/item/stack/sheet/glass,
/obj/item/stack/sheet/rglass/cyborg,
/obj/item/borg/apparatus/sheet_manipulator,
/obj/item/stack/rods/cyborg,
/obj/item/stack/tile/iron/base/cyborg,
/obj/item/stack/cable_coil,
@@ -862,7 +857,7 @@
/obj/item/multitool/cyborg,
/obj/item/stack/sheet/iron,
/obj/item/stack/sheet/glass,
/obj/item/stack/sheet/rglass/cyborg,
/obj/item/borg/apparatus/sheet_manipulator,
/obj/item/stack/rods/cyborg,
/obj/item/stack/tile/iron/base/cyborg,
/obj/item/dest_tagger/borg,
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB