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:
Fluffy
2024-06-08 16:31:36 +00:00
committed by GitHub
parent cf2714621a
commit 9783fa55c9
6 changed files with 85 additions and 15 deletions
+10 -8
View File
@@ -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
+1 -1
View File
@@ -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
@@ -0,0 +1,60 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# - (fixes bugs)
# wip
# - (work in progress)
# qol
# - (quality of life)
# soundadd
# - (adds a sound)
# sounddel
# - (removes a sound)
# rscadd
# - (adds a feature)
# rscdel
# - (removes a feature)
# imageadd
# - (adds an image or sprite)
# imagedel
# - (removes an image or sprite)
# spellcheck
# - (fixes spelling or grammar)
# experiment
# - (experimental change)
# balance
# - (balance changes)
# code_imp
# - (misc internal code change)
# refactor
# - (refactors code)
# config
# - (makes a change to the config files)
# admin
# - (makes changes to administrator tools)
# server
# - (miscellaneous changes to server)
#################################
# Your name.
author: FluffyGhost
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit.
# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog.
changes:
- bugfix: "Fixed ling stings targeting."
- code_imp: "A DMDoc and some SDMM markings."
- code_imp: "Marked one proc for the hostile mobs AI as waitfor = FALSE."