mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-18 04:55:27 +00:00
About The Pull Request Converts every single usage of playsound's vary parameter to use the boolean define instead of 1 or 0. I'm tired of people copypasting the incorrect usage. Also changes a couple of places where a list was picked from instead of using get_sfx internal calls This was done via regex: (playsound\(.+,.+,.+, ?)1( ?\)| ?,.+\)) to match 1 (playsound\(.+,.+,.+, ?)0( ?\)| ?,.+\)) to match 0 full sed commands: /(playsound\(.+,.+,.+, ?)1( ?\)| ?,.+\))/\1TRUE\2/ 1 to TRUE /(playsound\(.+,.+,.+, ?)0( ?\)| ?,.+\))/\1FALSE\2/ 0 to FALSE I'm not very good with regex and these could probably be optimized, but they worked. Why It's Good For The Game Code usability
114 lines
3.8 KiB
Plaintext
114 lines
3.8 KiB
Plaintext
/obj/item/twohanded/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 = "mjollnir0"
|
|
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
|
|
force_unwielded = 5
|
|
force_wielded = 20
|
|
throwforce = 15
|
|
throw_range = 1
|
|
w_class = WEIGHT_CLASS_HUGE
|
|
var/charged = 5
|
|
armor = list("melee" = 50, "bullet" = 50, "laser" = 50, "energy" = 0, "bomb" = 50, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
|
|
resistance_flags = FIRE_PROOF | ACID_PROOF
|
|
force_string = "LORD SINGULOTH HIMSELF"
|
|
|
|
/obj/item/twohanded/singularityhammer/New()
|
|
..()
|
|
START_PROCESSING(SSobj, src)
|
|
|
|
/obj/item/twohanded/singularityhammer/Destroy()
|
|
STOP_PROCESSING(SSobj, src)
|
|
return ..()
|
|
|
|
/obj/item/twohanded/singularityhammer/process()
|
|
if(charged < 5)
|
|
charged++
|
|
return
|
|
|
|
/obj/item/twohanded/singularityhammer/update_icon() //Currently only here to fuck with the on-mob icons.
|
|
icon_state = "mjollnir[wielded]"
|
|
return
|
|
|
|
/obj/item/twohanded/singularityhammer/proc/vortex(turf/pull, mob/wielder)
|
|
for(var/atom/X in orange(5,pull))
|
|
if(ismovableatom(X))
|
|
var/atom/movable/A = X
|
|
if(A == wielder)
|
|
continue
|
|
if(A && !A.anchored && !ishuman(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)
|
|
return
|
|
|
|
/obj/item/twohanded/singularityhammer/afterattack(atom/A as mob|obj|turf|area, mob/user, proximity)
|
|
. = ..()
|
|
if(!proximity)
|
|
return
|
|
if(wielded)
|
|
if(charged == 5)
|
|
charged = 0
|
|
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)
|
|
|
|
/obj/item/twohanded/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"
|
|
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
|
|
force_unwielded = 5
|
|
force_wielded = 25
|
|
throwforce = 30
|
|
throw_range = 7
|
|
w_class = WEIGHT_CLASS_HUGE
|
|
|
|
/obj/item/twohanded/mjollnir/proc/shock(mob/living/target)
|
|
target.Stun(60)
|
|
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 class='danger'>[target.name] was shocked by [src]!</span>", \
|
|
"<span class='userdanger'>You feel a powerful shock course through your body sending you flying!</span>", \
|
|
"<span class='italics'>You hear a heavy electrical crack!</span>")
|
|
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/twohanded/mjollnir/attack(mob/living/M, mob/user)
|
|
..()
|
|
if(wielded)
|
|
playsound(src.loc, "sparks", 50, TRUE)
|
|
shock(M)
|
|
|
|
/obj/item/twohanded/mjollnir/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
|
. = ..()
|
|
if(isliving(hit_atom))
|
|
shock(hit_atom)
|
|
|
|
/obj/item/twohanded/mjollnir/update_icon() //Currently only here to fuck with the on-mob icons.
|
|
icon_state = "mjollnir[wielded]"
|
|
return
|