diff --git a/code/game/objects/items/weapons/melee/misc.dm b/code/game/objects/items/weapons/melee/misc.dm index 28acafbac86..dd2e1e25312 100644 --- a/code/game/objects/items/weapons/melee/misc.dm +++ b/code/game/objects/items/weapons/melee/misc.dm @@ -125,3 +125,87 @@ playsound(src.loc, 'sound/weapons/batonextend.ogg', 50, 1) add_fingerprint(user) + +/obj/item/weapon/melee/supermatter_sword + name = "supermatter sword" + desc = "In a station full of bad ideas, this might just be the worst." + icon = 'icons/obj/weapons.dmi' + icon_state = "supermatter_sword" + item_state = "supermatter_sword" + slot_flags = null + w_class = 4 + var/obj/machinery/power/supermatter_shard/shard + var/balanced = 1 + +/obj/item/weapon/melee/supermatter_sword/New() + ..() + shard = new /obj/machinery/power/supermatter_shard(src) + SSobj.processing += src + visible_message("\The [src] appears, balanced ever so perfectly on its hilt. This isn't ominous at all.") + +/obj/item/weapon/melee/supermatter_sword/process() + if(balanced || throwing || ismob(src.loc) || isnull(src.loc)) + return + if(!isturf(src.loc)) + var/atom/target = src.loc + loc = target.loc + consume_everything(target) + else + var/turf/T = get_turf(src) + if(!istype(T,/turf/space)) + consume_turf(T) + +/obj/item/weapon/melee/supermatter_sword/afterattack(target, mob/user) + ..() + if(user && target == user) + user.drop_item() + if(Adjacent(target)) + consume_everything(target) + +/obj/item/weapon/melee/supermatter_sword/throw_impact(target) + ..() + if(ismob(target)) + var/mob/M + if(src.loc == M) //target caught the sword + M.drop_item() + consume_everything(target) + +/obj/item/weapon/melee/supermatter_sword/pickup(user) + ..() + balanced = 0 + +/obj/item/weapon/melee/supermatter_sword/ex_act(severity, target) + visible_message("\The blast wave smacks into \the [src] and rapidly flashes to ash.",\ + "You hear a loud crack as you are washed with a wave of heat.") + consume_everything() + +/obj/item/weapon/melee/supermatter_sword/acid_act() + visible_message("\The acid smacks into \the [src] and rapidly flashes to ash.",\ + "You hear a loud crack as you are washed with a wave of heat.") + consume_everything() + +/obj/item/weapon/melee/supermatter_sword/bullet_act(obj/item/projectile/P) + visible_message("[P] smacks into \the [src] and rapidly flashes to ash.",\ + "You hear a loud crack as you are washed with a wave of heat.") + consume_everything() + +/obj/item/weapon/melee/supermatter_sword/suicide_act(mob/user) + user.visible_message("[user] touches the [src]'s blade. It looks like they're tired of waiting for the radiation to kill them!") + user.drop_item() + shard.Bumped(user) + +/obj/item/weapon/melee/supermatter_sword/proc/consume_everything(target) + if(isnull(target)) + shard.Consume() + else if(!isturf(target)) + shard.Bumped(target) + else + consume_turf(target) + +/obj/item/weapon/melee/supermatter_sword/proc/consume_turf(turf/T) + playsound(T, 'sound/effects/supermatter.ogg', 50, 1) + T.visible_message("\The [T] smacks into \the [src] and rapidly flashes to ash.",\ + "You hear a loud crack as you are washed with a wave of heat.") + shard.Consume() + T.ChangeTurf(/turf/space) + T.CalculateAdjacentTurfs() \ No newline at end of file diff --git a/icons/mob/inhands/items_lefthand.dmi b/icons/mob/inhands/items_lefthand.dmi index b8eb5181020..7f07239f842 100644 Binary files a/icons/mob/inhands/items_lefthand.dmi and b/icons/mob/inhands/items_lefthand.dmi differ diff --git a/icons/mob/inhands/items_righthand.dmi b/icons/mob/inhands/items_righthand.dmi index 5a02ccac140..708ee49f997 100644 Binary files a/icons/mob/inhands/items_righthand.dmi and b/icons/mob/inhands/items_righthand.dmi differ diff --git a/icons/obj/weapons.dmi b/icons/obj/weapons.dmi index eaea54a5c73..948735e60d4 100644 Binary files a/icons/obj/weapons.dmi and b/icons/obj/weapons.dmi differ