From 33f2597e56a3c89670f51d555b22c4368aa3b319 Mon Sep 17 00:00:00 2001 From: Michiyamenotehifunana <31995558+Michiyamenotehifunana@users.noreply.github.com> Date: Tue, 24 Oct 2017 19:35:26 +0800 Subject: [PATCH] Adds Non-Eutactic Blades (eswords that look like swords) Includes tator tot version and toy version, made in the autolathe because I suck. They're recolorable. --- code/citadel/cit_weapons.dm | 176 +++++++++++++++++++++++++ code/modules/uplink/uplink_item_cit.dm | 16 ++- icons/mob/citadel/melee_lefthand.dmi | Bin 0 -> 965 bytes icons/mob/citadel/melee_righthand.dmi | Bin 0 -> 977 bytes icons/obj/cit_weapons.dmi | Bin 0 -> 932 bytes tgstation.dme | 1 + 6 files changed, 192 insertions(+), 1 deletion(-) create mode 100644 code/citadel/cit_weapons.dm create mode 100644 icons/mob/citadel/melee_lefthand.dmi create mode 100644 icons/mob/citadel/melee_righthand.dmi create mode 100644 icons/obj/cit_weapons.dmi diff --git a/code/citadel/cit_weapons.dm b/code/citadel/cit_weapons.dm new file mode 100644 index 0000000000..80ff9b3029 --- /dev/null +++ b/code/citadel/cit_weapons.dm @@ -0,0 +1,176 @@ +/obj/item/toy/sword/cx + name = "\improper DX Non-Euplastic LightSword" + desc = "A deluxe toy replica of an energy sword. Realistic visuals and sounds! Ages 8 and up." + icon = 'icons/obj/cit_weapons.dmi' + icon_state = "cxsword_hilt" + item_state = "cxsword" + lefthand_file = 'icons/mob/citadel/melee_lefthand.dmi' + righthand_file = 'icons/mob/citadel/melee_righthand.dmi' + active = FALSE + w_class = WEIGHT_CLASS_SMALL + attack_verb = list("poked", "jabbed", "hit") + light_color = "#37FFF7" + var/light_brightness = 3 + actions_types = list(/datum/action/item_action/pick_color) + +/obj/item/toy/sword/cx/attack_self(mob/user) + active = !( active ) + + if (active) + to_chat(user, "You activate the holographic blade with a press of a button.") + playsound(user, 'sound/weapons/saberon.ogg', 20, 1) + w_class = WEIGHT_CLASS_BULKY + attack_verb = list("slashed", "stabbed", "ravaged") + set_light(light_brightness) + update_icon() + + else + to_chat(user, "You deactivate the holographic blade with a press of a button.") + playsound(user, 'sound/weapons/saberoff.ogg', 20, 1) + w_class = WEIGHT_CLASS_SMALL + attack_verb = list("poked", "jabbed", "hit") + set_light(0) + update_icon() + + add_fingerprint(user) + +/obj/item/toy/sword/cx/update_icon() + var/mutable_appearance/blade_overlay = mutable_appearance('icons/obj/cit_weapons.dmi', "cxsword_blade") + var/mutable_appearance/gem_overlay = mutable_appearance('icons/obj/cit_weapons.dmi', "cxsword_gem") + + if(light_color) + blade_overlay.color = light_color + gem_overlay.color = light_color + + cut_overlays() //So that it doesn't keep stacking overlays non-stop on top of each other + + add_overlay(gem_overlay) + + if(active) + add_overlay(blade_overlay) + +/obj/item/toy/sword/cx/ui_action_click(mob/user, var/datum/action/A) + if(istype(A, /datum/action/item_action/pick_color)) + if(alert("Are you sure you want to recolor your blade?", "Confirm Repaint", "Yes", "No") == "Yes") + var/energy_color_input = input(usr,"Choose Energy Color") as color|null + if(energy_color_input) + light_color = sanitize_hexcolor(energy_color_input, desired_format=6, include_crunch=1) + update_icon() + if(ismob(loc)) + var/mob/M = loc + M.update_inv_hands() + update_light() + + else + ..() + +/obj/item/toy/sword/cx/worn_overlays(isinhands, icon_file) + . = ..() + if(active) + if(isinhands) + var/mutable_appearance/blade_inhand = mutable_appearance(icon_file, "cxsword_blade") + blade_inhand.color = light_color + . += blade_inhand + +///autolathe memes/// I really need to stop doing this and find a proper way of adding in my toys + +/datum/design/toyneb + name = "Non-Euplastic Blade" + id = "toyneb" + build_type = AUTOLATHE + materials = list(MAT_METAL = 10000, MAT_GLASS = 1000) + build_path = /obj/item/toy/sword/cx + category = list("hacked", "Misc") + +/*///////////////////////////////////////////////////////////////////////// +///////////// The TRUE Energy Sword /////////////////////////// +*////////////////////////////////////////////////////////////////////////// + +/obj/item/melee/transforming/energy/sword/cx + name = "non-eutactic blade" + desc = "The CX Armories Type-69 Non-Eutactic Blade utilizes a hardlight blade that is dynamically 'forged' on demand to create a deadly sharp edge that is unbreakable." + icon_state = "cxsword_hilt" + icon = 'icons/obj/cit_weapons.dmi' + item_state = "cxsword" + lefthand_file = 'icons/mob/citadel/melee_lefthand.dmi' + righthand_file = 'icons/mob/citadel/melee_righthand.dmi' + force = 3 + throwforce = 5 + hitsound = "swing_hit" //it starts deactivated + attack_verb_off = list("tapped", "poked") + throw_speed = 3 + throw_range = 5 + sharpness = IS_SHARP + embed_chance = 75 + embedded_impact_pain_multiplier = 10 + armour_penetration = 35 + origin_tech = "combat=3;magnets=4;syndicate=4" + block_chance = 50 + light_color = "#37FFF7" + actions_types = list(/datum/action/item_action/pick_color) + +/obj/item/melee/transforming/energy/sword/cx/transform_weapon(mob/living/user, supress_message_text) + active = !active //I'd use a ..() here but it'd inherit from the regular esword's proc instead, so SPAGHETTI CODE + if(active) //also I need to rip out the iconstate changing bits + force = force_on + throwforce = throwforce_on + hitsound = hitsound_on + throw_speed = 4 + if(attack_verb_on.len) + attack_verb = attack_verb_on + w_class = w_class_on + START_PROCESSING(SSobj, src) + set_light(brightness_on) + update_icon() + else + force = initial(force) + throwforce = initial(throwforce) + hitsound = initial(hitsound) + throw_speed = initial(throw_speed) + if(attack_verb_off.len) + attack_verb = attack_verb_off + w_class = initial(w_class) + STOP_PROCESSING(SSobj, src) + set_light(0) + update_icon() + transform_messages(user, supress_message_text) + add_fingerprint(user) + return TRUE + +/obj/item/melee/transforming/energy/sword/cx/update_icon() + var/mutable_appearance/blade_overlay = mutable_appearance('icons/obj/cit_weapons.dmi', "cxsword_blade") + var/mutable_appearance/gem_overlay = mutable_appearance('icons/obj/cit_weapons.dmi', "cxsword_gem") + + if(light_color) + blade_overlay.color = light_color + gem_overlay.color = light_color + + cut_overlays() //So that it doesn't keep stacking overlays non-stop on top of each other + + add_overlay(gem_overlay) + + if(active) + add_overlay(blade_overlay) + +/obj/item/melee/transforming/energy/sword/cx/ui_action_click(mob/user, var/datum/action/A) + if(istype(A, /datum/action/item_action/pick_color)) + if(alert("Are you sure you want to recolor your blade?", "Confirm Repaint", "Yes", "No") == "Yes") + var/energy_color_input = input(usr,"Choose Energy Color") as color|null + if(energy_color_input) + light_color = sanitize_hexcolor(energy_color_input, desired_format=6, include_crunch=1) + update_icon() + if(ismob(loc)) + var/mob/M = loc + M.update_inv_hands() + update_light() + + else + ..() + +/obj/item/melee/transforming/energy/sword/cx/worn_overlays(isinhands, icon_file) + . = ..() + if(active) + if(isinhands) + var/mutable_appearance/blade_inhand = mutable_appearance(icon_file, "cxsword_blade") + blade_inhand.color = light_color + . += blade_inhand \ No newline at end of file diff --git a/code/modules/uplink/uplink_item_cit.dm b/code/modules/uplink/uplink_item_cit.dm index 40c74269eb..24b4357d79 100644 --- a/code/modules/uplink/uplink_item_cit.dm +++ b/code/modules/uplink/uplink_item_cit.dm @@ -160,4 +160,18 @@ new /obj/item/storage/belt/military(src) new /obj/item/clothing/suit/space/hardsuit/syndi/elite(src) -///End of Bundle stuff/// \ No newline at end of file +///End of Bundle stuff/// + + +/*///////////////////////////////////////////////////////////////////////// +///////////// The TRUE Energy Sword /////////////////////////// +*////////////////////////////////////////////////////////////////////////// + +/datum/uplink_item/dangerous/cxneb + name = "CX Type-69 Non-Eutactic Blade" + desc = "An interesting weapon that is functionally identical to the energy sword, \ + the Non-Eutactic Blade (NEB) forges a hardlight blade on-demand, \ + generating an extremely sharp, unbreakable edge that is guaranteed to satisfy your every need. \ + This particular model has a polychromic hardlight generator, allowing you to murder in style!" + item = /obj/item/melee/transforming/energy/sword/cx + cost = 8 \ No newline at end of file diff --git a/icons/mob/citadel/melee_lefthand.dmi b/icons/mob/citadel/melee_lefthand.dmi new file mode 100644 index 0000000000000000000000000000000000000000..a4265971467ba0f13bd67f827069e2ce4d0c1dfa GIT binary patch literal 965 zcmeAS@N?(olHy`uVBq!ia0vp^4M3d0!3HF+R#kZdsgA0Uh!U67;^d;tf|AVqJO+k} zIk~4cavd@dV0&QsUBv#a)}oECbtfrF-U^?P;U}D-`=sgW_VR)&ADh=7-Dv+)Fz>^c zDT^vA8!qOSr(BcCW_p}(Qsw0Lko^~=RyACViQlECYL=3u$K~e!EbNdD*Rg-k=jsP{ ze5#K&3S9Pq?QovX))(&V<`usfly~WP9SfhY#lXPy!_&nvq+-t7xqI`J3`JVsY9z@k zX$X~8Ma?^^(IKM!QKzI?;YVbUo~>z+i=0yCo~hx7J7g=5?PEJ{89!A%@%OynFNJ#3 zI_mxhYc`!eyq4b~kDHaDovFc@@xVfc2LTKP8VnX93^H5{eAt8q8PnDk3B8_nKsT%Z zX0S`c`Stmosof96wjO_@sdON7&!x$qrHZ(otg9`G+kLrW>F<4U-uHwpEZ5)td|ChN z!uwV78$y<3&)<2fwyt*djAz=a28^rjzyJTnzBk+|l;LaXd(oA*)_+`hzhv*v+RvU= zAj>AXdasv1Y&&P|c}bW1Oeg*xeofew*d0IT4bzLqC(bTE-5ovS`Q@dTk6*ld|C{XT zt+$*foKauR@XMm;m_+K@y+3wt4UGw~I+jShH z!J@7W6BydG9CJR~2L0^dzM$H$&~w77pK_fwF03zv9rm7>S^R@Hld|4T4HGhq8f?e#ssO;@tD{~)*M`yp?7Wd{t#!6e3jWwG%A24V9u4!24 zbs?;pW75wQ!3B~HhG`Fv-vk;VnJnf!b-~(i0!uy%iYur96$#v~=})ms;&1=OT*kRT zGGgU^jXb_dN~9}@F+;SW!N*~0%TO)U0^@L)}FF#moQFTHGXA>h!) RH^6+!;OXk;vd$@?2>>IDo5BD9 literal 0 HcmV?d00001 diff --git a/icons/mob/citadel/melee_righthand.dmi b/icons/mob/citadel/melee_righthand.dmi new file mode 100644 index 0000000000000000000000000000000000000000..aab77c5fd44fcb6f173c693d680208354d6fca81 GIT binary patch literal 977 zcmeAS@N?(olHy`uVBq!ia0vp^4M3d0!3HF+R#kZdsgA0Uh!U67;^d;tf|AVqJO+k} zIk~4cavd@dV0&QsUBv#a)}oECbtfrF-U^?P;U}D-`=sgW_VR)&ADh=7-Dv+)Fz>^c zDT^vA8!qOSr(BcCW_p}(Qsw0Lko^~=RyACViQlECYL=3u$K~e!EbNdD*Rg-k=jsP{ ze5#K&3S9Pq?QovX))(&V<`usfly~WP9SfhY#lXPK;_2cTQZeW4+`WF%jv}q^bCi~P zJ~s;U@PB_!UqCUg;aIYxtJi+lpyh=}mK09D?%>qKbnypc&y7j!3ucKVUYND!=k2}5 z^DLjgp3q&Le(rch`IgOQ@BZu-h*@=ocfytch5`)+3lRnxE(ShUhIXa~XT}2y86IF0 zuAIn_y#K?k-Y0HdmKRt2RAOBBdiTE9Y5ri|8U|}~^*Ylzv+il9pUbi^1@bP2F|L)l zm;Wo_jrhM^`-I!}&r~@0++Y656`2)hCYSL^hc^TlC(LrKulqguXsJVw-E7ma!z(Xx z#k<(Ef1b6x>3H2kQ})|aCI03fmicn?@M;!?rw40^cP*+X{8W{UB+u@N=i5~AX18{o z<%h`^eM;BlubrsW?&WgCQvF(#W-QZwnTqVS7SFeBa_f@O5)|BAo$WP!fn?9ky`h!s z_GkBsSlYxePtkGYd&r*jd_$RF#3B~UR{4&ZhwIB3mwHZ!{?Qm=x#b?)G!@4_po%9S zp4@Z*nz;6)cB@43lE}v=dllOL+ZaCc*vwYWbP&~fgn}Mbb>GK(@@@8Y@qd0y-856e z$IbZb$9+rPdiLGo&^~a-(mdZRP-*hTHy13;#V7upcCBOH;ak5My{0L!EdE*7u+B8- z$%l8RulG+cd%vUX+}r!&_qSIc{~B6bCb_s#!iMiyRP~kbMz^;f3$2}|((d)-etF;4 zZ!3;WRcQaftXULcEpy9k!i5=W!m~{LKYWv|<5-@5FzMNbGU*#>3HMo(7yq2Ef2sb5 zQekn1t=zvG2j=*5-e1q4^)P##o>F1ajU9p_JZCIx1S=!#Of&Wza9rC~#`ouAM!^nI e9=sv&SzPa=J-eBg^%`IvW$<+Mb6Mw<&;$UrT$nBZ literal 0 HcmV?d00001 diff --git a/icons/obj/cit_weapons.dmi b/icons/obj/cit_weapons.dmi new file mode 100644 index 0000000000000000000000000000000000000000..5fe91b6b76633a9fd01199183bb4cc14e96a6014 GIT binary patch literal 932 zcmV;V16%xwP)V=-0C=2JR&a84_w-Y6@%7{?OD!tS%+FJ>RWQ*r;NmRLOex7wuvIWN;^NFm z%}mcIfpCgT5=&AQY!#G}D~ikWi&B)hI8!o$_lQ2E($Kbo?HNPuS5)|H)tmS00P)aL_t(|ob8%DXcJ)=$A2f5 z8WBGlq?%%vY=shoLjn#u7X+sciKEh~ZZ6gjtl|<7X{N5F$yf>jS8)*Plm;CwLL^5I zNwp67Aj3K2Qew=R%g1|ndGr34aF^ts`~B~|C*hvIw!NQWl6BgxLdi(tQs=%*A^X#< z`gRg-fCYZB%Ui!h*LEVI2DHIn0~W2_Gr+dUy8TF)0bSrf1LsB68&s!69P~f%zeUs= zMk6<%2YhSW7Yz_bY=A@f@A#wv!UzrM2i`ANA4X)rxWdB-3>as47}9`ohle2ykO3YB zG(Z-37{CCT;Gs_gWP^u343H5X92y`iJUB2wW_ajffb8&K^E@D4OPS$VJ_;NIOEe#1 zd_XdIuvr1cQk{cO(L8VuiQ&O!1?Yzj0E#;c>+^Hdgk$+8&8k%SLnKxY64E4i~SyVOaHNG+{Ng zZiA8Z%7z&X2B}mk+`0XY*~?SJZ=53>%SSVX?7pzG@j(CF0_l|vGY|++E|x=&3r&dJ|T4QO4w@X z_n)9^`GE9R5W_Igb^Ro