Merge pull request #1760 from Markolie/ipcmasterrace

IPC overhaul
This commit is contained in:
TheDZD
2015-08-19 11:57:04 -04:00
90 changed files with 2074 additions and 1208 deletions
+7 -7
View File
@@ -641,16 +641,15 @@
//Synthetic human mob goes here.
if(istype(user,/mob/living/carbon/human))
var/mob/living/carbon/human/H = user
if(H.species.flags & IS_SYNTHETIC && H.a_intent == "grab")
if(!isnull(H.internal_organs_by_name["cell"]) && H.a_intent == "grab")
if(emagged || stat & BROKEN)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
H << "<span class='warning'>The APC power currents surge eratically, damaging your chassis!</span>"
H << "<span class='warning'>The APC power currents surge erratically, damaging your chassis!</span>"
H.adjustFireLoss(10,0)
else if(src.cell && src.cell.charge > 0)
if(H.nutrition < 450)
if(src.cell.charge >= 500)
H.nutrition += 50
src.cell.charge -= 500
@@ -659,14 +658,15 @@
src.cell.charge = 0
user << "<span class='notice'>You slot your fingers into the APC interface and siphon off some of the stored charge for your own use.</span>"
if(src.cell.charge < 0) src.cell.charge = 0
if(H.nutrition > 500) H.nutrition = 500
if(src.cell.charge < 0)
src.cell.charge = 0
if(H.nutrition > 500)
H.nutrition = 500
src.charging = 1
else
user << "<span class='notice'>You are already fully charged.</span>"
else
user << "There is no charge to draw from that APC."
user << "<span class='warning'>There is no charge to draw from that APC.</span>"
return
if(usr == user && opened && (!issilicon(user)))
+15 -17
View File
@@ -496,31 +496,29 @@ obj/structure/cable/proc/cableColor(var/colorC)
///////////////////////////////////
// General procedures
///////////////////////////////////
//you can use wires to heal robotics
/obj/item/stack/cable_coil/attack(mob/M as mob, mob/user as mob)
if(istype(M,/mob/living/carbon/human))
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/S = H.get_organ(user.zone_sel.selecting)
if(!(S.status & ORGAN_ROBOT) || user.a_intent != "help")
var/obj/item/organ/external/S = H.organs_by_name[user.zone_sel.selecting]
if(!S)
return
if(!(S.status & ORGAN_ROBOT) || user.a_intent != "help" || S.open == 2)
return ..()
if(H.species.flags & IS_SYNTHETIC)
if(M == user)
user << "\red You can't repair damage to your own body - it's against OH&S."
return
if(S.burn_dam > 0 && use(1))
S.heal_damage(0,15,0,1)
user.visible_message("\red \The [user] repairs some burn damage on \the [M]'s [S.name] with \the [src].")
return
else
user << "Nothing to fix!"
if(S.burn_dam)
if(S.burn_dam < ROBOLIMB_SELF_REPAIR_CAP)
S.heal_damage(0,15,0,1)
user.visible_message("<span class='alert'>\The [user] repairs some burn damage on \the [M]'s [S.name] with \the [src].</span>")
else if(S.open != 2)
user << "<span class='danger'>The damage is far too severe to patch over externally.</span>"
return 1
else if(S.open != 2)
user << "<span class='notice'>Nothing to fix!</span>"
else
return ..()
/obj/item/stack/cable_coil/update_icon()
if (!color)
color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_ORANGE, COLOR_WHITE, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN)