mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 08:08:49 +01:00
Merge pull request #12389 from KorPhaeron/MEDIOCRE
Makeshift explosive lances
This commit is contained in:
@@ -303,8 +303,69 @@
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
attack_verb = list("attacked", "poked", "jabbed", "torn", "gored")
|
||||
sharpness = IS_SHARP
|
||||
var/obj/item/weapon/grenade/explosive = null
|
||||
var/war_cry = "AAAAARGH!!!"
|
||||
|
||||
/obj/item/weapon/twohanded/spear/update_icon()
|
||||
icon_state = "spearglass[wielded]"
|
||||
return
|
||||
if(explosive)
|
||||
icon_state = "spearbomb[wielded]"
|
||||
else
|
||||
icon_state = "spearglass[wielded]"
|
||||
|
||||
/obj/item/weapon/twohanded/spear/afterattack(atom/movable/AM, mob/user, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if(istype(AM, /turf/simulated/floor)) //So you can actually melee with it
|
||||
return
|
||||
if(istype(AM, /turf/space)) //So you can actually melee with it
|
||||
return
|
||||
if(explosive && wielded)
|
||||
user.say("[war_cry]")
|
||||
explosive.loc = AM
|
||||
explosive.prime()
|
||||
qdel(src)
|
||||
|
||||
//THIS MIGHT BE UNBALANCED SO I DUNNO
|
||||
/obj/item/weapon/twohanded/spear/throw_impact(atom/target)
|
||||
. = ..()
|
||||
if(explosive)
|
||||
explosive.prime()
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/item/weapon/twohanded/spear/AltClick()
|
||||
..()
|
||||
if(!explosive)
|
||||
return
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
var/input = stripped_input(M,"What do you want your war cry to be? You will shout it when you hit someone in melee.", ,"", 50)
|
||||
if(input)
|
||||
src.war_cry = input
|
||||
|
||||
//Placeholder C4 "grenade" for use on this spear
|
||||
/obj/item/weapon/grenade/C4
|
||||
name = "C-4"
|
||||
desc = "A brick of C-4."
|
||||
|
||||
/obj/item/weapon/grenade/C4/prime()
|
||||
update_mob()
|
||||
explosion(src.loc,-1,1,3)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/twohanded/spear/CheckParts()
|
||||
if(explosive)
|
||||
explosive.loc = get_turf(src.loc)
|
||||
explosive = null
|
||||
var/obj/item/weapon/grenade/G = locate() in contents
|
||||
if(G)
|
||||
explosive = G
|
||||
name = "explosive lance"
|
||||
desc = "A makeshift spear with [G] attached to it. Alt+click on the spear to set your war cry!"
|
||||
return
|
||||
var/obj/item/weapon/c4/C4 = locate() in contents
|
||||
if(C4)
|
||||
var /obj/item/weapon/grenade/C4/C42 = new /obj/item/weapon/grenade/C4(src)
|
||||
qdel(C4)
|
||||
explosive = C42
|
||||
desc = "A makeshift spear with [C42] attached to it. Alt+click on the spear to set your war cry!"
|
||||
|
||||
Reference in New Issue
Block a user