From a9bfaf417371abbd78160dcc68afa0d7f2185803 Mon Sep 17 00:00:00 2001 From: Erthilo Date: Sat, 23 Jun 2012 16:21:44 +0100 Subject: [PATCH] TG: - Added basic heavy-duty cables, they cannot be destroyed with wirecutters, unfortunately they currently cannot be created either. Not present anywhere on the map yet. - Fixed a bug with masks, which did not follow the equipment rules of the SLOT_MASK flag. - Fixed a problem where monkeys could not equip a backpack. Revision: r3774 Author: baloh.matevz TG: - Added the heavy cable sprites, sprited by Thunder11. Revision: r3775 Author: baloh.matevz --- baystation12.dme | 1 + code/modules/mob/living/carbon/human/human.dm | 2 +- code/modules/mob/mob.dm | 11 +++++-- code/modules/power/cable_heavyduty.dm | 27 ++++++++++++++++++ icons/obj/power_cond_heavy.dmi | Bin 0 -> 1019 bytes 5 files changed, 37 insertions(+), 4 deletions(-) create mode 100644 code/modules/power/cable_heavyduty.dm create mode 100644 icons/obj/power_cond_heavy.dmi diff --git a/baystation12.dme b/baystation12.dme index 1453fd6be2d..708ae6033c4 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -1076,6 +1076,7 @@ #include "code\modules\mob\simple_animal\worm.dm" #include "code\modules\power\apc.dm" #include "code\modules\power\cable.dm" +#include "code\modules\power\cable_heavyduty.dm" #include "code\modules\power\cell.dm" #include "code\modules\power\engine.dm" #include "code\modules\power\generator.dm" diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 69558e18fb5..31f7e391cfa 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -547,7 +547,7 @@ if (emptyHand) wear_mask.DblClick() return - if (!( istype(W, /obj/item/clothing/mask) )) + if (!( W.slot_flags & SLOT_MASK )) return u_equip(W) wear_mask = W diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index aabe19c9e90..17e4acdde25 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -90,15 +90,20 @@ if("mask") if (wear_mask) return - if (!( istype(W, /obj/item/clothing/mask) )) + if (!( W.slot_flags & SLOT_MASK )) return u_equip(W) wear_mask = W W.equipped(src, text) if("back") - if ((back || !( istype(W, /obj/item/weapon) ))) + if (back) return - if (!( W.flags & 1 )) + if (!istype(W, /obj/item)) + return + if (!( W.slot_flags & SLOT_BACK )) + return + if(istype(W,/obj/item/weapon/twohanded) && W:wielded) + usr << "Unwield the [initial(W.name)] first!" return u_equip(W) back = W diff --git a/code/modules/power/cable_heavyduty.dm b/code/modules/power/cable_heavyduty.dm new file mode 100644 index 00000000000..b23d164b214 --- /dev/null +++ b/code/modules/power/cable_heavyduty.dm @@ -0,0 +1,27 @@ +/obj/item/weapon/cable_coil/heavyduty + name = "heavy cable coil" + icon = 'power.dmi' + icon_state = "wire" + +/obj/structure/cable/heavyduty + icon = 'power_cond_heavy.dmi' + name = "large power cable" + desc = "This cable is tough. It cannot be cut with simple hand tools." + +/obj/structure/cable/heavyduty/attackby(obj/item/W, mob/user) + + var/turf/T = src.loc + if(T.intact) + return + + if(istype(W, /obj/item/weapon/wirecutters)) + usr << "\blue These cables are too tough to be cut with those [W.name]." + return + else if(istype(W, /obj/item/weapon/cable_coil)) + usr << "\blue You will need heavier cables to connect to these." + return + else + ..() + +/obj/structure/cable/heavyduty/cableColor(var/colorC) + return \ No newline at end of file diff --git a/icons/obj/power_cond_heavy.dmi b/icons/obj/power_cond_heavy.dmi new file mode 100644 index 0000000000000000000000000000000000000000..69b9ef085b1f5f85760cb185f886c10557134ac1 GIT binary patch literal 1019 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H3?#oinD`S&83*`;xE?rgz{<+%KLf)|1_muH zEgv5rJw3hr{CqVvwTOraKR-Wnb8}+`1{)h29UUD50|TJ?rJE9LfZ7>Lg8YIR9G=}s z19E0mg+!FNq!uR^WfqiV=I1dmRLltuD<~@c{w28JxPG2 zJSDuH0m&{cQo>4CA_PK`Jz8ShTyCTSDL0oHKygd8BR{(}!iBTNCYn78TfXMOtLIF9 z;SA@z=D1Bekj2ixz;wye#WAE}&fD1+tC|dWS~Xo$t+s!!znv(`rTSIn(gi+?yTg zJ|auso^i{`X}1<$FpLJW8=0mhykG8M$#~+uLPJ$OgX)LO`UTHRnt#ZtIefP7xnEq> z`$JCM;S-Q)Jj*rXs7J%2dWrq%Tci%EYByT`Km5aX`Ry&7Jb(Bff1k51pfNp0q<)v1 zr?$fz#$8N{O}(~pDpxmj+%MkcT5}$v_4yaJkG6gdPwMMxPQ2G(eEW~VE1~t@fo}&F z|6t*2IN$t#vpz5g4+f?FXWyhAa6rw@&V3VDiq!+cPBpl!!Y~(-ur8qF8^e}V5e3$ z*xMg?R((_M!Ffz`elmRh$*2Ot$Nt{>TUYUaV#7CY^@{!9vdt^%zp-#dH0_<=w08fD zBU%rhele5>hVZvKE+h2?|Na7Xz2`sjPw(u1`7i7O|J_9%)>qaue5!X5{5SnOyTX5W zZHG_$_t-Q1w2x!#`v3GVf3c{-&-i=t z4S(bVTOg`EUfq{>h`J^3VIbeIj{+~>AL3S49tNH Mp00i_>zopr0Bnieb^rhX literal 0 HcmV?d00001