Consolidates NEB code into a modular package

This commit is contained in:
Michiyamenotehifunana
2017-12-15 16:57:22 +08:00
parent b6b0ab69e3
commit e77c1a8a07
10 changed files with 238 additions and 346 deletions

View File

@@ -1,240 +0,0 @@
/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()
/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()
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
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)
if(ismob(loc))
var/mob/M = loc
M.update_inv_hands()
/obj/item/toy/sword/cx/AltClick(mob/living/user)
if(user.incapacitated() || !istype(user))
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return
if(!in_range(src, user))
return
if(user.incapacitated() || !istype(user) || !in_range(src, user))
return
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()
update_light()
/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
/obj/item/toy/sword/cx/attackby(obj/item/W, mob/living/user, params)
if(istype(W, /obj/item/toy/sword/cx))
if((W.flags_1 & NODROP_1) || (flags_1 & NODROP_1))
to_chat(user, "<span class='warning'>\the [flags_1 & NODROP_1 ? src : W] is stuck to your hand, you can't attach it to \the [flags_1 & NODROP_1 ? W : src]!</span>")
return
else
to_chat(user, "<span class='notice'>You combine the two plastic swords, making a single supermassive toy! You're fake-cool.</span>")
new /obj/item/twohanded/hypereutactic/toy(user.loc)
qdel(W)
qdel(src)
else
return ..()
/obj/item/toy/sword/cx/examine(mob/user)
..()
to_chat(user, "<span class='notice'>Alt-click to recolor it.</span>")
/*///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
block_chance = 60
light_color = "#37FFF7"
actions_types = list()
/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)
if(ismob(loc))
var/mob/M = loc
M.update_inv_hands()
/obj/item/melee/transforming/energy/sword/cx/AltClick(mob/living/user)
if(user.incapacitated() || !istype(user))
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return
if(!in_range(src, user))
return
if(user.incapacitated() || !istype(user) || !in_range(src, user))
return
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()
update_light()
/obj/item/melee/transforming/energy/sword/cx/examine(mob/user)
..()
to_chat(user, "<span class='notice'>Alt-click to recolor it.</span>")
/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
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>")

View File

@@ -1,10 +1,211 @@
/* fuckhuge esword thingy */
/*/////////////////////////////////////////////////////////////////////////
///////////// The TRUE Energy Sword ///////////////////////////
*//////////////////////////////////////////////////////////////////////////
/obj/item/melee/transforming/energy/sword/cx
name = "non-eutactic blade"
desc = "The 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 = 'modular_citadel/icons/eutactic/item/noneutactic.dmi'
item_state = "cxsword"
lefthand_file = 'modular_citadel/icons/eutactic/mob/noneutactic_left.dmi'
righthand_file = 'modular_citadel/icons/eutactic/mob/noneutactic_right.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
block_chance = 60
light_color = "#37FFF7"
actions_types = list()
/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'd 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('modular_citadel/icons/eutactic/item/noneutactic.dmi', "cxsword_blade")
var/mutable_appearance/gem_overlay = mutable_appearance('modular_citadel/icons/eutactic/item/noneutactic.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)
if(ismob(loc))
var/mob/M = loc
M.update_inv_hands()
/obj/item/melee/transforming/energy/sword/cx/AltClick(mob/living/user)
if(!in_range(src, user)) //Basic checks to prevent abuse
return
if(user.incapacitated() || !istype(user))
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return
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()
update_light()
/obj/item/melee/transforming/energy/sword/cx/examine(mob/user)
..()
to_chat(user, "<span class='notice'>Alt-click to recolor it.</span>")
/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
//OBLIGATORY TOY MEMES /////////////////////////////////////
/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 = 'modular_citadel/icons/eutactic/item/noneutactic.dmi'
icon_state = "cxsword_hilt"
item_state = "cxsword"
lefthand_file = 'modular_citadel/icons/eutactic/mob/noneutactic_left.dmi'
righthand_file = 'modular_citadel/icons/eutactic/mob/noneutactic_right.dmi'
active = FALSE
w_class = WEIGHT_CLASS_SMALL
attack_verb = list("poked", "jabbed", "hit")
light_color = "#37FFF7"
var/light_brightness = 3
actions_types = list()
/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('modular_citadel/icons/eutactic/item/noneutactic.dmi', "cxsword_blade")
var/mutable_appearance/gem_overlay = mutable_appearance('modular_citadel/icons/eutactic/item/noneutactic.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)
if(ismob(loc))
var/mob/M = loc
M.update_inv_hands()
/obj/item/toy/sword/cx/AltClick(mob/living/user)
if(!in_range(src, user)) //Basic checks to prevent abuse
return
if(user.incapacitated() || !istype(user))
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return
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()
update_light()
/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
/obj/item/toy/sword/cx/attackby(obj/item/W, mob/living/user, params)
if(istype(W, /obj/item/toy/sword/cx))
if((W.flags_1 & NODROP_1) || (flags_1 & NODROP_1))
to_chat(user, "<span class='warning'>\the [flags_1 & NODROP_1 ? src : W] is stuck to your hand, you can't attach it to \the [flags_1 & NODROP_1 ? W : src]!</span>")
return
else
to_chat(user, "<span class='notice'>You combine the two plastic swords, making a single supermassive toy! You're fake-cool.</span>")
new /obj/item/twohanded/hypereutactic/toy(user.loc)
qdel(W)
qdel(src)
else
return ..()
/obj/item/toy/sword/cx/examine(mob/user)
..()
to_chat(user, "<span class='notice'>Alt-click to recolor it.</span>")
/////////////////////////////////////////////////////
// HYPEREUTACTIC Blades /////////////////////////
/////////////////////////////////////////////////////
/obj/item/twohanded/hypereutactic
icon = 'modular_citadel/icons/hypereutactic/item/hypereutactic.dmi'
icon = 'modular_citadel/icons/eutactic/item/hypereutactic.dmi'
icon_state = "hypereutactic"
lefthand_file = 'modular_citadel/icons/hypereutactic/mob/hypereutactic_left.dmi'
righthand_file = 'modular_citadel/icons/hypereutactic/mob/hypereutactic_right.dmi'
lefthand_file = 'modular_citadel/icons/eutactic/mob/hypereutactic_left.dmi'
righthand_file = 'modular_citadel/icons/eutactic/mob/hypereutactic_right.dmi'
item_state = "hypereutactic"
inhand_x_dimension = 64
inhand_y_dimension = 64
@@ -55,8 +256,8 @@
slowdown = initial(slowdown)
/obj/item/twohanded/hypereutactic/update_icon()
var/mutable_appearance/blade_overlay = mutable_appearance('modular_citadel/icons/hypereutactic/item/hypereutactic.dmi', "hypereutactic_blade")
var/mutable_appearance/gem_overlay = mutable_appearance('modular_citadel/icons/hypereutactic/item/hypereutactic.dmi', "hypereutactic_gem")
var/mutable_appearance/blade_overlay = mutable_appearance('modular_citadel/icons/eutactic/item/hypereutactic.dmi', "hypereutactic_blade")
var/mutable_appearance/gem_overlay = mutable_appearance('modular_citadel/icons/eutactic/item/hypereutactic.dmi', "hypereutactic_gem")
if(light_color)
blade_overlay.color = light_color
@@ -68,7 +269,6 @@
if(wielded)
add_overlay(blade_overlay)
if(ismob(loc))
var/mob/M = loc
M.update_inv_hands()
@@ -76,13 +276,11 @@
clean_blood()//blood overlays get weird otherwise, because the sprite changes. (retained from original desword because I have no idea what this is)
/obj/item/twohanded/hypereutactic/AltClick(mob/living/user)
if(!in_range(src, user)) //Basic checks to prevent abuse
return
if(user.incapacitated() || !istype(user))
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return
if(!in_range(src, user))
return
if(user.incapacitated() || !istype(user) || !in_range(src, user))
return
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
@@ -108,7 +306,7 @@
////////// stuff beneath this is all taken from the desword ////////////
////////// stuff beneath this is all taken from the desword //////////// wow very professional such OOP wow
@@ -137,12 +335,12 @@
/obj/item/twohanded/hypereutactic/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
if(wielded)
return ..()
return 0
return FALSE
/obj/item/twohanded/hypereutactic/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0) //In case thats just so happens that it is still activated on the groud, prevents hulk from picking it up
if(wielded)
to_chat(user, "<span class='warning'>You can't pick up such dangerous item with your meaty hands without losing fingers, better not to!</span>")
return 1
return TRUE
/obj/item/twohanded/hypereutactic/process()
if(wielded)
@@ -152,7 +350,7 @@
/obj/item/twohanded/hypereutactic/IsReflect()
if(wielded)
return 1
return TRUE
/obj/item/twohanded/hypereutactic/ignition_effect(atom/A, mob/user)
// same as /obj/item/melee/transforming/energy, mostly
@@ -167,7 +365,6 @@
playsound(loc, hitsound, get_clamped_volume(), 1, -1)
add_fingerprint(user)
////////////////// TOY VERSION /////////////////////////////
/obj/item/twohanded/hypereutactic/toy
@@ -182,95 +379,25 @@
attack_verb = list("attacked", "struck", "hit")
/obj/item/twohanded/hypereutactic/toy/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
return 0
return FALSE
/obj/item/twohanded/hypereutactic/toy/IsReflect()//Stops it from reflecting energy projectiles
return 0
return FALSE
/* old code that don't work no more
/obj/item/toy/sword/cx/hyper
name = "\improper DX Hyper-Euplastic LightSword"
desc = "A supermassive toy envisioned to cleave the very fabric of space and time itself in twain. Realistic visuals and sounds! Ages 8 and up."
icon = 'modular_citadel/icons/hypereutactic/item/hypereutactic.dmi'
icon_state = "hypereutactic"
lefthand_file = 'modular_citadel/icons/hypereutactic/mob/hypereutactic_left.dmi'
righthand_file = 'modular_citadel/icons/hypereutactic/mob/hypereutactic_right.dmi'
item_state = "hypereutactic"
inhand_x_dimension = 64
inhand_y_dimension = 64
active = FALSE
w_class = WEIGHT_CLASS_SMALL
attack_verb = list("poked", "devastated", "jabbed")
light_color = "#37FFF7"
light_brightness = 3
actions_types = list()
//////// Tatortot NEB /////////////// (same stats as regular esword)
/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 a Non-Eutactic Blade, \
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
hitsound_on = 'sound/weapons/blade1.ogg'
light_color = "#37F0FF"
/obj/item/toy/sword/cx/hyper/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/hyper/update_icon()
var/mutable_appearance/blade_overlay = mutable_appearance('modular_citadel/icons/hypereutactic/item/hypereutactic.dmi', "hypereutactic_blade")
var/mutable_appearance/gem_overlay = mutable_appearance('modular_citadel/icons/hypereutactic/item/hypereutactic.dmi', "hypereutactic_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)
if(ismob(loc))
var/mob/M = loc
M.update_inv_hands()
/obj/item/toy/sword/cx/hyper/AltClick(mob/living/user)
if(user.incapacitated() || !istype(user))
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return
if(!in_range(src, user))
return
if(user.incapacitated() || !istype(user) || !in_range(src, user))
return
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()
update_light()
/obj/item/toy/sword/cx/hyper/worn_overlays(isinhands, icon_file)
if(isinhands)
var/mutable_appearance/gem_inhand = mutable_appearance(icon_file, "hypereutactic_gem")
gem_inhand.color = light_color
. += gem_inhand
if(active)
var/mutable_appearance/blade_inhand = mutable_appearance(icon_file, "hypereutactic_blade")
blade_inhand.color = light_color
. += blade_inhand
/obj/item/toy/sword/cx/hyper/attackby(obj/item/W, mob/living/user, params)
return
*/
/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>")

View File

@@ -0,0 +1,5 @@
/datum/crafting_recipe/toyneb
name = "Non-Euplastic Blade"
reqs = list(/obj/item/light/tube = 1, /obj/item/stack/cable_coil = 1, /obj/item/stack/sheet/plastic = 4)
result = /obj/item/toy/sword/cx
category = CAT_MISC

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

Before

Width:  |  Height:  |  Size: 965 B

After

Width:  |  Height:  |  Size: 965 B

View File

Before

Width:  |  Height:  |  Size: 977 B

After

Width:  |  Height:  |  Size: 977 B

View File

@@ -190,7 +190,6 @@
#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"
@@ -2449,7 +2448,8 @@
#include "modular_citadel\cit_screenshake.dm"
#include "modular_citadel\citadel_ghostrole_spawners.dm"
#include "modular_citadel\cydonian_armor.dm"
#include "modular_citadel\hypereutactic_blade.dm"
#include "modular_citadel\polychromic_clothes.dm"
#include "modular_citadel\code\datums\uplink_items_cit.dm"
#include "modular_citadel\code\game\objects\items\melee\eutactic_blades.dm"
#include "modular_citadel\code\modules\crafting\recipes.dm"
// END_INCLUDE