mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 12:29:46 +01:00
Fixed ling stings targeting (#19377)
Fixed ling stings targeting. A DMDoc and some SDMM markings. Marked one proc for the hostile mobs AI as waitfor = FALSE.
This commit is contained in:
+10
-8
@@ -221,15 +221,17 @@
|
||||
|
||||
return 1
|
||||
|
||||
/*
|
||||
Ranged unarmed attack:
|
||||
/**
|
||||
* Ranged unarmed attack:
|
||||
*
|
||||
* This currently is just a default for all mobs, involving
|
||||
* laser eyes and telekinesis. You could easily add exceptions
|
||||
* for things like ranged glove touches, spitting alien acid/neurotoxin,
|
||||
* animals lunging, etc.
|
||||
*/
|
||||
/mob/proc/RangedAttack(atom/A, params)
|
||||
SHOULD_NOT_SLEEP(TRUE)
|
||||
|
||||
This currently is just a default for all mobs, involving
|
||||
laser eyes and telekinesis. You could easily add exceptions
|
||||
for things like ranged glove touches, spitting alien acid/neurotoxin,
|
||||
animals lunging, etc.
|
||||
*/
|
||||
/mob/proc/RangedAttack(var/atom/A, var/params)
|
||||
if((mutations & LASER_EYES) && a_intent == I_HURT)
|
||||
LaserEyes(A, params) // moved into a proc below
|
||||
return
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
/mob/proc/attack_empty_hand(var/bp_hand)
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/RangedAttack(var/atom/A)
|
||||
/mob/living/carbon/human/RangedAttack(atom/A)
|
||||
var/obj/item/clothing/gloves/GV = gloves
|
||||
var/obj/item/clothing/glasses/GS = glasses
|
||||
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
/mob/living/proc/check_sting(var/mob/living/holder, var/atom/target)
|
||||
/mob/living/proc/check_sting(mob/living/holder, atom/target)
|
||||
SHOULD_NOT_SLEEP(TRUE)
|
||||
|
||||
if(isliving(target) && holder.a_intent == I_HURT && holder.mind)
|
||||
var/datum/changeling/changeling = holder.mind.antag_datums[MODE_CHANGELING]
|
||||
if(changeling && changeling.prepared_sting)
|
||||
if(changeling.prepared_sting.can_sting(holder))
|
||||
changeling.prepared_sting.do_sting(holder)
|
||||
if(changeling.prepared_sting.can_sting(target))
|
||||
changeling.prepared_sting.do_sting(target)
|
||||
QDEL_NULL(changeling.prepared_sting)
|
||||
return TRUE
|
||||
|
||||
/mob/living/RangedAttack(var/atom/A, var/params)
|
||||
/mob/living/RangedAttack(atom/A, params)
|
||||
if(!get_active_hand())
|
||||
check_sting(src, A)
|
||||
. = ..()
|
||||
|
||||
@@ -13,7 +13,9 @@
|
||||
required_chems = set_required_chems
|
||||
stealthy = set_stealthy
|
||||
|
||||
/datum/changeling_sting/proc/can_sting(var/mob/living/target)
|
||||
/datum/changeling_sting/proc/can_sting(mob/living/target)
|
||||
SHOULD_NOT_SLEEP(TRUE)
|
||||
|
||||
if(!target || !owner.mind)
|
||||
return FALSE
|
||||
var/datum/changeling/changeling = owner.mind.antag_datums[MODE_CHANGELING]
|
||||
@@ -32,7 +34,9 @@
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/datum/changeling_sting/proc/do_sting(var/mob/living/target)
|
||||
/datum/changeling_sting/proc/do_sting(mob/living/target)
|
||||
SHOULD_NOT_SLEEP(TRUE)
|
||||
|
||||
var/datum/changeling/changeling = owner.mind.antag_datums[MODE_CHANGELING]
|
||||
changeling.use_charges(required_chems)
|
||||
changeling.sting_range = 1
|
||||
|
||||
@@ -324,6 +324,8 @@
|
||||
return TRUE
|
||||
|
||||
/mob/living/simple_animal/hostile/proc/OpenFire(target_mob)
|
||||
set waitfor = FALSE
|
||||
|
||||
if(!see_target())
|
||||
LoseTarget()
|
||||
var/target = target_mob
|
||||
|
||||
Reference in New Issue
Block a user