Merge pull request #10305 from BlackMajor/Yeehaw
Various Mining borg changes. And some extras.
This commit is contained in:
@@ -814,3 +814,93 @@
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='danger'>Your gripper cannot hold \the [target].</span>")
|
||||
|
||||
/obj/item/weapon/gripper/mining
|
||||
name = "shelter capsule deployer"
|
||||
desc = "A simple grasping tool for carrying and deploying shelter capsules."
|
||||
icon_state = "gripper_mining"
|
||||
can_hold = list(
|
||||
/obj/item/survivalcapsule
|
||||
)
|
||||
|
||||
/obj/item/weapon/gripper/mining/attack_self()
|
||||
if(wrapped)
|
||||
wrapped.forceMove(get_turf(wrapped))
|
||||
wrapped.attack_self()
|
||||
wrapped = null
|
||||
return
|
||||
|
||||
/obj/item/gun/energy/plasmacutter/cyborg
|
||||
name = "cyborg plasma cutter"
|
||||
desc = "A basic variation of the plasma cutter, compressed into a cyborg chassis. Less effective than normal plasma cutters."
|
||||
force = 15
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/plasma/weak)
|
||||
can_charge = FALSE
|
||||
selfcharge = EGUN_SELFCHARGE_BORG
|
||||
cell_type = /obj/item/stock_parts/cell/secborg
|
||||
charge_delay = 5
|
||||
|
||||
/obj/item/cyborg_clamp
|
||||
name = "cyborg loading clamp"
|
||||
desc = "Equipment for supply cyborgs. Lifts objects and loads them into cargo. Will not carry living beings."
|
||||
icon = 'icons/mecha/mecha_equipment.dmi'
|
||||
icon_state = "mecha_clamp"
|
||||
tool_behaviour = TOOL_RETRACTOR
|
||||
item_flags = NOBLUDGEON
|
||||
flags_1 = NONE
|
||||
var/cargo_capacity = 8
|
||||
var/cargo = list()
|
||||
|
||||
/obj/item/cyborg_clamp/attack(mob/M, mob/user, def_zone)
|
||||
return
|
||||
|
||||
/obj/item/cyborg_clamp/afterattack(atom/movable/target, mob/user, proximity)
|
||||
. = ..()
|
||||
if(!proximity)
|
||||
return FALSE
|
||||
if(isobj(target))
|
||||
var/obj/O = target
|
||||
if(!O.anchored)
|
||||
if(contents.len < cargo_capacity)
|
||||
user.visible_message("[user] lifts [target] and starts to load it into its cargo compartment.")
|
||||
O.anchored = TRUE
|
||||
if(do_mob(user, O, 20))
|
||||
for(var/mob/chump in target.GetAllContents())
|
||||
to_chat(user, "<span class='warning'>Error: Living entity detected in [target]. Cannot load.</span>")
|
||||
O.anchored = initial(O.anchored)
|
||||
return
|
||||
for(var/obj/item/disk/nuclear/diskie in target.GetAllContents())
|
||||
to_chat(user, "<span class='warning'>Error: Nuclear class authorization device detected in [target]. Cannot load.</span>")
|
||||
O.anchored = initial(O.anchored)
|
||||
return
|
||||
if(contents.len < cargo_capacity) //check both before and after
|
||||
cargo += O
|
||||
O.forceMove(src)
|
||||
O.anchored = FALSE
|
||||
to_chat(user, "<span class='notice'>[target] successfully loaded.</span>")
|
||||
playsound(loc, 'sound/effects/bin_close.ogg', 50, 0)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Not enough room in cargo compartment! Maximum of [cargo_capacity] objects!</span>")
|
||||
O.anchored = initial(O.anchored)
|
||||
return
|
||||
else
|
||||
O.anchored = initial(O.anchored)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Not enough room in cargo compartment! Maximum of eight objects!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[target] is firmly secured!</span>")
|
||||
|
||||
/obj/item/cyborg_clamp/attack_self(mob/user)
|
||||
var/obj/chosen_cargo = input(user, "Drop what?") as null|anything in cargo
|
||||
if(!chosen_cargo)
|
||||
return
|
||||
chosen_cargo.forceMove(get_turf(chosen_cargo))
|
||||
cargo -= chosen_cargo
|
||||
user.visible_message("[user] unloads [chosen_cargo] from its cargo.")
|
||||
playsound(loc, 'sound/effects/bin_close.ogg', 50, 0)
|
||||
|
||||
/obj/item/card/id/miningborg
|
||||
name = "mining point card"
|
||||
desc = "A robotic ID strip used for claiming and transferring mining points. Must be held in an active slot to transfer points."
|
||||
access = list(ACCESS_MINING, ACCESS_MINING_STATION, ACCESS_MAILSORTING, ACCESS_MINERAL_STOREROOM)
|
||||
icon_state = "data_1"
|
||||
@@ -173,32 +173,64 @@
|
||||
R.module.basic_modules += S
|
||||
R.module.add_module(S, FALSE, TRUE)
|
||||
|
||||
/obj/item/borg/upgrade/soh
|
||||
name = "mining cyborg satchel of holding"
|
||||
desc = "A satchel of holding replacement for mining cyborg's ore satchel module."
|
||||
/obj/item/borg/upgrade/premiumka
|
||||
name = "mining cyborg premium KA"
|
||||
desc = "A premium kinetic accelerator replacement for the mining module's standard kinetic accelerator."
|
||||
icon_state = "cyborg_upgrade3"
|
||||
require_module = 1
|
||||
module_type = list(/obj/item/robot_module/miner)
|
||||
|
||||
/obj/item/borg/upgrade/soh/action(mob/living/silicon/robot/R)
|
||||
/obj/item/borg/upgrade/premiumka/action(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if(.)
|
||||
for(var/obj/item/storage/bag/ore/cyborg/S in R.module)
|
||||
R.module.remove_module(S, TRUE)
|
||||
for(var/obj/item/gun/energy/kinetic_accelerator/cyborg/KA in R.module)
|
||||
for(var/obj/item/borg/upgrade/modkit/M in KA.modkits)
|
||||
M.uninstall(src)
|
||||
R.module.remove_module(KA, TRUE)
|
||||
|
||||
var/obj/item/storage/bag/ore/holding/H = new /obj/item/storage/bag/ore/holding(R.module)
|
||||
R.module.basic_modules += H
|
||||
R.module.add_module(H, FALSE, TRUE)
|
||||
var/obj/item/gun/energy/kinetic_accelerator/premiumka/cyborg/PKA = new /obj/item/gun/energy/kinetic_accelerator/premiumka/cyborg(R.module)
|
||||
R.module.basic_modules += PKA
|
||||
R.module.add_module(PKA, FALSE, TRUE)
|
||||
|
||||
/obj/item/borg/upgrade/soh/deactivate(mob/living/silicon/robot/R, user = usr)
|
||||
/obj/item/borg/upgrade/premiumka/deactivate(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if (.)
|
||||
for(var/obj/item/storage/bag/ore/holding/H in R.module)
|
||||
R.module.remove_module(H, TRUE)
|
||||
for(var/obj/item/gun/energy/kinetic_accelerator/premiumka/cyborg/PKA in R.module)
|
||||
for(var/obj/item/borg/upgrade/modkit/M in PKA.modkits)
|
||||
M.uninstall(src)
|
||||
R.module.remove_module(PKA, TRUE)
|
||||
|
||||
var/obj/item/storage/bag/ore/cyborg/S = new (R.module)
|
||||
R.module.basic_modules += S
|
||||
R.module.add_module(S, FALSE, TRUE)
|
||||
var/obj/item/gun/energy/kinetic_accelerator/cyborg/KA = new (R.module)
|
||||
R.module.basic_modules += KA
|
||||
R.module.add_module(KA, FALSE, TRUE)
|
||||
|
||||
|
||||
/obj/item/borg/upgrade/advcutter
|
||||
name = "mining cyborg advanced plasma cutter"
|
||||
desc = "An upgrade for the mining cyborgs plasma cutter, bringing it to advanced operation."
|
||||
icon_state = "cyborg_upgrade3"
|
||||
require_module = 1
|
||||
module_type = list(/obj/item/robot_module/miner)
|
||||
|
||||
/obj/item/borg/upgrade/advcutter/action(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if(.)
|
||||
for(var/obj/item/gun/energy/plasmacutter/cyborg/C in R.module)
|
||||
C.name = "advanced cyborg plasma cutter"
|
||||
C.desc = "An improved version of the cyborg plasma cutter. Baring functionality identical to the standard hand held version."
|
||||
C.icon_state = "adv_plasmacutter"
|
||||
for(var/obj/item/ammo_casing/energy/plasma/weak/L in C.ammo_type)
|
||||
L.projectile_type = /obj/item/projectile/plasma/adv
|
||||
|
||||
/obj/item/borg/upgrade/advcutter/deactivate(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if (.)
|
||||
for(var/obj/item/gun/energy/plasmacutter/cyborg/C in R.module)
|
||||
C.name = initial(name)
|
||||
C.desc = initial(desc)
|
||||
C.icon_state = initial(icon_state)
|
||||
for(var/obj/item/ammo_casing/energy/plasma/weak/L in C.ammo_type)
|
||||
L.projectile_type = initial(L.projectile_type)
|
||||
|
||||
/obj/item/borg/upgrade/tboh
|
||||
name = "janitor cyborg trash bag of holding"
|
||||
|
||||
@@ -110,6 +110,7 @@
|
||||
var/spam_protection = FALSE //If this is TRUE, the holder won't receive any messages when they fail to pick up ore through crossing it
|
||||
var/mob/listeningTo
|
||||
rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
|
||||
var/range = null
|
||||
|
||||
/obj/item/storage/bag/ore/ComponentInitialize()
|
||||
. = ..()
|
||||
@@ -142,12 +143,21 @@
|
||||
return
|
||||
if (istype(user.pulling, /obj/structure/ore_box))
|
||||
box = user.pulling
|
||||
if(issilicon(user))
|
||||
var/mob/living/silicon/robot/borgo = user
|
||||
for(var/obj/item/cyborg_clamp/C in borgo.module.modules)
|
||||
for(var/obj/structure/ore_box/B in C)
|
||||
box = B
|
||||
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
if(STR)
|
||||
for(var/A in tile)
|
||||
if (!is_type_in_typecache(A, STR.can_hold))
|
||||
continue
|
||||
if (box)
|
||||
if(range)
|
||||
for(var/obj/item/stack/ore/ore in range(range, user))
|
||||
user.transferItemToLoc(ore, box)
|
||||
user.transferItemToLoc(A, box)
|
||||
show_message = TRUE
|
||||
else if(SEND_SIGNAL(src, COMSIG_TRY_STORAGE_INSERT, A, user, TRUE))
|
||||
@@ -169,6 +179,7 @@
|
||||
|
||||
/obj/item/storage/bag/ore/cyborg
|
||||
name = "cyborg mining satchel"
|
||||
range = 1
|
||||
|
||||
/obj/item/storage/bag/ore/cyborg/ComponentInitialize()
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user