Port Integrated Electronics from Polaris (#3371)

Ports Polaris' integrated electronics system, whichallows for Roboticists & Electricians/Engineers to build custom devices and machines for a variety of purposes.
This commit is contained in:
Lohikar
2017-09-12 21:41:39 -05:00
committed by GitHub
parent ee2c01c1ec
commit e28c29a551
77 changed files with 5240 additions and 43 deletions
@@ -58,6 +58,18 @@
implants -= src
return ..()
/obj/item/weapon/implant/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/weapon/implanter))
var/obj/item/weapon/implanter/implanter = I
if(implanter.imp)
return // It's full.
user.drop_from_inventory(src)
forceMove(implanter)
implanter.imp = src
implanter.update()
else
..()
/obj/item/weapon/implant/tracking
name = "tracking implant"
desc = "Track with this."
@@ -0,0 +1,48 @@
/obj/item/weapon/implant/integrated_circuit
name = "electronic implant"
desc = "It's a case, for building very tiny electronics with."
icon = 'icons/obj/electronic_assemblies.dmi'
icon_state = "setup_implant"
var/obj/item/device/electronic_assembly/implant/IC = null
/obj/item/weapon/implant/integrated_circuit/islegal()
return TRUE
/obj/item/weapon/implant/integrated_circuit/Initialize()
..()
IC = new(src)
IC.implant = src
/obj/item/weapon/implant/integrated_circuit/Destroy()
IC.implant = null
qdel(IC)
return ..()
/obj/item/weapon/implant/integrated_circuit/get_data()
var/dat = {"
<b>Implant Specifications:</b><BR>
<b>Name:</b> Modular Implant<BR>
<b>Life:</b> 3 years.<BR>
<b>Important Notes: EMP can cause malfunctions in the internal electronics of this implant.</B><BR>
<HR>
<b>Implant Details:</b><BR>
<b>Function:</b> Contains no innate functions until other components are added.<BR>
<b>Special Features:</b>
<i>Modular Circuitry</i>- Can be loaded with specific modular circuitry in order to fulfill a wide possibility of functions.<BR>
<b>Integrity:</b> Implant is not shielded from electromagnetic interference, otherwise it is independant of subject's status."}
return dat
/obj/item/weapon/implant/integrated_circuit/emp_act(severity)
IC.emp_act(severity)
/obj/item/weapon/implant/integrated_circuit/examine(mob/user)
IC.examine(user)
/obj/item/weapon/implant/integrated_circuit/attackby(var/obj/item/O, var/mob/user)
if(istype(O, /obj/item/weapon/crowbar) || istype(O, /obj/item/device/integrated_electronics) || istype(O, /obj/item/integrated_circuit) || istype(O, /obj/item/weapon/screwdriver) || istype(O, /obj/item/weapon/cell/device) )
IC.attackby(O, user)
else
..()
/obj/item/weapon/implant/integrated_circuit/attack_self(mob/user)
IC.attack_self(user)
@@ -322,7 +322,7 @@
usr << "<span class='notice'>[src] cannot hold \the [W].</span>"
return 0
var/max_instances = can_hold[W.type]
if(max_instances && instances_of_type_in_list(W, contents) >= max_instances)
if(max_instances && instances_of_type_in_list(W, contents, TRUE) >= max_instances)
if(!stop_messages && !istype(W, /obj/item/weapon/hand_labeler))
usr << "<span class='notice'>[src] has no more space specifically for \the [W].</span>"
return 0
@@ -450,3 +450,5 @@
BD.unwrap()
open()
/obj/structure/closet/onDropInto(var/atom/movable/AM)
return