More bug fixes (#6560)

* More esword fixes

- Fixes Holodeck eswords being completely broken, Holodeck eswords are not recolorable
- Fixes Toy sword onmob sprite not properly updating
- Fixes eswords not properly updating onmob color (this is an incredibly hacky fix)
- Readds the esword sub types, they are not recolorable

* Removes unintended code

* More unintended code removal

* Fixes spy bug sprite

* Fixes PMC-S Name

* Fixes syringes not working through voidsuits.
This commit is contained in:
Novacat
2019-12-13 20:55:47 -05:00
committed by Mechoid
parent 55d012d229
commit 45aa4ba3de
6 changed files with 61 additions and 26 deletions
+32 -18
View File
@@ -259,7 +259,9 @@ datum/unarmed_attack/holopugilism/unarmed_override(var/mob/living/carbon/human/u
/obj/item/weapon/holo/esword
desc = "May the force be within you. Sorta."
icon_state = "sword0"
icon_state = "esword"
var/lcolor
var/rainbow = FALSE
item_icons = list(
slot_l_hand_str = 'icons/mob/items/lefthand_melee.dmi',
slot_r_hand_str = 'icons/mob/items/righthand_melee.dmi',
@@ -271,15 +273,12 @@ datum/unarmed_attack/holopugilism/unarmed_override(var/mob/living/carbon/human/u
w_class = ITEMSIZE_SMALL
flags = NOBLOODY
var/active = 0
var/item_color
/obj/item/weapon/holo/esword/green
New()
item_color = "green"
/obj/item/weapon/holo/esword/green/New()
lcolor = "#008000"
/obj/item/weapon/holo/esword/red
New()
item_color = "red"
/obj/item/weapon/holo/esword/red/New()
lcolor = "#FF0000"
/obj/item/weapon/holo/esword/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
if(active && default_parry_check(user, attacker, damage_source) && prob(50))
@@ -292,32 +291,47 @@ datum/unarmed_attack/holopugilism/unarmed_override(var/mob/living/carbon/human/u
return TRUE
return FALSE
/obj/item/weapon/holo/esword/New()
item_color = pick("red","blue","green","purple")
/obj/item/weapon/holo/esword/attack_self(mob/living/user as mob)
active = !active
if (active)
force = 30
icon_state = "sword[item_color]"
item_state = "[icon_state]_blade"
w_class = ITEMSIZE_LARGE
playsound(user, 'sound/weapons/saberon.ogg', 50, 1)
to_chat(user, "<span class='notice'>[src] is now active.</span>")
else
force = 3
icon_state = "sword0"
item_state = "[icon_state]"
w_class = ITEMSIZE_SMALL
playsound(user, 'sound/weapons/saberoff.ogg', 50, 1)
to_chat(user, "<span class='notice'>[src] can now be concealed.</span>")
if(istype(user,/mob/living/carbon/human))
var/mob/living/carbon/human/H = user
H.update_inv_l_hand()
H.update_inv_r_hand()
update_icon()
add_fingerprint(user)
return
/obj/item/weapon/holo/esword/attackby(obj/item/weapon/W, mob/user)
if(istype(W, /obj/item/device/multitool) && !active)
if(!rainbow)
rainbow = TRUE
else
rainbow = FALSE
to_chat(user, "<span class='notice'>You manipulate the color controller in [src].</span>")
update_icon()
return ..()
/obj/item/weapon/holo/esword/update_icon()
. = ..()
var/mutable_appearance/blade_overlay = mutable_appearance(icon, "[icon_state]_blade")
blade_overlay.color = lcolor
cut_overlays() //So that it doesn't keep stacking overlays non-stop on top of each other
if(active)
add_overlay(blade_overlay)
if(istype(usr,/mob/living/carbon/human))
var/mob/living/carbon/human/H = usr
H.update_inv_l_hand()
H.update_inv_r_hand()
//BASKETBALL OBJECTS
/obj/item/weapon/beach_ball/holoball