make ipcs cool
This commit is contained in:
@@ -288,3 +288,69 @@
|
||||
var/obj/item/assembly/flash/armimplant/F = new(src)
|
||||
items_list += F
|
||||
F.I = src
|
||||
|
||||
/////////////////
|
||||
|
||||
|
||||
//IPC/Synth Arm//
|
||||
|
||||
|
||||
/////////////////
|
||||
|
||||
/obj/item/organ/cyberimp/arm/power_cord
|
||||
name = "power cord implant"
|
||||
desc = "An internal power cord hooked up to a battery. Useful if you run on volts."
|
||||
contents = newlist(/obj/item/apc_powercord)
|
||||
zone = "l_arm"
|
||||
|
||||
/obj/item/apc_powercord
|
||||
name = "power cord"
|
||||
desc = "An internal power cord hooked up to a battery. Useful if you run on electricity. Not so much otherwise."
|
||||
icon = 'icons/obj/power.dmi'
|
||||
icon_state = "wire1"
|
||||
|
||||
/obj/item/apc_powercord/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
|
||||
if(!istype(target, /obj/machinery/power/apc) || !ishuman(user) || !proximity_flag)
|
||||
return ..()
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
var/obj/machinery/power/apc/A = target
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/obj/item/organ/stomach/ipc/cell = locate(/obj/item/organ/stomach/ipc) in H.internal_organs
|
||||
if(!cell)
|
||||
to_chat(H, "<span class='warning'>You try to siphon energy from the [A], but your power cell is gone!</span>")
|
||||
return
|
||||
|
||||
if(A.cell && A.cell.charge > 0)
|
||||
if(H.nutrition >= NUTRITION_LEVEL_WELL_FED)
|
||||
to_chat(user, "<span class='warning'>You are already fully charged!</span>")
|
||||
return
|
||||
else
|
||||
powerdraw_loop(A, H)
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='warning'>There is no charge to draw from that APC.</span>")
|
||||
|
||||
/obj/item/apc_powercord/proc/powerdraw_loop(obj/machinery/power/apc/A, mob/living/carbon/human/H)
|
||||
H.visible_message("<span class='notice'>[H] inserts a power connector into the [A].</span>", "<span class='notice'>You begin to draw power from the [A].</span>")
|
||||
while(do_after(H, 10, target = A))
|
||||
if(loc != H)
|
||||
to_chat(H, "<span class='warning'>You must keep your connector out while charging!</span>")
|
||||
break
|
||||
if(A.cell.charge == 0)
|
||||
to_chat(H, "<span class='warning'>The [A] doesn't have enough charge to spare.</span>")
|
||||
break
|
||||
A.charging = 1
|
||||
if(A.cell.charge >= 500)
|
||||
do_sparks(1, FALSE, A)
|
||||
H.nutrition += 50
|
||||
A.cell.charge -= 150
|
||||
to_chat(H, "<span class='notice'>You siphon off some of the stored charge for your own use.</span>")
|
||||
else
|
||||
H.nutrition += A.cell.charge/10
|
||||
A.cell.charge = 0
|
||||
to_chat(H, "<span class='notice'>You siphon off as much as the [A] can spare.</span>")
|
||||
break
|
||||
if(H.nutrition > NUTRITION_LEVEL_WELL_FED)
|
||||
to_chat(H, "<span class='notice'>You are now fully charged.</span>")
|
||||
break
|
||||
H.visible_message("<span class='notice'>[H] unplugs from the [A].</span>", "<span class='notice'>You unplug from the [A].</span>")
|
||||
|
||||
@@ -132,3 +132,29 @@
|
||||
if(. & EMP_PROTECT_SELF)
|
||||
return
|
||||
damage += 40/severity
|
||||
|
||||
/obj/item/organ/ears/ipc
|
||||
name = "auditory sensors"
|
||||
icon_state = "ears-c"
|
||||
desc = "A pair of microphones intended to be installed in an IPC head, that grant the ability to hear."
|
||||
zone = BODY_ZONE_HEAD
|
||||
slot = ORGAN_SLOT_EARS
|
||||
gender = PLURAL
|
||||
organ_flags = ORGAN_SYNTHETIC
|
||||
|
||||
/obj/item/organ/ears/ipc/emp_act(severity)
|
||||
. = ..()
|
||||
if(!owner || . & EMP_PROTECT_SELF)
|
||||
return
|
||||
to_chat(owner, "<span class='warning'>Alert: Auditory systems corrupted!.</span>")
|
||||
switch(severity)
|
||||
if(1)
|
||||
owner.Jitter(30)
|
||||
owner.Dizzy(30)
|
||||
owner.DefaultCombatKnockdown(80)
|
||||
deaf = 30
|
||||
|
||||
if(2)
|
||||
owner.Jitter(15)
|
||||
owner.Dizzy(15)
|
||||
owner.DefaultCombatKnockdown(40)
|
||||
|
||||
@@ -394,6 +394,15 @@
|
||||
name = "ipc eyes"
|
||||
icon_state = "cybernetic_eyeballs"
|
||||
|
||||
/obj/item/organ/eyes/ipc/emp_act(severity)
|
||||
. = ..()
|
||||
if(!owner || . & EMP_PROTECT_SELF)
|
||||
return
|
||||
to_chat(owner, "<span class='warning'>Alert: Perception visuals damaged!</span>")
|
||||
owner.flash_act(visual = 1)
|
||||
if(severity == EMP_HEAVY)
|
||||
owner.adjustOrganLoss(ORGAN_SLOT_EYES, 20)
|
||||
|
||||
#undef BLURRY_VISION_ONE
|
||||
#undef BLURRY_VISION_TWO
|
||||
#undef BLIND_VISION_THREE
|
||||
@@ -464,9 +464,20 @@
|
||||
return S
|
||||
|
||||
/obj/item/organ/lungs/ipc
|
||||
name = "ipc lungs"
|
||||
name = "ipc cooling system"
|
||||
icon_state = "lungs-c"
|
||||
|
||||
/obj/item/organ/lungs/ipc/emp_act(severity) //Should probably put it somewhere else later
|
||||
. = ..()
|
||||
if(. & EMP_PROTECT_SELF)
|
||||
return
|
||||
to_chat(owner, "<span class='warning'>Alert: Critical cooling system failure!</span>")
|
||||
switch(severity)
|
||||
if(1)
|
||||
owner.adjust_bodytemperature(100*TEMPERATURE_DAMAGE_COEFFICIENT)
|
||||
if(2)
|
||||
owner.adjust_bodytemperature(30*TEMPERATURE_DAMAGE_COEFFICIENT)
|
||||
|
||||
/obj/item/organ/lungs/plasmaman
|
||||
name = "plasma filter"
|
||||
desc = "A spongy rib-shaped mass for filtering plasma from the air."
|
||||
|
||||
@@ -89,5 +89,17 @@
|
||||
desc = "A strange crystal that is responsible for metabolizing the unseen energy force that feeds plasmamen."
|
||||
|
||||
/obj/item/organ/stomach/ipc
|
||||
name = "ipc stomach"
|
||||
name = "ipc cell"
|
||||
icon_state = "stomach-ipc"
|
||||
|
||||
/obj/item/organ/stomach/ipc/emp_act(severity)
|
||||
. = ..()
|
||||
if(!owner || . & EMP_PROTECT_SELF)
|
||||
return
|
||||
switch(severity)
|
||||
if(1)
|
||||
owner.nutrition = min(owner.nutrition - 50, 0)
|
||||
to_chat(owner, "<span class='warning'>Alert: Detected severe battery discharge!</span>")
|
||||
if(2)
|
||||
owner.nutrition = min(owner.nutrition - 100, 0)
|
||||
to_chat(owner, "<span class='warning'>Alert: Minor battery discharge!</span>")
|
||||
|
||||
Reference in New Issue
Block a user