Merge pull request #3585 from Michiyamenotehifunana/CX-sword
Adds fancy Energy Swords (and a toy version)
This commit is contained in:
@@ -0,0 +1,207 @@
|
||||
/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, "<span class='notice'>You activate the holographic blade with a press of a button.</span>")
|
||||
playsound(user, 'sound/weapons/nebon.ogg', 50, 1)
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
attack_verb = list("slashed", "stabbed", "ravaged")
|
||||
set_light(light_brightness)
|
||||
update_icon()
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You deactivate the holographic blade with a press of a button.</span>")
|
||||
playsound(user, 'sound/weapons/neboff.ogg', 50, 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")
|
||||
*/ // There, I stopped doing it
|
||||
|
||||
/datum/crafting_recipe/toyneb
|
||||
name = "Non-Euplastic Blade"
|
||||
reqs = list(/obj/item/light/bulb = 1, /obj/item/stack/cable_coil = 1, /obj/item/toy/sword = 1)
|
||||
result = /obj/item/toy/sword/cx
|
||||
category = CAT_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
|
||||
hitsound_on = 'sound/weapons/nebhit.ogg'
|
||||
attack_verb_off = list("tapped", "poked")
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
sharpness = IS_SHARP
|
||||
embed_chance = 40
|
||||
embedded_impact_pain_multiplier = 10
|
||||
armour_penetration = 0
|
||||
origin_tech = "combat=3;magnets=4"
|
||||
block_chance = 60
|
||||
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/transform_messages(mob/living/user, supress_message_text)
|
||||
playsound(user, active ? 'sound/weapons/nebon.ogg' : 'sound/weapons/neboff.ogg', 65, 1)
|
||||
if(!supress_message_text)
|
||||
to_chat(user, "<span class='notice'>[src] [active ? "is now active":"can now be concealed"].</span>")
|
||||
|
||||
/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
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/cx/traitor
|
||||
name = "\improper Dragon's Tooth Sword"
|
||||
desc = "The Dragon's Tooth sword is a blackmarket modification of the CX Armouries Type-69 NEB, \
|
||||
which utilizes a hardlight blade that is dynamically 'forged' on demand to create a deadly sharp edge that is unbreakable. \
|
||||
It appears to have a wooden grip and a shaved down guard."
|
||||
icon_state = "cxsword_hilt_traitor"
|
||||
armour_penetration = 35
|
||||
embed_chance = 75
|
||||
block_chance = 50
|
||||
origin_tech = "combat=3;magnets=4;syndicate=4"
|
||||
hitsound_on = 'sound/weapons/blade1.ogg'
|
||||
light_color = "#37F0FF"
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/cx/traitor/transform_messages(mob/living/user, supress_message_text)
|
||||
playsound(user, active ? 'sound/weapons/saberon.ogg' : 'sound/weapons/saberoff.ogg', 35, 1)
|
||||
if(!supress_message_text)
|
||||
to_chat(user, "<span class='notice'>[src] [active ? "is now active":"can now be concealed"].</span>")
|
||||
@@ -44,7 +44,8 @@
|
||||
/obj/item/grenade/chem_grenade/glitter/blue = 1,
|
||||
/obj/item/grenade/chem_grenade/glitter/white = 1,
|
||||
/obj/item/toy/eightball = 2,
|
||||
/obj/item/toy/windupToolbox = 2)
|
||||
/obj/item/toy/windupToolbox = 2,
|
||||
/obj/item/toy/sword/cx = 2)
|
||||
|
||||
light_color = LIGHT_COLOR_GREEN
|
||||
|
||||
|
||||
@@ -160,4 +160,19 @@
|
||||
new /obj/item/storage/belt/military(src)
|
||||
new /obj/item/clothing/suit/space/hardsuit/syndi/elite(src)
|
||||
|
||||
///End of Bundle stuff///
|
||||
///End of Bundle stuff///
|
||||
|
||||
|
||||
/*/////////////////////////////////////////////////////////////////////////
|
||||
///////////// The TRUE Energy Sword ///////////////////////////
|
||||
*//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/uplink_item/dangerous/cxneb
|
||||
name = "Dragon's Tooth Non-Eutactic Blade"
|
||||
desc = "An illegal modification of a 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! \
|
||||
The illegal modifications bring this weapon up to par with the classic energy sword, and also gives it the energy sword's distinctive sounds."
|
||||
item = /obj/item/melee/transforming/energy/sword/cx/traitor
|
||||
cost = 8
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 965 B |
Binary file not shown.
|
After Width: | Height: | Size: 977 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -177,6 +177,7 @@
|
||||
#include "code\citadel\cit_spawners.dm"
|
||||
#include "code\citadel\cit_uniforms.dm"
|
||||
#include "code\citadel\cit_vendors.dm"
|
||||
#include "code\citadel\cit_weapons.dm"
|
||||
#include "code\citadel\dogborgstuff.dm"
|
||||
#include "code\citadel\plasmacases.dm"
|
||||
#include "code\citadel\crew_objectives\cit_crewobjectives_cargo.dm"
|
||||
|
||||
Reference in New Issue
Block a user