Skip to content

Commit

Permalink
ghost sight toggle button 👻
Browse files Browse the repository at this point in the history
  • Loading branch information
pali6 committed Jan 15, 2023
1 parent 5aa79c1 commit b56eb53
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 0 deletions.
18 changes: 18 additions & 0 deletions code/datums/abilities/ghost_observer.dm
Expand Up @@ -155,6 +155,7 @@ var/global/datum/spooktober_ghost_handler/spooktober_GH = new()
src.addAbility(/datum/targetable/ghost_observer/observe)
src.addAbility(/datum/targetable/ghost_observer/reenter_corpse)
src.addAbility(/datum/targetable/ghost_observer/toggle_lighting)
src.addAbility(/datum/targetable/ghost_observer/toggle_ghosts)
// src.addAbility(/datum/targetable/ghost_observer/afterlife_Bar)
// src.addAbility(/datum/targetable/ghost_observer/respawn_animal) //moved to respawn_options menu
src.addAbility(/datum/targetable/ghost_observer/respawn_options)
Expand All @@ -181,6 +182,7 @@ var/global/datum/spooktober_ghost_handler/spooktober_GH = new()
src.removeAbility(/datum/targetable/ghost_observer/observe)
src.removeAbility(/datum/targetable/ghost_observer/reenter_corpse)
src.removeAbility(/datum/targetable/ghost_observer/toggle_lighting)
src.removeAbility(/datum/targetable/ghost_observer/toggle_ghosts)
// src.removeAbility(/datum/targetable/ghost_observer/afterlife_Bar)
// src.removeAbility(/datum/targetable/ghost_observer/respawn_animal)
src.removeAbility(/datum/targetable/ghost_observer/respawn_options)
Expand Down Expand Up @@ -288,6 +290,22 @@ var/global/datum/spooktober_ghost_handler/spooktober_GH = new()
else
boutput(usr, "Oop! Something broke! Just type \"Toggle Lighting\" (without the quotation marks) into the bottom bar.")


/datum/targetable/ghost_observer/toggle_ghosts
name = "Toggle Seeing Ghosts"
desc = "Toggle seeing other ghosts."
icon_state = "toggle-ghosts"
targeted = 0
cooldown = 0

cast(atom/target)
if (holder && istype(holder.owner, /mob/dead/observer))
var/mob/dead/observer/ghost = holder.owner
ghost.toggle_ghosts()
else
boutput(usr, "Oop! Something broke! Just type \"Toggle Ghosts\" (without the quotation marks) into the bottom bar.")


/datum/targetable/ghost_observer/toggle_HUD
name = "Hide HUD"
desc = "Hide all HUD buttons."
Expand Down
17 changes: 17 additions & 0 deletions code/mob/dead/observer.dm
Expand Up @@ -627,6 +627,23 @@
else
boutput( usr, "Well, I want to, but you don't have any lights to fix!" )


/mob/dead/observer/verb/toggle_ghosts()
set name = "Toggle Ghosts"
set category = null

if (src.see_invisible >= INVIS_GHOST)
src.see_invisible = INVIS_NONE
boutput(src, "You can no longer see other ghosts.", group="ghostsight")
else if(HAS_FLAG(src.sight, SEE_SELF))
src.sight &= ~SEE_SELF
boutput(src, "You can no longer see yourself.", group="ghostsight")
else
src.see_invisible = INVIS_SPOOKY
src.sight |= SEE_SELF
boutput(src, "You can now see other ghosts and yourself.", group="ghostsight")


/mob/dead/observer/verb/observe()
set name = "Observe"
set category = null
Expand Down
Binary file modified icons/mob/ghost_observer_abilities.dmi
Binary file not shown.
2 changes: 2 additions & 0 deletions strings/changelog.txt
@@ -1,5 +1,7 @@

(t)sun jan 15 23
(u)pali & Shiiba
(*)Ghosts now have a button to toggle seeing other ghosts and even themselves.
(u)FlameArrow57
(p)11684
(e)⚖🧛|C-Balance, A-Gamemodes
Expand Down

0 comments on commit b56eb53

Please sign in to comment.