From 743134173f26a1c3f42518cae0e66acd4e3c9353 Mon Sep 17 00:00:00 2001 From: TheGreatKitsune Date: Fri, 25 Nov 2022 11:05:06 -0600 Subject: [PATCH] Add a scene gripper to borgs --- .../mob/living/carbon/human/stripping.dm | 26 +++++++++++++++++-- .../silicon/robot/robot_modules/station.dm | 1 + .../living/silicon/robot/drone/drone_items.dm | 12 +++++++++ vorestation.dme | 1 + 4 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 modular_chomp/code/modules/mob/living/silicon/robot/drone/drone_items.dm diff --git a/code/modules/mob/living/carbon/human/stripping.dm b/code/modules/mob/living/carbon/human/stripping.dm index 7aa08accbb..e8c38208b2 100644 --- a/code/modules/mob/living/carbon/human/stripping.dm +++ b/code/modules/mob/living/carbon/human/stripping.dm @@ -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, "You cannot remove \the [src]'s [target_slot.name].") return visible_message("\The [user] is trying to remove \the [src]'s [target_slot.name]!") - 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("\The [user] is trying to put \a [held] in \the [src]'s mouth!") else visible_message("\The [user] is trying to put \a [held] on \the [src]!") + //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("\The [user] is trying to put \a [G.wrapped] in \the [src]'s mouth!") + else + visible_message("\The [user] is trying to put \a [G.wrapped] on \the [src]!") + //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) diff --git a/code/modules/mob/living/silicon/robot/robot_modules/station.dm b/code/modules/mob/living/silicon/robot/robot_modules/station.dm index cc0d12c3f0..35474383a1 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules/station.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules/station.dm @@ -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 diff --git a/modular_chomp/code/modules/mob/living/silicon/robot/drone/drone_items.dm b/modular_chomp/code/modules/mob/living/silicon/robot/drone/drone_items.dm new file mode 100644 index 0000000000..9b28792f66 --- /dev/null +++ b/modular_chomp/code/modules/mob/living/silicon/robot/drone/drone_items.dm @@ -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 + ) diff --git a/vorestation.dme b/vorestation.dme index ed46b6e224..ae4f521b6c 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -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"