Skip to content

Commit

Permalink
ton of other stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
dwasint committed Oct 7, 2023
1 parent db341f7 commit facdb41
Show file tree
Hide file tree
Showing 10 changed files with 693 additions and 4 deletions.
4 changes: 4 additions & 0 deletions code/__DEFINES/hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@
#define ui_ghost_minigames "SOUTH: 6, CENTER+2:24"
#define ui_ghost_language_menu "SOUTH: 22, CENTER+3:8"

//Team finder

#define ui_team_finder "CENTER,CENTER"

//Blobbernauts
#define ui_blobbernaut_overmind_health "EAST-1:28,CENTER+0:19"

Expand Down
9 changes: 9 additions & 0 deletions code/_onclick/hud/hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
// subtypes can override this to force a specific UI style
var/ui_style

var/list/team_finder_arrows = list()

/datum/hud/New(mob/owner)
mymob = owner

Expand Down Expand Up @@ -209,6 +211,7 @@ GLOBAL_LIST_INIT(available_ui_styles, list(

QDEL_NULL(module_store_icon)
QDEL_LIST(static_inventory)
QDEL_LIST(team_finder_arrows)

inv_slots.Cut()
action_intent = null
Expand Down Expand Up @@ -317,6 +320,8 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
screenmob.client.screen += hotkeybuttons
if(infodisplay.len)
screenmob.client.screen += infodisplay
if(team_finder_arrows.len)
screenmob.client.screen += team_finder_arrows
if(always_visible_inventory.len)
screenmob.client.screen += always_visible_inventory

Expand All @@ -329,12 +334,16 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
hud_shown = FALSE //Governs behavior of other procs
if(static_inventory.len)
screenmob.client.screen -= static_inventory
if(team_finder_arrows.len)
screenmob.client.screen += team_finder_arrows
if(toggleable_inventory.len)
screenmob.client.screen -= toggleable_inventory
if(hotkeybuttons.len)
screenmob.client.screen -= hotkeybuttons
if(infodisplay.len)
screenmob.client.screen += infodisplay
if(team_finder_arrows.len)
screenmob.client.screen -= team_finder_arrows
if(always_visible_inventory.len)
screenmob.client.screen += always_visible_inventory

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

/datum/action/cooldown/slasher/incorporealize/PreActivate(atom/target)
. = ..()
var/mob/living/carbon/human/human = owner
var/datum/antagonist/slasher/slasherdatum = owner.mind.has_antag_datum(/datum/antagonist/slasher)
if(slasherdatum && (slasherdatum.soul_punishment >= 2))
return FALSE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@

/datum/action/cooldown/slasher/summon_machette/Destroy()
. = ..()
qdel(stored_machette)
stored_machette = null
QDEL_NULL(stored_machette)

/datum/action/cooldown/slasher/summon_machette/Activate(atom/target)
. = ..()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
var/mob/living/carbon/human/human_owner = owner
var/datum/antagonist/slasher/slasherdatum = human_owner.mind.has_antag_datum(/datum/antagonist/slasher)
if(slasherdatum)
if(last_soul_sucked + soul_digestion > world.time)
if(slasherdatum.last_soul_sucked + slasherdatum.soul_digestion > world.time)
to_chat(owner, span_boldwarning("You can feel your mind slipping, you feel as though bad things will happen if you absorb another soul so quickly!"))
per_soul_suck = 5 SECONDS

Expand Down
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

View workflow job for this annotation

GitHub Actions / Run Linters

undefined var: "stalked_human"

Check warning on line 29 in monkestation/code/modules/new_antagonists/slasher/abilities/stalk_target.dm

View workflow job for this annotation

GitHub Actions / Run Linters

field access requires static type: "tracking_beacon"

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)
Loading

0 comments on commit facdb41

Please sign in to comment.