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
+2 -2
View File
@@ -60,7 +60,7 @@
name = "broken bug"
desc = "" //Even when it's broken it's inconspicuous
icon = 'icons/obj/weapons.dmi'
icon_state = "eshield0"
icon_state = "eshield"
item_state = "nothing"
layer = TURF_LAYER+0.2
w_class = ITEMSIZE_TINY
@@ -75,7 +75,7 @@
name = "bug"
desc = "" //Nothing to see here
icon = 'icons/obj/weapons.dmi'
icon_state = "eshield0"
icon_state = "eshield"
item_state = "nothing"
layer = TURF_LAYER+0.2
w_class = ITEMSIZE_TINY
+2
View File
@@ -271,10 +271,12 @@
if (src.active)
user << "<span class='notice'>You extend the plastic blade with a quick flick of your wrist.</span>"
playsound(user, 'sound/weapons/saberon.ogg', 50, 1)
src.item_state = "[icon_state]_blade"
src.w_class = ITEMSIZE_LARGE
else
user << "<span class='notice'>You push the plastic blade back down into the handle.</span>"
playsound(user, 'sound/weapons/saberoff.ogg', 50, 1)
src.item_state = "[icon_state]"
src.w_class = ITEMSIZE_SMALL
update_icon()
src.add_fingerprint(user)
@@ -23,6 +23,26 @@
slot_r_hand_str = 'icons/mob/items/righthand_melee.dmi',
)
/obj/item/weapon/melee/energy/sword/green/New()
colorable = FALSE
lcolor = "#008000"
/obj/item/weapon/melee/energy/sword/red/New()
colorable = FALSE
lcolor = "#FF0000"
/obj/item/weapon/melee/energy/sword/blue/New()
colorable = FALSE
lcolor = "#0000FF"
/obj/item/weapon/melee/energy/sword/purple/New()
colorable = FALSE
lcolor = "#800080"
/obj/item/weapon/melee/energy/sword/white/New()
colorable = FALSE
lcolor = "#FFFFFF"
/obj/item/weapon/melee/energy/proc/activate(mob/living/user)
if(active)
return
@@ -147,11 +167,12 @@
/obj/item/weapon/melee/energy/update_icon()
. = ..()
var/mutable_appearance/blade_overlay = mutable_appearance(icon, "[icon_state]_blade")
if(colorable)
blade_overlay.color = lcolor
if(rainbow || !colorable)
blade_overlay.color = lcolor
color = lcolor
if(rainbow)
blade_overlay = mutable_appearance(icon, "[icon_state]_blade_rainbow")
blade_overlay.color = "FFFFFF"
color = "FFFFFF"
cut_overlays() //So that it doesn't keep stacking overlays non-stop on top of each other
if(active)
add_overlay(blade_overlay)
@@ -99,7 +99,7 @@
)
/obj/item/weapon/rig/pmc/security
name = "ERT-S suit control module"
name = "PMC-S suit control module"
desc = "A suit worn by private military contractors. This one is setup for security. Armoured and space ready."
suit_type = "PMC security"
icon_state = "pmc_securitygrey_rig"
+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
@@ -182,8 +182,6 @@
if(H.wear_suit)
if(istype(H.wear_suit, /obj/item/clothing/suit/space))
injtime = injtime * 2
if(!H.can_inject(user, 1))
return
else if(isliving(target))
var/mob/living/M = target