From 44908503bfb863b0f4b4d296bff8d198a07c5493 Mon Sep 17 00:00:00 2001 From: cebutris Date: Sun, 4 Feb 2018 23:10:21 -0500 Subject: [PATCH] Stunswords! (#5179) * adds in stunswords * inhands! * fixes cell charge text. * adds in the kit and also fuck admin.txt * Fixes some formatting * replaces the placeholder icon with * i hate everything * tries to fix the dme. hopefully. * tries again --- code/game/objects/items/stunbaton.dm | 4 +-- .../code/game/objects/items/stunsword.dm | 31 ++++++++++++++++++ .../icons/mob/inhands/stunsword_left.dmi | Bin 0 -> 367 bytes .../icons/mob/inhands/stunsword_right.dmi | Bin 0 -> 364 bytes modular_citadel/icons/obj/stunsword.dmi | Bin 0 -> 1763 bytes tgstation.dme | 1 + 6 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 modular_citadel/code/game/objects/items/stunsword.dm create mode 100644 modular_citadel/icons/mob/inhands/stunsword_left.dmi create mode 100644 modular_citadel/icons/mob/inhands/stunsword_right.dmi create mode 100644 modular_citadel/icons/obj/stunsword.dmi diff --git a/code/game/objects/items/stunbaton.dm b/code/game/objects/items/stunbaton.dm index bda1714f7b..05599597af 100644 --- a/code/game/objects/items/stunbaton.dm +++ b/code/game/objects/items/stunbaton.dm @@ -63,9 +63,9 @@ /obj/item/melee/baton/examine(mob/user) ..() if(cell) - to_chat(user, "The baton is [round(cell.percent())]% charged.") + to_chat(user, "\The [src] is [round(cell.percent())]% charged.") else - to_chat(user, "The baton does not have a power source installed.") + to_chat(user, "\The [src] does not have a power source installed.") /obj/item/melee/baton/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/stock_parts/cell)) diff --git a/modular_citadel/code/game/objects/items/stunsword.dm b/modular_citadel/code/game/objects/items/stunsword.dm new file mode 100644 index 0000000000..3d541bb139 --- /dev/null +++ b/modular_citadel/code/game/objects/items/stunsword.dm @@ -0,0 +1,31 @@ +/obj/item/melee/baton/stunsword + name = "stunsword" + desc = "not actually sharp, this sword is functionally identical to a stunbaton" + icon = 'modular_citadel/icons/obj/stunsword.dmi' + icon_state = "stunsword" + item_state = "sword" + lefthand_file = 'modular_citadel/icons/mob/inhands/stunsword_left.dmi' + righthand_file = 'modular_citadel/icons/mob/inhands/stunsword_right.dmi' + +/obj/item/device/ssword_kit + name = "stunsword kit" + desc = "a modkit for making a stunbaton into a stunsword" + icon = 'icons/obj/vending_restock.dmi' + icon_state = "refill_donksoft" + var/product = /obj/item/melee/baton/stunsword //what it makes + var/list/fromitem = list(/obj/item/melee/baton, /obj/item/melee/baton/loaded) //what it needs + afterattack(obj/O, mob/user as mob) + if(istype(O, product)) + to_chat(user,"[O] is already modified!") + else if(O.type in fromitem) //makes sure O is the right thing + var/obj/item/melee/baton/B = O + if(!B.cell) //checks for a powercell in the baton. If there isn't one, continue. If there is, warn the user to take it out + new product(usr.loc) //spawns the product + user.visible_message("[user] modifies [O]!","You modify the [O]!") + qdel(O) //Gets rid of the baton + qdel(src) //gets rid of the kit + + else + to_chat(user,"Remove the powercell first!") //We make this check because the stunsword starts without a battery. + else + to_chat(user, " You can't modify [O] with this kit!") \ No newline at end of file diff --git a/modular_citadel/icons/mob/inhands/stunsword_left.dmi b/modular_citadel/icons/mob/inhands/stunsword_left.dmi new file mode 100644 index 0000000000000000000000000000000000000000..68adffaa616d91cf84ca72342f3b27d1c90b52fb GIT binary patch literal 367 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0J3?w7mbKU|e{s5m4*8>L*XliQyZ*bVW|FVOF zgRhysAW(|2B*-tA!Qt7BG$1FdDkP%BCAB!YD6^m>Ge3`kp<+&OSV2+g_bgE*^OMvuR4MTI$BW6#6!V10?GfHza*tkpChUB-o0&Sh)>EamT(fM{tAXkHefQzVA zgPZsVu7`|o{!QoNEEG?_yJX*~pC`-Or?VIz`{NStBlODw-^|5*aSDpp0sy= zvAyAc5|3b#t@H7DA}%4{+?WNrGh%NfXL(H*Keb3heS`FbJ#UVFxm7A~-OFtXLw9Q6 z4WUKnTBAdZ^tie91?k!Z{H+6FS*q_9q@oyq8qqe(Qi|COwm!eLU7`9 z8H|s(nYB#gPM9RCn82VGIEhiqqT!gke^4_p?2hf>=cw>div+rn!PC{xWt~$(69C`( BcbotK literal 0 HcmV?d00001 diff --git a/modular_citadel/icons/obj/stunsword.dmi b/modular_citadel/icons/obj/stunsword.dmi new file mode 100644 index 0000000000000000000000000000000000000000..bfe4b45cd94ff292145c32b2cc00cd855a24c034 GIT binary patch literal 1763 zcmV<91|0c`P)V=-0C=30i@gfMFc?MWd{1#{SCQ7AF^i-~hV~UCG@mBWCXmDy-`=5{;vi?a z2kxnH>8^T!>NPE#vX220r+q_W^|m-j91kQM`-dx=_wyFw$kX&kV8-GX{t+}JEKlYIiSw@gglcqyg6cKB0esa#GG1StivR!y2}wjj zRCt{2oiT6QMij?Sg|!&!;zdi~jM}0hKoP(LnW0NN6zE6jQfT2+cqTe>^kQVmM=+2f zJ2?c%k|EvH#c-j;izY#f3ot`+!s&7p@5p=a9eM9R*$R*!dH3$#BX$4hNm-VH6|c^y zFCYdbSLvnxS@og(F9beX0AyKK%b#yd(Jl zV4#BHCs*lZa+O{#U%q$pe0A`3KKA6>^1bf>dcj4t^0E2)%2W9i zE8mvyH2_Qn7v;8(#XnVWQEvM-d~X53Ie!>AUze8}fOGzEa=xzKI{@eWVdZ>Xy#j!9 zK3>jGlJzV})-&Jy&H=zVA3x_;)nezH->C-RoR6RLlVm*;|NnX6oA0~>aL%X6`Re5R zf>P-wFW?*=k;c@5%>4^N1t^C+De`L&1NI6udgTSzd`d=mVW=Q ze@-8;CjS&aN!GKfTI{N7vFrN(pA3LJ&+F}WE1sU7#O>`Z+Nx70Kg+V3YQ2xYE_(IU$ zKQ{ln07%ocetdi++xE(`oUB%>qshm-4(j{I<{KXa(=@HivOI#z*RL4cpX95PPr+9| z8!I2=OrQ^8ul!gQYyhxugyIZhg)0t#$i)E=xi|nK7m7VRWPg0@e6;=mq59)v=Ys}- z=>Q|9nBUF^s{w}MkB^-X5&%Q;$H&h19soo4$_ zx%rs+NwS`i_6NZB%GqvvQ2g(%hnTOMMqK#49|L2`xd)~ifDMCB;TY=T8|YO7P~}{i z_o#C2;THg}p3}7$?*HwpsgrNOItAzzCq>Sq<_q!lByLqLcKXW0;!CObuku|@Bh~?+ z9zmwcc~!O8=`LC7oG(|LoCJ!rXX1;qH&(A5TWf&6&zauUGw1bH)8zZKYuWM}U-EpL zd^vZg`~yxkK#0%TRD<8dmxJ%av|+<<8h`cuz$w|+01Y{3XgSXZU#&SzlP`q%Egb~E z@A$W-0O?Fk-ihZF+n&ys5#O}(u=uBTKHJp?#TUYU2eRG)q(2=y=c#=4=1qK`E3S?2 zWALH)E^_Vr%$ z4uenSTWFemEdD9eh?KW4gG`YxMYZy%_9l?{Q-vVmGi+jc@?SoDE$FK z_sUW6A$<#dYcB8o0Zcg$>fE5MR}SjnYKUG*SAORd;Nq3ThE;qkaHgMkLBDS0DIeG zJ}lq52Keev-{ZgDWj-k1xj(?z{PD5#o%;if%^x2--%Ec0NHIU~{s53-{s8&|K#BR> zAAtGXAAtGLJnjz=IiLFjL@qXmMlKG3$i)E=xi|nK*B2FebLSn@n*aa+002ovPDHLk FV1g;KhGYN$ literal 0 HcmV?d00001 diff --git a/tgstation.dme b/tgstation.dme index cebe192cc2..08aaf3e9ad 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -2512,6 +2512,7 @@ #include "modular_citadel\code\game\machinery\Sleeper.dm" #include "modular_citadel\code\game\objects\ids.dm" #include "modular_citadel\code\game\objects\items\handcuffs.dm" +#include "modular_citadel\code\game\objects\items\stunsword.dm" #include "modular_citadel\code\game\objects\items\devices\aicard.dm" #include "modular_citadel\code\game\objects\items\devices\PDA\PDA.dm" #include "modular_citadel\code\game\objects\items\devices\radio\shockcollar.dm"