surgery tool refactor (#46856)

* awooooooooooooooooo

* a

* aw shet

* woops!!

* a

* wow heck you
This commit is contained in:
Fikou
2019-10-09 18:25:42 +02:00
committed by moo
parent ba03445c89
commit e450be44dc
32 changed files with 118 additions and 168 deletions

View File

@@ -429,17 +429,13 @@
#undef BRAINS_BLOWN_THROW_RANGE
GLOBAL_LIST_INIT(gun_saw_types, typecacheof(list(
/obj/item/circular_saw,
/obj/item/gun/energy/plasmacutter,
/obj/item/melee/transforming/energy,
/obj/item/twohanded/required/chainsaw,
/obj/item/nullrod/claymore/chainsaw_sword,
/obj/item/nullrod/chainsaw,
/obj/item/mounted_chainsaw)))
)))
///Handles all the logic of sawing off guns,
/obj/item/gun/ballistic/proc/sawoff(mob/user, obj/item/saw)
if(!saw.get_sharpness() || !is_type_in_typecache(saw, GLOB.gun_saw_types)) //needs to be sharp. Otherwise turned off eswords can cut this.
if(!saw.get_sharpness() || !is_type_in_typecache(saw, GLOB.gun_saw_types) && !saw.tool_behaviour == TOOL_SAW) //needs to be sharp. Otherwise turned off eswords can cut this.
return
if(sawn_off)
to_chat(user, "<span class='warning'>\The [src] is already shortened!</span>")
@@ -490,5 +486,4 @@ GLOBAL_LIST_INIT(gun_saw_types, typecacheof(list(
/obj/item/suppressor/specialoffer
name = "cheap suppressor"
desc = "A foreign knock-off suppressor, it feels flimsy, cheap, and brittle. Still fits most weapons."
icon = 'icons/obj/guns/projectile.dmi'
icon_state = "suppressor"