mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +01:00
## About The Pull Request Hello hello the evil folder mover goat is back, i will destroy years worth of muscle memory. Items is an folder alot of stuff that really didn't get a spefific location. Items/Weaponry Contains Shields.dm Items/Weaponry/Melee Contains (Most of the extra dm files come from me splitting misc/weaponry.dm into its own categories killing offf weaponry.dm in its whole) baseball_bat.dm, baton.dm, chainofcommand.dm, chainsaw.dm, claymore.dm, dualsaber.dm, energy.dm fireaxe.dm, high_frequency_blade.dm, his_grace.dm, katana.dm, knives.dm, misc.dm, powerfist.dm, sabre.dm soulscythe.dm, spear.dm, supermatter_sword.dm. Items/weaponry/ranged Contains flamethrower.dm, pnuematic_cannon.dm, throwing_star.dm items/tools Contains control_wand.dm, extinguisher.dm, inducer.dm, spess_knife.dm, theft_tools.dm items/tools/engineering Contains airlock_painter.dm, decal_painter.dm, paintable_decals.dm, crowbar.dm, screwdriver.dm, weldingtool.dm wirebbrush.dm, wirecutters.dm, wrench.dm items/tools/janitorial Contains broom.dm, janitor_key.dm items/tools/medical Contains bodybag.dm, cane.dm, defib.dm, reflex_hammer.dm boxcutter.dm is merged into knives.dm Kitchen.dm renamed into kitchen utensils and moved into food and drinks module surgery_tray.dm moved into surgery module banhammer/extendo hand moved from weaponry into toys.dm balloon mallet moved into clown_items.dm ectoplasm moved from weaponry.dm into soulstone.dm (since thats the resulting residue when a shade dies, and not really a weapon) ## Why It's Good For The Game So things are way easier to navigate ## Changelog
116 lines
3.8 KiB
Plaintext
116 lines
3.8 KiB
Plaintext
/obj/item/melee/supermatter_sword
|
|
name = "supermatter sword"
|
|
desc = "In a station full of bad ideas, this might just be the worst."
|
|
icon = 'icons/obj/weapons/sword.dmi'
|
|
icon_state = "supermatter_sword_balanced"
|
|
inhand_icon_state = "supermatter_sword"
|
|
icon_angle = -90
|
|
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
|
|
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
|
|
slot_flags = null
|
|
w_class = WEIGHT_CLASS_BULKY
|
|
force = 0.001
|
|
armour_penetration = 1000
|
|
force_string = "INFINITE"
|
|
item_flags = NEEDS_PERMIT|NO_BLOOD_ON_ITEM
|
|
custom_materials = list(/datum/material/adamantine = SHEET_MATERIAL_AMOUNT * 20, /datum/material/iron = SHEET_MATERIAL_AMOUNT)
|
|
var/obj/machinery/power/supermatter_crystal/shard
|
|
var/balanced = 1
|
|
|
|
/obj/item/melee/supermatter_sword/Initialize(mapload)
|
|
. = ..()
|
|
shard = new /obj/machinery/power/supermatter_crystal(src)
|
|
qdel(shard.countdown)
|
|
shard.countdown = null
|
|
START_PROCESSING(SSobj, src)
|
|
visible_message(span_warning("[src] appears, balanced ever so perfectly on its hilt. This isn't ominous at all."))
|
|
RegisterSignal(src, COMSIG_ATOM_PRE_BULLET_ACT, PROC_REF(eat_bullets))
|
|
|
|
/obj/item/melee/supermatter_sword/process()
|
|
if(balanced || throwing || ismob(src.loc) || isnull(src.loc))
|
|
return
|
|
if(!isturf(src.loc))
|
|
var/atom/target = src.loc
|
|
forceMove(target.loc)
|
|
consume_everything(target)
|
|
else
|
|
var/turf/turf = get_turf(src)
|
|
if(!isspaceturf(turf))
|
|
consume_turf(turf)
|
|
|
|
/obj/item/melee/supermatter_sword/pre_attack(atom/target, mob/living/user, list/modifiers, list/attack_modifiers)
|
|
. = ..()
|
|
if(.)
|
|
return .
|
|
|
|
if(target == user)
|
|
user.dropItemToGround(src, TRUE)
|
|
else
|
|
user.do_attack_animation(target)
|
|
consume_everything(target)
|
|
return TRUE
|
|
|
|
/obj/item/melee/supermatter_sword/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
|
..()
|
|
if(ismob(hit_atom))
|
|
var/mob/mob = hit_atom
|
|
if(src.loc == mob)
|
|
mob.dropItemToGround(src, TRUE)
|
|
consume_everything(hit_atom)
|
|
|
|
/obj/item/melee/supermatter_sword/pickup(user)
|
|
..()
|
|
balanced = 0
|
|
icon_state = "supermatter_sword"
|
|
icon_angle = -45
|
|
|
|
/obj/item/melee/supermatter_sword/ex_act(severity, target)
|
|
visible_message(
|
|
span_danger("The blast wave smacks into [src] and rapidly flashes to ash."),
|
|
span_hear("You hear a loud crack as you are washed with a wave of heat.")
|
|
)
|
|
consume_everything()
|
|
return TRUE
|
|
|
|
/obj/item/melee/supermatter_sword/acid_act()
|
|
visible_message(span_danger("The acid smacks into [src] and rapidly flashes to ash."),\
|
|
span_hear("You hear a loud crack as you are washed with a wave of heat."))
|
|
consume_everything()
|
|
return TRUE
|
|
|
|
/obj/item/melee/supermatter_sword/proc/eat_bullets(datum/source, obj/projectile/hitting_projectile)
|
|
SIGNAL_HANDLER
|
|
|
|
visible_message(
|
|
span_danger("[hitting_projectile] smacks into [source] and rapidly flashes to ash."),
|
|
null,
|
|
span_hear("You hear a loud crack as you are washed with a wave of heat."),
|
|
)
|
|
consume_everything(hitting_projectile)
|
|
return COMPONENT_BULLET_BLOCKED
|
|
|
|
/obj/item/melee/supermatter_sword/suicide_act(mob/living/user)
|
|
user.visible_message(span_suicide("[user] touches [src]'s blade. It looks like [user.p_theyre()] tired of waiting for the radiation to kill [user.p_them()]!"))
|
|
user.dropItemToGround(src, TRUE)
|
|
shard.Bumped(user)
|
|
|
|
/obj/item/melee/supermatter_sword/proc/consume_everything(target)
|
|
if(isnull(target))
|
|
shard.Bump(target)
|
|
else if(!isturf(target))
|
|
shard.Bumped(target)
|
|
else
|
|
consume_turf(target)
|
|
|
|
/obj/item/melee/supermatter_sword/proc/consume_turf(turf/turf)
|
|
var/oldtype = turf.type
|
|
var/turf/newT = turf.ScrapeAway(flags = CHANGETURF_INHERIT_AIR)
|
|
if(newT.type == oldtype)
|
|
return
|
|
playsound(turf, 'sound/effects/supermatter.ogg', 50, TRUE)
|
|
turf.visible_message(
|
|
span_danger("[turf] smacks into [src] and rapidly flashes to ash."),
|
|
span_hear("You hear a loud crack as you are washed with a wave of heat."),
|
|
)
|
|
shard.Bump(turf)
|