mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 19:22:56 +00:00
Add a scene gripper to borgs
This commit is contained in:
@@ -59,6 +59,12 @@
|
|||||||
var/obj/item/held = user.get_active_hand()
|
var/obj/item/held = user.get_active_hand()
|
||||||
if(!istype(held) || is_robot_module(held))
|
if(!istype(held) || is_robot_module(held))
|
||||||
stripping = TRUE
|
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
|
else
|
||||||
var/obj/item/weapon/holder/holder = held
|
var/obj/item/weapon/holder/holder = held
|
||||||
if(istype(holder) && src == holder.held_mob)
|
if(istype(holder) && src == holder.held_mob)
|
||||||
@@ -67,7 +73,7 @@
|
|||||||
var/obj/item/weapon/grab/grab = held
|
var/obj/item/weapon/grab/grab = held
|
||||||
if(istype(grab) && grab.affecting == src)
|
if(istype(grab) && grab.affecting == src)
|
||||||
stripping = TRUE
|
stripping = TRUE
|
||||||
|
|
||||||
if(stripping)
|
if(stripping)
|
||||||
if(!istype(target_slot)) // They aren't holding anything valid and there's nothing to remove, why are we even here?
|
if(!istype(target_slot)) // They aren't holding anything valid and there's nothing to remove, why are we even here?
|
||||||
return
|
return
|
||||||
@@ -75,11 +81,19 @@
|
|||||||
to_chat(user, "<span class='warning'>You cannot remove \the [src]'s [target_slot.name].</span>")
|
to_chat(user, "<span class='warning'>You cannot remove \the [src]'s [target_slot.name].</span>")
|
||||||
return
|
return
|
||||||
visible_message("<span class='danger'>\The [user] is trying to remove \the [src]'s [target_slot.name]!</span>")
|
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))
|
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>")
|
visible_message("<span class='danger'>\The [user] is trying to put \a [held] in \the [src]'s mouth!</span>")
|
||||||
else
|
else
|
||||||
visible_message("<span class='danger'>\The [user] is trying to put \a [held] on \the [src]!</span>")
|
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))
|
if(!do_after(user,HUMAN_STRIP_DELAY,src))
|
||||||
return
|
return
|
||||||
@@ -95,6 +109,14 @@
|
|||||||
if(stripping)
|
if(stripping)
|
||||||
add_attack_logs(user,src,"Removed equipment from slot [target_slot]")
|
add_attack_logs(user,src,"Removed equipment from slot [target_slot]")
|
||||||
unEquip(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))
|
else if(user.unEquip(held))
|
||||||
equip_to_slot_if_possible(held, text2num(slot_to_strip), 0, 1, 1)
|
equip_to_slot_if_possible(held, text2num(slot_to_strip), 0, 1, 1)
|
||||||
if(held.loc != src)
|
if(held.loc != src)
|
||||||
|
|||||||
@@ -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/tool/crowbar/cyborg(src)
|
||||||
src.modules += new /obj/item/weapon/extinguisher(src)
|
src.modules += new /obj/item/weapon/extinguisher(src)
|
||||||
src.modules += new /obj/item/device/gps/robot(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
|
vr_new() // Vorestation Edit: For modules in robot_modules_vr.dm
|
||||||
|
|
||||||
/obj/item/weapon/robot_module/robot/standard
|
/obj/item/weapon/robot_module/robot/standard
|
||||||
|
|||||||
@@ -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
|
||||||
|
)
|
||||||
@@ -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\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\negative.dm"
|
||||||
#include "modular_chomp\code\modules\mob\living\carbon\human\species\station\traits\positive.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\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.dm"
|
||||||
#include "modular_chomp\code\modules\mob\living\simple_mob\simple_mob_abilities.dm"
|
#include "modular_chomp\code\modules\mob\living\simple_mob\simple_mob_abilities.dm"
|
||||||
|
|||||||
Reference in New Issue
Block a user