Add a scene gripper to borgs

This commit is contained in:
TheGreatKitsune
2022-11-25 11:05:06 -06:00
parent 333a5b1128
commit 743134173f
4 changed files with 38 additions and 2 deletions

View File

@@ -59,6 +59,12 @@
var/obj/item/held = user.get_active_hand()
if(!istype(held) || is_robot_module(held))
stripping = TRUE
//CHOMPEdit Start - Let borg grippers put stuff on.
if(is_robot_module(held) && istype(held, /obj/item/weapon/gripper))
var/obj/item/weapon/gripper/G = held
if(istype(G.wrapped))
stripping = FALSE
//CHOMPEdit End
else
var/obj/item/weapon/holder/holder = held
if(istype(holder) && src == holder.held_mob)
@@ -67,7 +73,7 @@
var/obj/item/weapon/grab/grab = held
if(istype(grab) && grab.affecting == src)
stripping = TRUE
if(stripping)
if(!istype(target_slot)) // They aren't holding anything valid and there's nothing to remove, why are we even here?
return
@@ -75,11 +81,19 @@
to_chat(user, "<span class='warning'>You cannot remove \the [src]'s [target_slot.name].</span>")
return
visible_message("<span class='danger'>\The [user] is trying to remove \the [src]'s [target_slot.name]!</span>")
else
else if(!istype(held, /obj/item/weapon/gripper)) //CHOMPEdit - Let borg grippers put stuff on.
if(slot_to_strip == slot_wear_mask && istype(held, /obj/item/weapon/grenade))
visible_message("<span class='danger'>\The [user] is trying to put \a [held] in \the [src]'s mouth!</span>")
else
visible_message("<span class='danger'>\The [user] is trying to put \a [held] on \the [src]!</span>")
//CHOMPEdit Start - Let borg grippers put stuff on.
else
var/obj/item/weapon/gripper/G = held
if(slot_to_strip == slot_wear_mask && istype(G.wrapped, /obj/item/weapon/grenade))
visible_message("<span class='danger'>\The [user] is trying to put \a [G.wrapped] in \the [src]'s mouth!</span>")
else
visible_message("<span class='danger'>\The [user] is trying to put \a [G.wrapped] on \the [src]!</span>")
//CHOMPEdit End
if(!do_after(user,HUMAN_STRIP_DELAY,src))
return
@@ -95,6 +109,14 @@
if(stripping)
add_attack_logs(user,src,"Removed equipment from slot [target_slot]")
unEquip(target_slot)
//CHOMPEdit Start - Let borg grippers put stuff on.
else if(is_robot_module(held) && istype(held, /obj/item/weapon/gripper))
var/obj/item/weapon/gripper/G = held
var/obj/item/wrapped = G.wrapped
if(istype(wrapped))
G.drop_item_nm()
equip_to_slot_if_possible(wrapped, text2num(slot_to_strip), 0, 1, 1)
//CHOMPEdit End
else if(user.unEquip(held))
equip_to_slot_if_possible(held, text2num(slot_to_strip), 0, 1, 1)
if(held.loc != src)

View File

@@ -182,6 +182,7 @@ var/global/list/robot_modules = list(
src.modules += new /obj/item/weapon/tool/crowbar/cyborg(src)
src.modules += new /obj/item/weapon/extinguisher(src)
src.modules += new /obj/item/device/gps/robot(src)
src.modules += new /obj/item/weapon/gripper/scene(src) //CHOMPEdit - Give all borgs a scene gripper
vr_new() // Vorestation Edit: For modules in robot_modules_vr.dm
/obj/item/weapon/robot_module/robot/standard

View File

@@ -0,0 +1,12 @@
/obj/item/weapon/gripper/scene
name = "misc gripper"
desc = "A simple grasping tool that can hold a variety of 'general' objects..."
can_hold = list(
/obj/item/capture_crystal,
/obj/item/clothing,
/obj/item/weapon/implanter,
/obj/item/weapon/disk/nifsoft/compliance,
/obj/item/weapon/handcuffs,
/obj/item/toy
)

View File

@@ -4550,6 +4550,7 @@
#include "modular_chomp\code\modules\mob\living\carbon\human\species\station\protean\protean_species.dm"
#include "modular_chomp\code\modules\mob\living\carbon\human\species\station\traits\negative.dm"
#include "modular_chomp\code\modules\mob\living\carbon\human\species\station\traits\positive.dm"
#include "modular_chomp\code\modules\mob\living\silicon\robot\drone\drone_items.dm"
#include "modular_chomp\code\modules\mob\living\simple_mob\donteatbossmonsters.dm"
#include "modular_chomp\code\modules\mob\living\simple_mob\simple_mob.dm"
#include "modular_chomp\code\modules\mob\living\simple_mob\simple_mob_abilities.dm"