mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
Aimed Xeno Spit
- Neurotoxic spit is now an aimed projectile. - Research analyzer action button updated - Framework for adding more aimed things later
This commit is contained in:
@@ -41,6 +41,14 @@
|
||||
/mob/living/carbon/RestrainedClickOn(atom/A)
|
||||
return 0
|
||||
|
||||
//Ranged override abilities for carbons
|
||||
/mob/living/carbon/ClickOn(atom/A, params)
|
||||
if(ranged_ability && !stat)
|
||||
ranged_ability.use_ability(A, src, params) //Spit at something, use a fireball, etc.
|
||||
else
|
||||
return ..(A, params)
|
||||
|
||||
|
||||
/mob/living/carbon/human/RangedAttack(atom/A)
|
||||
if(gloves)
|
||||
var/obj/item/clothing/gloves/G = gloves
|
||||
|
||||
@@ -188,26 +188,49 @@ Doesn't work on other aliens/AI.*/
|
||||
/obj/effect/proc_holder/alien/neurotoxin
|
||||
name = "Spit Neurotoxin"
|
||||
desc = "Spits neurotoxin at someone, paralyzing them for a short time."
|
||||
plasma_cost = 50
|
||||
action_icon_state = "alien_neurotoxin"
|
||||
action_icon_state = "alien_neurotoxin_0"
|
||||
var/active = 0
|
||||
|
||||
/obj/effect/proc_holder/alien/neurotoxin/fire(mob/living/carbon/alien/user)
|
||||
user.visible_message("<span class='danger'>[user] spits neurotoxin!", "<span class='alertalien'>You spit neurotoxin.</span>")
|
||||
/obj/effect/proc_holder/alien/neurotoxin/fire(mob/living/carbon/user)
|
||||
if(active)
|
||||
user.ranged_ability = null
|
||||
user << "<span class='notice'>You empty your neurotoxin gland.</span>"
|
||||
active = 0
|
||||
else if(user.ranged_ability && user.ranged_ability != src)
|
||||
user << "<span class='warning'>You already have another aimed ability readied! Cancel it first."
|
||||
else
|
||||
user.ranged_ability = src
|
||||
active = 1
|
||||
user << "<span class='notice'>You prepare your neurotoxin gland. <B>Left-click to fire at a target!</B></span>"
|
||||
|
||||
action.button_icon_state = "alien_neurotoxin_[active]"
|
||||
action.UpdateButtonIcon()
|
||||
|
||||
/obj/effect/proc_holder/alien/neurotoxin/use_ability(atom/target, mob/living/carbon/alien/user, params)
|
||||
user.face_atom(target)
|
||||
if(user.getPlasma() < 50)
|
||||
user << "<span class='alertalien'>You need at least 50 plasma to spit.</span>"
|
||||
return
|
||||
|
||||
var/turf/T = user.loc
|
||||
var/turf/U = get_step(user, user.dir) // Get the tile infront of the move, based on their direction
|
||||
if(!isturf(U) || !isturf(T))
|
||||
return 0
|
||||
|
||||
user.visible_message("<span class='danger'>[user] spits neurotoxin!", "<span class='alertalien'>You spit neurotoxin.</span>")
|
||||
var/obj/item/projectile/bullet/neurotoxin/A = new /obj/item/projectile/bullet/neurotoxin(user.loc)
|
||||
A.current = U
|
||||
A.yo = U.y - T.y
|
||||
A.xo = U.x - T.x
|
||||
A.preparePixelProjectile(target, get_turf(target), user, params)
|
||||
A.fire()
|
||||
user.newtonian_move(get_dir(U, T))
|
||||
user.adjustPlasma(-50)
|
||||
|
||||
return 1
|
||||
|
||||
/obj/effect/proc_holder/alien/on_lose(mob/living/carbon/user)
|
||||
if(user.ranged_ability == src)
|
||||
user.ranged_ability = null
|
||||
|
||||
|
||||
/obj/effect/proc_holder/alien/resin
|
||||
name = "Secrete Resin"
|
||||
|
||||
@@ -32,3 +32,5 @@
|
||||
var/tinttotal = 0 // Total level of visualy impairing items
|
||||
|
||||
var/list/bodyparts = list() //Gets filled up in the constructor (New() proc in human.dm and monkey.dm)
|
||||
|
||||
var/obj/effect/proc_holder/ranged_ability //Any ranged ability the mob has, as a click override
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
|
||||
var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin verb for now
|
||||
|
||||
/obj/effect/proc_holder/proc/use_ability(atom/A)
|
||||
return
|
||||
|
||||
/obj/effect/proc_holder/spell
|
||||
name = "Spell"
|
||||
desc = "A wizard spell"
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 81 KiB |
Reference in New Issue
Block a user