Files
Sorrowfulwinds eef8a2ef5a Fix cursor icon bug in datum/ability_handler/proc/process_ability() (#7099)
looks like reticles were moved a folder deeper, fixes this.

<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request
Found a dmi file path that was targeting nothing. I'm assuming the next
folder deeper is what was wanted.
<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

## Why It's Good For The Game
Bug fixes 💯 
<!-- Argue for the merits of your changes and how they benefit the game,
especially if they are controversial and/or far reaching. If you can't
actually explain WHY what you are doing will improve the game, then it
probably isn't good for the game in the first place. -->

## Changelog
-Fix filepath in ability_handler proc
<!-- If your PR modifies aspects of the game that can be concretely
observed by players or admins you should add a changelog. If your change
does NOT meet this description, remove this section. Be sure to properly
mark your PRs to prevent unnecessary GBP loss. You can read up on GBP
and it's effects on PRs in the tgstation guides for contributors. Please
note that maintainers freely reserve the right to remove and add tags
should they deem it appropriate. You can attempt to finagle the system
all you want, but it's best to shoot for clear communication right off
the bat. -->

🆑

fix: fixes cursor reticle bug in ability_handler

/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
2025-04-26 11:18:04 -07:00

32 lines
899 B
Plaintext

/datum/ability_handler
var/datum/ability/current
var/target_type
///Is called by the ability
/datum/ability_handler/proc/process_ability(var/datum/ability/ab)
current = ab
switch(current?.targeting_type)
if(ABILITY_TARGET_ALL)
target_type = /atom
if(ABILITY_TARGET_MOB)
target_type = /mob
if(ABILITY_TARGET_TURF)
target_type = /turf
else
target_type = null
return
ab.owner.client.mouse_pointer_icon = file("icons/screen/mouse_pointers/reticle/standard1.dmi")
///Is called by a click if there's an ability in 'current'
/datum/ability_handler/proc/process_click(mob/user, atom/A)
if(current)
if(target_type && !istype(A, target_type))
return FALSE
if(A.atom_flags & ATOM_ABSTRACT)
return FALSE
if(current.target_check(user, A))
current = null
user.client?.mouse_pointer_icon = initial(user.client.mouse_pointer_icon)
return TRUE
return FALSE