mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-31 12:01:47 +00:00
* Modernizing Radiation -- TL;DR: Radiation is now a status effect healed by tox healing, and contamination is removed * Fixing conflicts * Makes it compile, yeet all the RAD armor from everywhere (thanks RegEx!) * Removing more lingering rad armor (woo) * Damnit powerarmors * Bye bye rad collectors! Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com> Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
153 lines
4.8 KiB
Plaintext
153 lines
4.8 KiB
Plaintext
/obj/item/singularityhammer
|
|
name = "singularity hammer"
|
|
desc = "The pinnacle of close combat technology, the hammer harnesses the power of a miniaturized singularity to deal crushing blows."
|
|
icon_state = "singularity_hammer0"
|
|
base_icon_state = "singularity_hammer"
|
|
lefthand_file = 'icons/mob/inhands/weapons/hammers_lefthand.dmi'
|
|
righthand_file = 'icons/mob/inhands/weapons/hammers_righthand.dmi'
|
|
worn_icon_state = "singularity_hammer"
|
|
flags_1 = CONDUCT_1
|
|
slot_flags = ITEM_SLOT_BACK
|
|
force = 5
|
|
throwforce = 15
|
|
throw_range = 1
|
|
w_class = WEIGHT_CLASS_HUGE
|
|
armor = list(MELEE = 50, BULLET = 50, LASER = 50, ENERGY = 0, BOMB = 50, BIO = 0, FIRE = 100, ACID = 100)
|
|
resistance_flags = FIRE_PROOF | ACID_PROOF
|
|
force_string = "LORD SINGULOTH HIMSELF"
|
|
///Is it able to pull shit right now?
|
|
var/charged = TRUE
|
|
///track wielded status on item
|
|
var/wielded = FALSE
|
|
|
|
/obj/item/singularityhammer/Initialize(mapload)
|
|
. = ..()
|
|
RegisterSignal(src, COMSIG_TWOHANDED_WIELD, .proc/on_wield)
|
|
RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, .proc/on_unwield)
|
|
AddElement(/datum/element/kneejerk)
|
|
|
|
/obj/item/singularityhammer/ComponentInitialize()
|
|
. = ..()
|
|
AddComponent(/datum/component/two_handed, force_multiplier=4, icon_wielded="[base_icon_state]1")
|
|
|
|
///triggered on wield of two handed item
|
|
/obj/item/singularityhammer/proc/on_wield(obj/item/source, mob/user)
|
|
SIGNAL_HANDLER
|
|
|
|
wielded = TRUE
|
|
|
|
///triggered on unwield of two handed item
|
|
/obj/item/singularityhammer/proc/on_unwield(obj/item/source, mob/user)
|
|
SIGNAL_HANDLER
|
|
|
|
wielded = FALSE
|
|
|
|
/obj/item/singularityhammer/update_icon_state()
|
|
icon_state = "[base_icon_state]0"
|
|
return ..()
|
|
|
|
/obj/item/singularityhammer/proc/recharge()
|
|
charged = TRUE
|
|
|
|
/obj/item/singularityhammer/proc/vortex(turf/pull, mob/wielder)
|
|
for(var/atom/X in orange(5,pull))
|
|
if(ismovable(X))
|
|
var/atom/movable/A = X
|
|
if(A == wielder)
|
|
continue
|
|
if(A && !A.anchored && !ishuman(X) && !isobserver(X))
|
|
step_towards(A,pull)
|
|
step_towards(A,pull)
|
|
step_towards(A,pull)
|
|
else if(ishuman(X))
|
|
var/mob/living/carbon/human/H = X
|
|
if(istype(H.shoes, /obj/item/clothing/shoes/magboots))
|
|
var/obj/item/clothing/shoes/magboots/M = H.shoes
|
|
if(M.magpulse)
|
|
continue
|
|
H.apply_effect(20, EFFECT_PARALYZE, 0)
|
|
step_towards(H,pull)
|
|
step_towards(H,pull)
|
|
step_towards(H,pull)
|
|
|
|
/obj/item/singularityhammer/afterattack(atom/A as mob|obj|turf|area, mob/living/user, proximity)
|
|
. = ..()
|
|
if(!proximity)
|
|
return
|
|
if(wielded)
|
|
if(charged)
|
|
charged = FALSE
|
|
if(istype(A, /mob/living/))
|
|
var/mob/living/Z = A
|
|
Z.take_bodypart_damage(20,0)
|
|
playsound(user, 'sound/weapons/marauder.ogg', 50, TRUE)
|
|
var/turf/target = get_turf(A)
|
|
vortex(target,user)
|
|
addtimer(CALLBACK(src, .proc/recharge), 100)
|
|
|
|
/obj/item/mjollnir
|
|
name = "Mjolnir"
|
|
desc = "A weapon worthy of a god, able to strike with the force of a lightning bolt. It crackles with barely contained energy."
|
|
icon_state = "mjollnir0"
|
|
base_icon_state = "mjollnir"
|
|
worn_icon_state = "mjolnir"
|
|
lefthand_file = 'icons/mob/inhands/weapons/hammers_lefthand.dmi'
|
|
righthand_file = 'icons/mob/inhands/weapons/hammers_righthand.dmi'
|
|
flags_1 = CONDUCT_1
|
|
slot_flags = ITEM_SLOT_BACK
|
|
force = 5
|
|
throwforce = 30
|
|
throw_range = 7
|
|
w_class = WEIGHT_CLASS_HUGE
|
|
var/wielded = FALSE // track wielded status on item
|
|
|
|
/obj/item/mjollnir/Initialize(mapload)
|
|
. = ..()
|
|
RegisterSignal(src, COMSIG_TWOHANDED_WIELD, .proc/on_wield)
|
|
RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, .proc/on_unwield)
|
|
|
|
/obj/item/mjollnir/ComponentInitialize()
|
|
. = ..()
|
|
AddComponent(/datum/component/two_handed, force_multiplier=5, icon_wielded="[base_icon_state]1", attacksound="sparks")
|
|
|
|
/// triggered on wield of two handed item
|
|
/obj/item/mjollnir/proc/on_wield(obj/item/source, mob/user)
|
|
SIGNAL_HANDLER
|
|
|
|
wielded = TRUE
|
|
|
|
/// triggered on unwield of two handed item
|
|
/obj/item/mjollnir/proc/on_unwield(obj/item/source, mob/user)
|
|
SIGNAL_HANDLER
|
|
|
|
wielded = FALSE
|
|
|
|
/obj/item/mjollnir/update_icon_state()
|
|
icon_state = "[base_icon_state]0"
|
|
return ..()
|
|
|
|
/obj/item/mjollnir/proc/shock(mob/living/target)
|
|
target.Stun(1.5 SECONDS)
|
|
target.Knockdown(10 SECONDS)
|
|
var/datum/effect_system/lightning_spread/s = new /datum/effect_system/lightning_spread
|
|
s.set_up(5, 1, target.loc)
|
|
s.start()
|
|
target.visible_message(span_danger("[target.name] is shocked by [src]!"), \
|
|
span_userdanger("You feel a powerful shock course through your body sending you flying!"), \
|
|
span_hear("You hear a heavy electrical crack!"))
|
|
var/atom/throw_target = get_edge_target_turf(target, get_dir(src, get_step_away(target, src)))
|
|
target.throw_at(throw_target, 200, 4)
|
|
return
|
|
|
|
/obj/item/mjollnir/attack(mob/living/M, mob/user)
|
|
..()
|
|
if(HAS_TRAIT(user, TRAIT_PACIFISM))
|
|
return
|
|
if(wielded)
|
|
shock(M)
|
|
|
|
/obj/item/mjollnir/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
|
. = ..()
|
|
if(isliving(hit_atom))
|
|
shock(hit_atom)
|