Fixes Sharpening Toy Swords

This commit is contained in:
Fox McCloud
2019-08-09 16:36:04 -04:00
parent d3d96b0885
commit fdfbb8fd93
2 changed files with 7 additions and 1 deletions
+1
View File
@@ -208,6 +208,7 @@
origin_tech = null
attack_verb = list("attacked", "struck", "hit")
brightness_on = 0
sharp_when_wielded = FALSE // It's a toy
/obj/item/twohanded/dualsaber/toy/hit_reaction()
return 0
+6 -1
View File
@@ -28,12 +28,15 @@
var/force_wielded = 0
var/wieldsound = null
var/unwieldsound = null
var/sharp_when_wielded = FALSE
/obj/item/twohanded/proc/unwield(mob/living/carbon/user)
if(!wielded || !user)
return
wielded = FALSE
force = force_unwielded
if(sharp_when_wielded)
sharp = FALSE
var/sf = findtext(name," (Wielded)")
if(sf)
name = copytext(name, 1, sf)
@@ -66,6 +69,8 @@
return
wielded = TRUE
force = force_wielded
if(sharp_when_wielded)
sharp = TRUE
name = "[name] (Wielded)"
update_icon()
if(user)
@@ -224,7 +229,7 @@
origin_tech = "magnets=4;syndicate=5"
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
block_chance = 75
sharp = TRUE
sharp_when_wielded = TRUE // only sharp when wielded
light_power = 2
var/brightness_on = 2
var/colormap = list(red=LIGHT_COLOR_RED, blue=LIGHT_COLOR_LIGHTBLUE, green=LIGHT_COLOR_GREEN, purple=LIGHT_COLOR_PURPLE, rainbow=LIGHT_COLOR_WHITE)