Merge pull request #8753 from Neerti/4-4-2015_borg_module_stuff
Revenge of the Research Module (and other stuff from that PR)
@@ -30,6 +30,13 @@
|
||||
|
||||
return "[output][and_text][input[index]]"
|
||||
|
||||
|
||||
/proc/ConvertReqString2List(var/list/source_list)
|
||||
var/list/temp_list = params2list(source_list)
|
||||
for(var/O in temp_list)
|
||||
temp_list[O] = text2num(temp_list[O])
|
||||
return temp_list
|
||||
|
||||
//Returns list element or null. Should prevent "index out of bounds" error.
|
||||
proc/listgetindex(var/list/list,index)
|
||||
if(istype(list) && list.len)
|
||||
|
||||
@@ -105,6 +105,16 @@
|
||||
else
|
||||
icon_state = "table2-idle"
|
||||
|
||||
/obj/machinery/optable/MouseDrop_T(mob/target, mob/user)
|
||||
|
||||
var/mob/living/M = user
|
||||
if(user.stat || user.restrained() || !check_table(user) || !iscarbon(target))
|
||||
return
|
||||
if(istype(M))
|
||||
take_victim(target,user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/optable/verb/climb_on()
|
||||
set name = "Climb On Table"
|
||||
set category = "Object"
|
||||
|
||||
@@ -135,11 +135,12 @@
|
||||
return 1
|
||||
else
|
||||
user << "\red You have no idea what you can cook with this [O]."
|
||||
return 1
|
||||
..()
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/machinery/microwave/attack_ai(mob/user as mob)
|
||||
return 0
|
||||
if(istype(user, /mob/living/silicon/robot) && Adjacent(user))
|
||||
attack_hand(user)
|
||||
|
||||
/obj/machinery/microwave/attack_hand(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
|
||||
@@ -244,7 +244,7 @@
|
||||
..()
|
||||
|
||||
/obj/machinery/smartfridge/attack_ai(mob/user as mob)
|
||||
return 0
|
||||
attack_hand(user)
|
||||
|
||||
/obj/machinery/smartfridge/attack_hand(mob/user as mob)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
|
||||
@@ -479,17 +479,6 @@
|
||||
|
||||
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))))
|
||||
if ((href_list["vend"]) && (src.vend_ready) && (!currently_vending))
|
||||
|
||||
if(istype(usr,/mob/living/silicon))
|
||||
if(istype(usr,/mob/living/silicon/robot))
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
if(!(R.module && istype(R.module,/obj/item/weapon/robot_module/butler) ))
|
||||
usr << "\red The vending machine refuses to interface with you, as you are not in its target demographic!"
|
||||
return
|
||||
else
|
||||
usr << "\red The vending machine refuses to interface with you, as you are not in its target demographic!"
|
||||
return
|
||||
|
||||
if((!allowed(usr)) && !emagged && scan_id) //For SECURE VENDING MACHINES YEAH
|
||||
usr << "<span class='warning'>Access denied.</span>" //Unless emagged of course
|
||||
flick(icon_deny,src)
|
||||
@@ -504,6 +493,9 @@
|
||||
|
||||
if(R.price <= 0)
|
||||
src.vend(R, usr)
|
||||
else if(istype(usr,/mob/living/silicon)) //If the item is not free, provide feedback if a synth is trying to buy something.
|
||||
usr << "<span class='danger'>Artificial unit recognized. Artificial units cannot complete this transaction. Purchase canceled.</span>"
|
||||
return
|
||||
else
|
||||
src.currently_vending = R
|
||||
if(!vendor_account || vendor_account.suspended)
|
||||
|
||||
@@ -291,21 +291,14 @@
|
||||
..()
|
||||
if(istype(W, /obj/item/device/flash))
|
||||
if(istype(user,/mob/living/silicon/robot))
|
||||
user << "\red How do you propose to do that?"
|
||||
var/current_module = user.get_active_hand()
|
||||
if(current_module == W)
|
||||
user << "<span class='warning'>How do you propose to do that?</span>"
|
||||
return
|
||||
else if(src.flash1 && src.flash2)
|
||||
user << "\blue You have already inserted the eyes!"
|
||||
return
|
||||
else if(src.flash1)
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
src.flash2 = W
|
||||
user << "\blue You insert the flash into the eye socket!"
|
||||
else
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
src.flash1 = W
|
||||
user << "\blue You insert the flash into the eye socket!"
|
||||
add_flashes(W,user)
|
||||
else
|
||||
add_flashes(W,user)
|
||||
else if(istype(W, /obj/item/weapon/stock_parts/manipulator))
|
||||
user << "\blue You install some manipulators and modify the head, creating a functional spider-bot!"
|
||||
new /mob/living/simple_animal/spiderbot(get_turf(loc))
|
||||
@@ -315,6 +308,22 @@
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/robot_parts/head/proc/add_flashes(obj/item/W as obj, mob/user as mob) //Made into a seperate proc to avoid copypasta
|
||||
if(src.flash1 && src.flash2)
|
||||
user << "<span class='notice'>You have already inserted the eyes!</span>"
|
||||
return
|
||||
else if(src.flash1)
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
src.flash2 = W
|
||||
user << "<span class='notice'>You insert the flash into the eye socket!</span>"
|
||||
else
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
src.flash1 = W
|
||||
user << "<span class='notice'>You insert the flash into the eye socket!</span>"
|
||||
|
||||
|
||||
/obj/item/robot_parts/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/card/emag))
|
||||
if(sabotaged)
|
||||
|
||||
@@ -28,6 +28,9 @@
|
||||
/datum/matter_synth/medicine
|
||||
name = "Medicine Synthesizer"
|
||||
|
||||
/datum/matter_synth/nanite
|
||||
name = "Nanite Synthesizer"
|
||||
|
||||
/datum/matter_synth/metal
|
||||
name = "Metal Synthesizer"
|
||||
|
||||
|
||||
@@ -54,14 +54,9 @@ RSF
|
||||
user << "Changed dispensing mode to 'Dice Pack'"
|
||||
return
|
||||
if (mode == 5)
|
||||
mode = 6
|
||||
mode = 1
|
||||
user << "Changed dispensing mode to 'Cigarette'"
|
||||
return
|
||||
if (mode == 6)
|
||||
mode = 1
|
||||
user << "Changed dispensing mode to 'Dosh'"
|
||||
return
|
||||
// Change mode
|
||||
|
||||
/obj/item/weapon/rsf/afterattack(atom/A, mob/user as mob, proximity)
|
||||
|
||||
@@ -84,8 +79,8 @@ RSF
|
||||
|
||||
switch(mode)
|
||||
if(1)
|
||||
product = new /obj/item/weapon/spacecash/c10()
|
||||
used_energy = 200
|
||||
product = new /obj/item/clothing/mask/smokable/cigarette()
|
||||
used_energy = 10
|
||||
if(2)
|
||||
product = new /obj/item/weapon/reagent_containers/food/drinks/drinkingglass()
|
||||
used_energy = 50
|
||||
@@ -98,9 +93,6 @@ RSF
|
||||
if(5)
|
||||
product = new /obj/item/weapon/storage/pill_bottle/dice()
|
||||
used_energy = 200
|
||||
if(6)
|
||||
product = new /obj/item/clothing/mask/smokable/cigarette()
|
||||
used_energy = 10
|
||||
|
||||
user << "Dispensing [product ? product : "product"]..."
|
||||
product.loc = get_turf(A)
|
||||
|
||||
@@ -249,6 +249,10 @@
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/structure/closet/attack_ai(mob/user)
|
||||
if(istype(user, /mob/living/silicon/robot) && Adjacent(user)) // Robots can open/close it, but not the AI.
|
||||
attack_hand(user)
|
||||
|
||||
/obj/structure/closet/relaymove(mob/user as mob)
|
||||
if(user.stat || !isturf(src.loc))
|
||||
return
|
||||
|
||||
@@ -231,7 +231,8 @@ var/list/cheartstopper = list("potassium_chloride") // Thi
|
||||
// Used by robots and robot preferences.
|
||||
var/list/robot_module_types = list(
|
||||
"Standard", "Engineering", "Construction", "Surgeon", "Crisis",
|
||||
"Miner", "Janitor", "Service", "Clerical", "Security"
|
||||
"Miner", "Janitor", "Service", "Clerical", "Security",
|
||||
"Research"
|
||||
)
|
||||
|
||||
// Some scary sounds.
|
||||
|
||||
@@ -2,10 +2,12 @@
|
||||
//Limited use.
|
||||
/obj/item/weapon/gripper
|
||||
name = "magnetic gripper"
|
||||
desc = "A simple grasping tool for synthetic assets."
|
||||
desc = "A simple grasping tool specialized in construction and engineering work."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "gripper"
|
||||
|
||||
flags = NOBLUDGEON
|
||||
|
||||
//Has a list of items that it can hold.
|
||||
var/list/can_hold = list(
|
||||
/obj/item/weapon/cell,
|
||||
@@ -28,8 +30,14 @@
|
||||
|
||||
var/obj/item/wrapped = null // Item currently being held.
|
||||
|
||||
var/force_holder = null //
|
||||
|
||||
// VEEEEERY limited version for mining borgs. Basically only for swapping cells and upgrading the drills.
|
||||
/obj/item/weapon/gripper/miner
|
||||
name = "drill maintenance gripper"
|
||||
desc = "A simple grasping tool for the maintenance of heavy drilling machines."
|
||||
icon_state = "gripper-mining"
|
||||
|
||||
can_hold = list(
|
||||
/obj/item/weapon/cell,
|
||||
/obj/item/weapon/stock_parts
|
||||
@@ -38,14 +46,58 @@
|
||||
/obj/item/weapon/gripper/paperwork
|
||||
name = "paperwork gripper"
|
||||
desc = "A simple grasping tool for clerical work."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "gripper"
|
||||
|
||||
can_hold = list(
|
||||
/obj/item/weapon/clipboard,
|
||||
/obj/item/weapon/paper,
|
||||
/obj/item/weapon/paper_bundle,
|
||||
/obj/item/weapon/card/id
|
||||
/obj/item/weapon/card/id,
|
||||
/obj/item/weapon/book,
|
||||
/obj/item/weapon/newspaper
|
||||
)
|
||||
|
||||
/obj/item/weapon/gripper/research //A general usage gripper, used for toxins/robotics/xenobio/etc
|
||||
name = "scientific gripper"
|
||||
icon_state = "gripper-sci"
|
||||
desc = "A simple grasping tool suited to assist in a wide array of research applications."
|
||||
|
||||
can_hold = list(
|
||||
/obj/item/weapon/cell,
|
||||
/obj/item/weapon/stock_parts,
|
||||
/obj/item/device/mmi,
|
||||
/obj/item/robot_parts,
|
||||
/obj/item/borg/upgrade,
|
||||
/obj/item/device/flash, //to build borgs
|
||||
/obj/item/organ/brain, //to insert into MMIs.
|
||||
/obj/item/stack/cable_coil, //again, for borg building
|
||||
/obj/item/weapon/circuitboard,
|
||||
/obj/item/slime_extract,
|
||||
/obj/item/weapon/reagent_containers/glass,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/monkeycube
|
||||
|
||||
)
|
||||
|
||||
/obj/item/weapon/gripper/service //Used to handle food, drinks, and seeds.
|
||||
name = "service gripper"
|
||||
icon_state = "gripper"
|
||||
desc = "A simple grasping tool used to perform tasks in the service sector, such as handling food, drinks, and seeds."
|
||||
|
||||
can_hold = list(
|
||||
/obj/item/weapon/reagent_containers/glass,
|
||||
/obj/item/weapon/reagent_containers/food,
|
||||
/obj/item/seeds,
|
||||
/obj/item/weapon/grown
|
||||
)
|
||||
|
||||
/obj/item/weapon/gripper/no_use //Used when you want to hold and put items in other things, but not able to 'use' the item
|
||||
|
||||
/obj/item/weapon/gripper/no_use/loader //This is used to disallow building with metal.
|
||||
name = "sheet loader"
|
||||
desc = "A specialized loading device, designed to pick up and insert sheets of materials inside machines."
|
||||
icon_state = "gripper-sheet"
|
||||
|
||||
can_hold = list(
|
||||
/obj/item/stack/sheet
|
||||
)
|
||||
|
||||
/obj/item/weapon/gripper/attack_self(mob/user as mob)
|
||||
@@ -53,6 +105,9 @@
|
||||
return wrapped.attack_self(user)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gripper/no_use/attack_self(mob/user as mob)
|
||||
return
|
||||
|
||||
/obj/item/weapon/gripper/verb/drop_item()
|
||||
|
||||
set name = "Drop Item"
|
||||
@@ -75,7 +130,12 @@
|
||||
//update_icon()
|
||||
|
||||
/obj/item/weapon/gripper/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
return (wrapped ? wrapped.attack(M,user) : 0)
|
||||
if(wrapped) //The force of the wrapped obj gets set to zero during the attack() and afterattack().
|
||||
force_holder = wrapped.force
|
||||
wrapped.force = 0.0
|
||||
wrapped.attack(M,user)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/gripper/afterattack(var/atom/target, var/mob/living/user, proximity, params)
|
||||
|
||||
@@ -97,6 +157,9 @@
|
||||
if(!resolved && wrapped && target)
|
||||
wrapped.afterattack(target,user,1)
|
||||
|
||||
//wrapped's force was set to zero. This resets it to the value it had before.
|
||||
wrapped.force = force_holder
|
||||
force_holder = null
|
||||
//If wrapped was neither deleted nor put into target, put it back into the gripper.
|
||||
if(wrapped && user && (wrapped.loc == user))
|
||||
wrapped.loc = src
|
||||
@@ -145,6 +208,21 @@
|
||||
|
||||
user.visible_message("<span class='danger'>[user] removes the power cell from [A]!</span>", "You remove the power cell.")
|
||||
|
||||
else if(istype(target,/mob/living/silicon/robot))
|
||||
var/mob/living/silicon/robot/A = target
|
||||
if(A.opened)
|
||||
if(A.cell)
|
||||
|
||||
wrapped = A.cell
|
||||
|
||||
A.cell.add_fingerprint(user)
|
||||
A.cell.updateicon()
|
||||
A.updateicon()
|
||||
A.cell.loc = src
|
||||
A.cell = null
|
||||
|
||||
user.visible_message("<span class='danger'>[user] removes the power cell from [A]!</span>", "You remove the power cell.")
|
||||
|
||||
//TODO: Matter decompiler.
|
||||
/obj/item/weapon/matter_decompiler
|
||||
|
||||
|
||||
@@ -265,7 +265,8 @@
|
||||
module_sprites["Bro"] = "Brobot"
|
||||
module_sprites["Rich"] = "maximillion"
|
||||
module_sprites["Default"] = "Service2"
|
||||
module_sprites["Drone"] = "drone-service" // How does this even work...? Oh well.
|
||||
module_sprites["Drone - Service"] = "drone-service"
|
||||
module_sprites["Drone - Hydro"] = "drone-hydro"
|
||||
|
||||
if("Clerical")
|
||||
module = new /obj/item/weapon/robot_module/clerical(src)
|
||||
@@ -277,6 +278,12 @@
|
||||
module_sprites["Default"] = "Service2"
|
||||
module_sprites["Drone"] = "drone-service"
|
||||
|
||||
if("Research")
|
||||
module = new /obj/item/weapon/robot_module/research(src)
|
||||
module.channels = list("Science" = 1)
|
||||
module_sprites["Droid"] = "droid-science"
|
||||
module_sprites["Drone"] = "drone-science"
|
||||
|
||||
if("Miner")
|
||||
module = new /obj/item/weapon/robot_module/miner(src)
|
||||
module.channels = list("Supply" = 1)
|
||||
@@ -296,7 +303,8 @@
|
||||
module_sprites["Standard"] = "surgeon"
|
||||
module_sprites["Advanced Droid"] = "droid-medical"
|
||||
module_sprites["Needles"] = "medicalrobot"
|
||||
module_sprites["Drone" ] = "drone-medical"
|
||||
module_sprites["Drone - Medical" ] = "drone-medical"
|
||||
module_sprites["Drone - Chemistry" ] = "drone-chemistry"
|
||||
|
||||
if("Surgeon")
|
||||
module = new /obj/item/weapon/robot_module/surgeon(src)
|
||||
@@ -731,7 +739,7 @@
|
||||
else
|
||||
user << "Unable to locate a radio."
|
||||
|
||||
else if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)) // trying to unlock the interface with an ID card
|
||||
else if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)||istype(W, /obj/item/weapon/card/robot)) // trying to unlock the interface with an ID card
|
||||
if(emagged)//still allow them to open the cover
|
||||
user << "The interface seems slightly damaged"
|
||||
if(opened)
|
||||
@@ -868,6 +876,10 @@
|
||||
//if they are holding or wearing a card that has access, that works
|
||||
if(check_access(H.get_active_hand()) || check_access(H.wear_id))
|
||||
return 1
|
||||
else if(istype(M, /mob/living/silicon/robot))
|
||||
var/mob/living/silicon/robot/R = M
|
||||
if(check_access(R.get_active_hand()) || istype(R.get_active_hand(), /obj/item/weapon/card/robot))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/mob/living/silicon/robot/proc/check_access(obj/item/weapon/card/id/I)
|
||||
|
||||
@@ -1,3 +1,138 @@
|
||||
//A portable analyzer, for research borgs. This is better then giving them a gripper which can hold anything and letting them use the normal analyzer.
|
||||
/obj/item/weapon/portable_destructive_analyzer
|
||||
name = "Portable Destructive Analyzer"
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "portable_analyzer"
|
||||
desc = "Similar to the stationary version, this rather unwieldy device allows you to break down objects in the name of science."
|
||||
|
||||
var/min_reliability = 90 //Can't upgrade, call it laziness or a drawback
|
||||
|
||||
var/datum/research/techonly/files //The device uses the same datum structure as the R&D computer/server.
|
||||
//This analyzer can only store tech levels, however.
|
||||
|
||||
var/obj/item/weapon/loaded_item //What is currently inside the analyzer.
|
||||
|
||||
/obj/item/weapon/portable_destructive_analyzer/New()
|
||||
..()
|
||||
files = new /datum/research/techonly(src) //Setup the research data holder.
|
||||
|
||||
/obj/item/weapon/portable_destructive_analyzer/attack_self(user as mob)
|
||||
var/response = alert(user, "Analyzing the item inside will *DESTROY* the item for good.\n\
|
||||
Syncing to the research server will send the data that is stored inside to research.\n\
|
||||
Ejecting will place the loaded item onto the floor.",
|
||||
"What would you like to do?", "Analyze", "Sync", "Eject")
|
||||
if(response == "Analyze")
|
||||
if(loaded_item)
|
||||
var/confirm = alert(user, "This will destroy the item inside forever. Are you sure?","Confirm Analyze","Yes","No")
|
||||
if(confirm == "Yes") //This is pretty copypasta-y
|
||||
user << "You activate the analyzer's microlaser, analyzing \the [loaded_item] and breaking it down."
|
||||
flick("portable_analyzer_scan", src)
|
||||
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
if(loaded_item.reliability >= min_reliability)
|
||||
var/list/temp_tech = ConvertReqString2List(loaded_item.origin_tech)
|
||||
for(var/T in temp_tech)
|
||||
files.UpdateTech(T, temp_tech[T])
|
||||
user << "\The [loaded_item] had level [temp_tech[T]] in [T]."
|
||||
loaded_item = null
|
||||
for(var/obj/I in contents)
|
||||
for(var/mob/M in I.contents)
|
||||
M.death()
|
||||
if(istype(I,/obj/item/stack/sheet))//Only deconsturcts one sheet at a time instead of the entire stack
|
||||
var/obj/item/stack/sheet/S = I
|
||||
if(S.get_amount() > 1)
|
||||
S.use(1)
|
||||
loaded_item = S
|
||||
else
|
||||
del(S)
|
||||
desc = initial(desc)
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
del(I)
|
||||
desc = initial(desc)
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
return
|
||||
else
|
||||
user << "The [src] is empty. Put something inside it first."
|
||||
if(response == "Sync")
|
||||
var/success = 0
|
||||
for(var/obj/machinery/r_n_d/server/S in machines)
|
||||
if(S.disabled)
|
||||
continue
|
||||
for(var/datum/tech/T in files.known_tech) //Uploading
|
||||
S.files.AddTech2Known(T)
|
||||
for(var/datum/tech/T in S.files.known_tech) //Downloading
|
||||
files.AddTech2Known(T)
|
||||
success = 1
|
||||
files.RefreshResearch()
|
||||
if(success)
|
||||
user << "You connect to the research server, push your data upstream to it, then pull the resulting merged data from the master branch."
|
||||
playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
else
|
||||
user << "Reserch server ping response timed out. Unable to connect. Please contact the system administrator."
|
||||
playsound(src.loc, 'sound/machines/buzz-two.ogg', 50, 1)
|
||||
if(response == "Eject")
|
||||
if(loaded_item)
|
||||
loaded_item.loc = get_turf(src)
|
||||
desc = initial(desc)
|
||||
icon_state = initial(icon_state)
|
||||
loaded_item = null
|
||||
else
|
||||
user << "The [src] is already empty."
|
||||
|
||||
|
||||
/obj/item/weapon/portable_destructive_analyzer/afterattack(var/atom/target, var/mob/living/user, proximity)
|
||||
if(!target)
|
||||
return
|
||||
if(!proximity)
|
||||
return
|
||||
if(!isturf(target.loc)) // Don't load up stuff if it's inside a container or mob!
|
||||
return
|
||||
if(istype(target,/obj/item))
|
||||
if(loaded_item)
|
||||
user << "Your [src] already has something inside. Analyze or eject it first."
|
||||
return
|
||||
var/obj/item/I = target
|
||||
I.loc = src
|
||||
loaded_item = I
|
||||
for(var/mob/M in viewers())
|
||||
M.show_message(text("<span class='notice'>[user] adds the [I] to the [src].</span>"), 1)
|
||||
desc = initial(desc) + "<br>It is holding \the [loaded_item]."
|
||||
flick("portable_analyzer_load", src)
|
||||
icon_state = "portable_analyzer_full"
|
||||
|
||||
//This is used to unlock other borg covers.
|
||||
/obj/item/weapon/card/robot //This is not a child of id cards, as to avoid dumb typechecks on computers.
|
||||
name = "access code transmission device"
|
||||
icon_state = "id-robot"
|
||||
desc = "A circuit grafted onto the bottom of an ID card. It is used to transmit access codes into other robot chassis, \
|
||||
allowing you to lock and unlock other robots' panels."
|
||||
|
||||
/obj/item/weapon/card/id/robot/attack_self() //override so borgs can't flash their IDs.
|
||||
return
|
||||
|
||||
/obj/item/weapon/card/id/robot/read()
|
||||
usr << "The ID card does not appear to have any writing on it."
|
||||
return
|
||||
|
||||
//A harvest item for serviceborgs.
|
||||
/obj/item/weapon/robot_harvester
|
||||
name = "auto harvester"
|
||||
desc = "A hand-held harvest tool that resembles a sickle. It uses energy to cut plant matter very efficently."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "autoharvester"
|
||||
|
||||
/obj/item/weapon/robot_harvester/afterattack(var/atom/target, var/mob/living/user, proximity)
|
||||
if(!target)
|
||||
return
|
||||
if(!proximity)
|
||||
return
|
||||
if(istype(target,/obj/machinery/portable_atmospherics/hydroponics))
|
||||
var/obj/machinery/portable_atmospherics/hydroponics/T = target
|
||||
T.harvest(user)
|
||||
else
|
||||
user << "Harvesting \a [target] is not the purpose of this tool. The [src] is for plants being grown."
|
||||
|
||||
// A special tray for the service droid. Allow droid to pick up and drop items as if they were using the tray normally
|
||||
// Click on table to unload, click on item to load. Otherwise works identically to a tray.
|
||||
// Unlike the base item "tray", robotrays ONLY pick up food, drinks and condiments.
|
||||
|
||||
@@ -314,8 +314,13 @@
|
||||
/obj/item/weapon/robot_module/butler/New()
|
||||
..()
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/food/drinks/cans/beer(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/food/condiment/enzyme(src)
|
||||
src.modules += new /obj/item/weapon/gripper/service(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/glass/bucket(src)
|
||||
src.modules += new /obj/item/weapon/minihoe(src)
|
||||
src.modules += new /obj/item/weapon/hatchet(src)
|
||||
src.modules += new /obj/item/device/analyzer/plant_analyzer(src)
|
||||
src.modules += new /obj/item/weapon/storage/bag/plants(src)
|
||||
src.modules += new /obj/item/weapon/robot_harvester(src)
|
||||
|
||||
var/obj/item/weapon/rsf/M = new /obj/item/weapon/rsf(src)
|
||||
M.stored_matter = 30
|
||||
@@ -358,6 +363,7 @@
|
||||
src.modules += new /obj/item/weapon/pen/robopen(src)
|
||||
src.modules += new /obj/item/weapon/form_printer(src)
|
||||
src.modules += new /obj/item/weapon/gripper/paperwork(src)
|
||||
src.modules += new /obj/item/weapon/hand_labeler(src)
|
||||
src.emag = new /obj/item/weapon/stamp/denied(src)
|
||||
|
||||
/obj/item/weapon/robot_module/clerical/add_languages(var/mob/living/silicon/robot/R)
|
||||
@@ -395,6 +401,38 @@
|
||||
src.emag = new /obj/item/weapon/pickaxe/plasmacutter(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/robot_module/research
|
||||
name = "research module"
|
||||
|
||||
/obj/item/weapon/robot_module/research/New()
|
||||
..()
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
src.modules += new /obj/item/weapon/portable_destructive_analyzer(src)
|
||||
src.modules += new /obj/item/weapon/gripper/research(src)
|
||||
src.modules += new /obj/item/weapon/gripper/no_use/loader(src)
|
||||
src.modules += new /obj/item/device/robotanalyzer(src)
|
||||
src.modules += new /obj/item/weapon/card/robot(src)
|
||||
src.modules += new /obj/item/weapon/wrench(src)
|
||||
src.modules += new /obj/item/weapon/screwdriver(src)
|
||||
src.modules += new /obj/item/weapon/crowbar(src)
|
||||
src.modules += new /obj/item/weapon/scalpel(src)
|
||||
src.modules += new /obj/item/weapon/circular_saw(src)
|
||||
src.modules += new /obj/item/weapon/extinguisher/mini(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/syringe(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/glass/beaker/large(src)
|
||||
src.emag = new /obj/item/weapon/hand_tele(src)
|
||||
|
||||
var/datum/matter_synth/nanite = new /datum/matter_synth/nanite(10000)
|
||||
synths += nanite
|
||||
|
||||
var/obj/item/stack/nanopaste/N = new /obj/item/stack/nanopaste(src)
|
||||
N.uses_charge = 1
|
||||
N.charge_costs = list(1000)
|
||||
N.synths = list(nanite)
|
||||
src.modules += N
|
||||
|
||||
return
|
||||
|
||||
/obj/item/weapon/robot_module/syndicate
|
||||
name = "illegal robot module"
|
||||
|
||||
|
||||
@@ -104,14 +104,17 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
|
||||
return 1
|
||||
if(O.is_open_container())
|
||||
return 0
|
||||
if(!istype(O, /obj/item/stack/sheet/glass) && !istype(O, /obj/item/stack/sheet/mineral/gold) && !istype(O, /obj/item/stack/sheet/mineral/diamond) && !istype(O, /obj/item/stack/sheet/mineral/uranium))
|
||||
user << "<span class='notice'>You cannot insert this item into \the [src]!</span>"
|
||||
return 1
|
||||
// if(!istype(O, /obj/item/stack/sheet/glass) && !istype(O, /obj/item/stack/sheet/mineral/gold) && !istype(O, /obj/item/stack/sheet/mineral/diamond) && !istype(O, /obj/item/stack/sheet/mineral/uranium))
|
||||
// user << "<span class='notice'>You cannot insert this item into \the [src]!</span>"
|
||||
// return 1
|
||||
if(stat)
|
||||
return 1
|
||||
if(busy)
|
||||
user << "<span class='notice'>\The [src] is busy. Please wait for completion of previous operation.</span>"
|
||||
return 1
|
||||
|
||||
if(istype(O, /obj/item/stack/sheet/glass) || istype(O, /obj/item/stack/sheet/mineral/gold) || istype(O, /obj/item/stack/sheet/mineral/diamond) || istype(O, /obj/item/stack/sheet/mineral/uranium))
|
||||
|
||||
var/obj/item/stack/sheet/stack = O
|
||||
if((TotalMaterials() + stack.perunit) > max_material_amount)
|
||||
user << "<span class='notice'>\The [src] is full. Please remove glass from \the [src] in order to insert more.</span>"
|
||||
@@ -145,6 +148,8 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
|
||||
busy = 0
|
||||
updateUsrDialog()
|
||||
|
||||
..()
|
||||
|
||||
//This is to stop these machines being hackable via clicking.
|
||||
/obj/machinery/r_n_d/circuit_imprinter/attack_hand(mob/user as mob)
|
||||
return
|
||||
@@ -38,12 +38,6 @@ Note: Must be placed within 3 tiles of the R&D Console
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/machinery/r_n_d/destructive_analyzer/proc/ConvertReqString2List(var/list/source_list)
|
||||
var/list/temp_list = params2list(source_list)
|
||||
for(var/O in temp_list)
|
||||
temp_list[O] = text2num(temp_list[O])
|
||||
return temp_list
|
||||
|
||||
/obj/machinery/r_n_d/destructive_analyzer/update_icon()
|
||||
if(panel_open)
|
||||
icon_state = "d_analyzer_t"
|
||||
|
||||
@@ -116,9 +116,6 @@ Note: Must be placed west/left of and R&D console to function.
|
||||
if(busy)
|
||||
user << "<span class='notice'>\The [src] is busy. Please wait for completion of previous operation.</span>"
|
||||
return 1
|
||||
if(!istype(O, /obj/item/stack/sheet))
|
||||
user << "<span class='notice'>You cannot insert this item into \the [src]!</span>"
|
||||
return 1
|
||||
if(stat)
|
||||
return 1
|
||||
if(istype(O,/obj/item/stack/sheet))
|
||||
@@ -172,6 +169,7 @@ Note: Must be placed west/left of and R&D console to function.
|
||||
busy = 0
|
||||
updateUsrDialog()
|
||||
return
|
||||
..()
|
||||
|
||||
//This is to stop these machines being hackable via clicking.
|
||||
/obj/machinery/r_n_d/protolathe/attack_hand(mob/user as mob)
|
||||
|
||||
@@ -256,7 +256,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
screen = 1.0
|
||||
return
|
||||
if(linked_destroy.loaded_item.reliability >= linked_destroy.min_reliability)
|
||||
var/list/temp_tech = linked_destroy.ConvertReqString2List(linked_destroy.loaded_item.origin_tech)
|
||||
var/list/temp_tech = ConvertReqString2List(linked_destroy.loaded_item.origin_tech)
|
||||
for(var/T in temp_tech)
|
||||
files.UpdateTech(T, temp_tech[T])
|
||||
if(linked_destroy.loaded_item.reliability < 100 && linked_destroy.loaded_item.crit_fail)
|
||||
@@ -753,7 +753,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
dat += "Name: [linked_destroy.loaded_item.name]<BR>"
|
||||
dat += "Origin Tech:"
|
||||
dat += "<UL>"
|
||||
var/list/temp_tech = linked_destroy.ConvertReqString2List(linked_destroy.loaded_item.origin_tech)
|
||||
var/list/temp_tech = ConvertReqString2List(linked_destroy.loaded_item.origin_tech)
|
||||
for(var/T in temp_tech)
|
||||
dat += "<LI>[CallTechName(T)] [temp_tech[T]]"
|
||||
for(var/datum/tech/F in files.known_tech)
|
||||
|
||||
@@ -59,6 +59,12 @@ research holder datum.
|
||||
possible_designs += new D(src)
|
||||
RefreshResearch()
|
||||
|
||||
/datum/research/techonly
|
||||
|
||||
/datum/research/techonly/New()
|
||||
for(var/T in typesof(/datum/tech) - /datum/tech)
|
||||
possible_tech += new T(src)
|
||||
RefreshResearch()
|
||||
|
||||
|
||||
//Checks to see if tech has all the required pre-reqs.
|
||||
|
||||
|
Before Width: | Height: | Size: 152 KiB After Width: | Height: | Size: 161 KiB |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 26 KiB |