Merge pull request #9619 from BlackMajor/Yote

Buffs engiborg build potential
This commit is contained in:
kevinz000
2019-10-27 05:38:50 -07:00
committed by GitHub
6 changed files with 92 additions and 13 deletions

View File

@@ -746,3 +746,73 @@
..()
hud = new /obj/item/clothing/glasses/hud/security(src)
return
/**********************************************************************
Grippers oh god oh fuck
***********************************************************************/
/obj/item/weapon/gripper
name = "circuit gripper"
desc = "A simple grasping tool for inserting circuitboards into machinary."
icon = 'icons/obj/device.dmi'
icon_state = "gripper"
item_flags = NOBLUDGEON
//Has a list of items that it can hold.
var/list/can_hold = list(
/obj/item/circuitboard
)
var/obj/item/wrapped = null // Item currently being held.
/obj/item/weapon/gripper/attack_self()
if(wrapped)
wrapped.forceMove(get_turf(wrapped))
wrapped = null
return ..()
/obj/item/weapon/gripper/afterattack(var/atom/target, var/mob/living/user, proximity, params)
if(!proximity)
return
if(!wrapped)
for(var/obj/item/thing in src.contents)
wrapped = thing
break
if(wrapped) //Already have an item.
//Temporary put wrapped into user so target's attackby() checks pass.
wrapped.loc = user
//Pass the attack on to the target. This might delete/relocate wrapped.
var/resolved = target.attackby(wrapped,user)
if(!resolved && wrapped && target)
wrapped.afterattack(target,user,1)
//If wrapped was neither deleted nor put into target, put it back into the gripper.
if(wrapped && user && (wrapped.loc == user))
wrapped.loc = src
else
wrapped = null
return
else if(istype(target,/obj/item))
var/obj/item/I = target
var/grab = 0
for(var/typepath in can_hold)
if(istype(I,typepath))
grab = 1
break
//We can grab the item, finally.
if(grab)
to_chat(user, "You collect \the [I].")
I.loc = src
wrapped = I
return
else
to_chat(user, "<span class='danger'>Your gripper cannot hold \the [target].</span>")

View File

@@ -598,10 +598,10 @@
R.update_transform()
/obj/item/borg/upgrade/rped
name = "engineering cyborg RPED"
name = "engineering cyborg BSRPED"
desc = "A rapid part exchange device for the engineering cyborg."
icon = 'icons/obj/storage.dmi'
icon_state = "borgrped"
icon_state = "borg_BS_RPED"
require_module = TRUE
module_type = list(/obj/item/robot_module/engineering)
@@ -609,14 +609,21 @@
. = ..()
if(.)
var/obj/item/storage/part_replacer/bluespace/cyborg/BSRPED = locate() in R
var/obj/item/storage/part_replacer/cyborg/RPED = locate() in R
if(RPED)
to_chat(user, "<span class='warning'>This unit is already equipped with a RPED module.</span>")
if(!RPED)
RPED = locate() in R.module
if(!BSRPED)
BSRPED = locate() in R.module //There's gotta be a smarter way to do this.
if(BSRPED)
to_chat(user, "<span class='warning'>This unit is already equipped with a BSRPED module.</span>")
return FALSE
RPED = new(R.module)
R.module.basic_modules += RPED
R.module.add_module(RPED, FALSE, TRUE)
BSRPED = new(R.module)
SEND_SIGNAL(RPED, COMSIG_TRY_STORAGE_QUICK_EMPTY)
qdel(RPED)
R.module.basic_modules += BSRPED
R.module.add_module(BSRPED, FALSE, TRUE)
/obj/item/borg/upgrade/rped/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()