Files
1933d2fab3 Refactors borg grippers, service now has a specialized gripper. (#24596)
* Fixing some minor typos for cyborg upgrade flavour text

Throws in some missing apostrophes, capitalisation, and the letter "s."

* Briefcase Full of Cash buff

Increases the amount of cash in the Syndicate Briefcase Full of Cash from 600 Cr to 1000 Cr

* Reverts double-feature PR

* Reverts a broken revert

* Reverting again because Ebba told me to

* And reverting yet again

* Most of the stuff

Most of the refactor. Needs to fix medical borg doing shrapnel extraction.

* Forgot this

* fixing space intent

* Newline

* Update code/game/objects/items/robot/cyborg_gripper.dm

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>

* Update code/game/objects/items/robot/cyborg_gripper.dm

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>

* Update code/game/objects/items/robot/cyborg_gripper.dm

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>

* Update code/game/objects/items/robot/cyborg_gripper.dm

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>

* More improvement

* CI fixes

* GO AWAY SPACE INDENTATION I DIDN'T PUT YOU THERE AAAAA

* oops mb mb

* Makes this work with ebba's PR

* get dat fokkin disk

* Update cyborg_gripper.dm

* Removes all nuclear stuff

* Update code/game/objects/items/robot/cyborg_gripper.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* Update code/game/objects/items/robot/cyborg_gripper.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* Update cyborg_gripper.dm

* Update code/game/objects/items/robot/cyborg_gripper.dm

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>

* Update code/game/objects/items/robot/cyborg_gripper.dm

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>

* Update cyborg_gripper.dm

* coin flipping

* Update cyborg_gripper.dm

* Update code/game/objects/items/robot/cyborg_gripper.dm

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>

* EOL comments no longer EOL

* autodoc

* Update cyborg_gripper.dm

* can hold all

* Update code/game/objects/items/robot/cyborg_gripper.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>
Signed-off-by: CRUNCH <143041327+Fordoxia@users.noreply.github.com>

* Oh hi mark!

* Update code/game/objects/items/robot/cyborg_gripper.dm

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Signed-off-by: CRUNCH <143041327+Fordoxia@users.noreply.github.com>

* Line split

* Some comments, examine().

Examining a gripper now tells you what's inside.

---------

Signed-off-by: CRUNCH <143041327+Fordoxia@users.noreply.github.com>
Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
2024-05-17 12:43:06 +00:00

66 lines
2.0 KiB
Plaintext

/obj/item/matter_decompiler
name = "matter decompiler"
desc = "Eating trash, bits of glass, or other debris will replenish your stores."
icon = 'icons/obj/toy.dmi'
icon_state = "minigibber"
/// Metal, glass, wood, plastic.
var/list/stored_comms = list(
"metal" = 0,
"glass" = 0,
"wood" = 0
)
/obj/item/matter_decompiler/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
return
/obj/item/matter_decompiler/afterattack(atom/target, mob/living/user, proximity, params)
if(!proximity)
return // Not adjacent.
// We only want to deal with using this on turfs. Specific items aren't important.
var/turf/T = get_turf(target)
if(!istype(T))
return
// Used to give the right message.
var/grabbed_something = FALSE
for(var/atom/movable/A in T)
if(A.decompile_act(src, user)) // Each decompileable mob or obj needs to have this defined
grabbed_something = TRUE
if(grabbed_something)
to_chat(user, "<span class='notice'>You deploy your decompiler and clear out the contents of \the [T].</span>")
else
to_chat(user, "<span class='warning'>Nothing on \the [T] is useful to you.</span>")
return
// Putting the decompiler here to avoid doing list checks every tick.
/mob/living/silicon/robot/drone/use_power()
..()
if(low_power_mode || !decompiler)
return
// The decompiler replenishes drone stores from hoovered-up junk each tick.
for(var/type in decompiler.stored_comms)
if(decompiler.stored_comms[type] > 0)
var/obj/item/stack/sheet/stack
switch(type)
if("metal")
if(!stack_metal)
stack_metal = new /obj/item/stack/sheet/metal/cyborg(src.module)
stack_metal.amount = 1
stack = stack_metal
if("glass")
if(!stack_glass)
stack_glass = new /obj/item/stack/sheet/glass/cyborg(src.module)
stack_glass.amount = 1
stack = stack_glass
if("wood")
if(!stack_wood)
stack_wood = new /obj/item/stack/sheet/wood(src.module)
stack_wood.amount = 1
stack = stack_wood
stack.amount++
decompiler.stored_comms[type]--