-
Notifications
You must be signed in to change notification settings - Fork 270
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
693 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
monkestation/code/modules/new_antagonists/slasher/abilities/stalk_target.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/mob/living | ||
/// A weak reference to the team monitor component contained within the monitor holder, used for certain antagoists so they can track | ||
var/datum/component/team_monitor/team_monitor | ||
///a reference to a stored /datum/component/tracking_beacon used by victims of antags | ||
var/datum/component/tracking_beacon/tracking_beacon | ||
|
||
/datum/action/cooldown/slasher/stalk_target | ||
name = "Stalk Target" | ||
desc = "Get a target to stalk, standing near them for 3 minutes will rip their soul from their body. YOU MUST PROTECT THEM FROM HARM." | ||
|
||
button_icon_state = "slasher_posses" | ||
|
||
cooldown_time = 5 MINUTES | ||
|
||
/datum/action/cooldown/slasher/stalk_target/Activate(atom/target) | ||
. = ..() | ||
var/list/possible_targets = list() | ||
for(var/datum/mind/possible_target as anything in get_crewmember_minds()) | ||
if(possible_target == owner.mind) | ||
continue | ||
if(!ishuman(possible_target.current)) | ||
continue | ||
if(possible_target.current.stat == DEAD) | ||
continue | ||
possible_targets += possible_target.current | ||
|
||
var/datum/antagonist/slasher/slasherdatum = owner.mind.has_antag_datum(/datum/antagonist/slasher) | ||
if(slasherdatum && slasherdatum.stalked_human) | ||
qdel(stalked_human.tracking_beacon) | ||
Check failure on line 29 in monkestation/code/modules/new_antagonists/slasher/abilities/stalk_target.dm GitHub Actions / Run Linters
|
||
|
||
var/mob/living/living_target = pick(possible_targets) | ||
var/mob/living/carbon/human/owner_human = owner | ||
if(!owner_human.team_monitor) | ||
owner_human.tracking_beacon = owner_human.AddComponent(/datum/component/tracking_beacon, "slasher", null, null, TRUE, "#00660e") | ||
owner_human.team_monitor = owner_human.AddComponent(/datum/component/team_monitor, "slasher", null, owner_human.tracking_beacon) | ||
|
||
living_target.tracking_beacon = living_target.AddComponent(/datum/component/tracking_beacon, "slasher", null, null, TRUE, "#660000") | ||
if(slasherdatum) | ||
slasherdatum.stalked_human = living_target | ||
owner_human.team_monitor.add_to_tracking_network(living_target.tracking_beacon) | ||
owner_human.team_monitor.show_hud(owner_human) |
Oops, something went wrong.