mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
[MIRROR] Gripper update (#11330)
Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
committed by
GitHub
parent
911234df75
commit
4239f5ab7c
@@ -271,23 +271,23 @@
|
||||
|
||||
if(istype(I, /obj/item/gripper))
|
||||
var/obj/item/gripper/GR = I
|
||||
var/obj/item/Wrap = GR.wrapped
|
||||
if(Wrap)
|
||||
Wrap.loc = get_turf(src)
|
||||
var/result = can_insert(Wrap, user)
|
||||
var/obj/item/wrap = GR.get_current_pocket()
|
||||
if(wrap)
|
||||
wrap.loc = get_turf(src)
|
||||
var/result = can_insert(wrap, user)
|
||||
if(!result)
|
||||
Wrap.forceMove(GR)
|
||||
wrap.forceMove(GR)
|
||||
if(!(default_deconstruction_screwdriver(user, I)))
|
||||
default_part_replacement(user, I)
|
||||
return
|
||||
|
||||
if(QDELETED(GR.wrapped))
|
||||
GR.wrapped = null
|
||||
if(QDELETED(wrap))
|
||||
GR.WR = null
|
||||
|
||||
if(GR?.wrapped.loc != src)
|
||||
if(wrap.loc != src)
|
||||
GR.drop_item_nm()
|
||||
|
||||
ToCook = Wrap
|
||||
ToCook = wrap
|
||||
else
|
||||
attack_hand(user)
|
||||
return
|
||||
|
||||
@@ -39,14 +39,15 @@
|
||||
/obj/item/reagent_containers/cooking_container/attackby(var/obj/item/I as obj, var/mob/user as mob)
|
||||
if(istype(I, /obj/item/gripper))
|
||||
var/obj/item/gripper/GR = I
|
||||
if(GR.wrapped)
|
||||
GR.wrapped.forceMove(get_turf(src))
|
||||
attackby(GR.wrapped, user)
|
||||
if(QDELETED(GR.wrapped))
|
||||
GR.wrapped = null
|
||||
var/obj/item/wrapped = GR.get_current_pocket()
|
||||
if(wrapped)
|
||||
wrapped.forceMove(get_turf(src))
|
||||
attackby(wrapped, user)
|
||||
if(QDELETED(wrapped))
|
||||
wrapped = null
|
||||
|
||||
if(GR?.wrapped.loc != src)
|
||||
GR.wrapped = null
|
||||
else if(wrapped.loc != src)
|
||||
wrapped = null
|
||||
|
||||
return
|
||||
|
||||
|
||||
@@ -155,12 +155,12 @@
|
||||
|
||||
else if(istype(O, /obj/item/gripper)) // Grippers. ~Mechoid.
|
||||
var/obj/item/gripper/B = O //B, for Borg.
|
||||
if(!B.wrapped)
|
||||
var/obj/item/wrapped = B.get_current_pocket()
|
||||
if(!wrapped)
|
||||
to_chat(user, span_filter_notice("\The [B] is not holding anything."))
|
||||
return
|
||||
else
|
||||
var/B_held = B.wrapped
|
||||
to_chat(user, span_filter_notice("You use \the [B] to put \the [B_held] into \the [src]."))
|
||||
to_chat(user, span_filter_notice("You use \the [B] to put \the [wrapped] into \the [src]."))
|
||||
return
|
||||
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user