Skip to content

Commit

Permalink
Should be showing the ghost ship now.
Browse files Browse the repository at this point in the history
Might have broken ghost ships as the stop observe button causes a runtime error for them.
  • Loading branch information
Bobbanz1 committed Nov 9, 2023
1 parent 5fe66e0 commit 65cded0
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 3 deletions.
2 changes: 2 additions & 0 deletions nsv13.dme
Original file line number Diff line number Diff line change
Expand Up @@ -3845,7 +3845,9 @@
#include "nsv13\code\modules\antagonists\simple_teamchat.dm"
#include "nsv13\code\modules\antagonists\boarders\boarders.dm"
#include "nsv13\code\modules\antagonists\boarders\pirate_boarders.dm"
#include "nsv13\code\modules\antagonists\ghostship\ghost_ship.dm"
#include "nsv13\code\modules\antagonists\role_preference\role_antagonists.dm"
#include "nsv13\code\modules\antagonists\role_preference\role_midrounds.dm"
#include "nsv13\code\modules\atmospherics\gasmixtures\reactions.dm"
#include "nsv13\code\modules\atmospherics\machinery\components\binary_devices\constrictor.dm"
#include "nsv13\code\modules\atmospherics\machinery\components\unary_devices\tank.dm"
Expand Down
2 changes: 1 addition & 1 deletion nsv13/code/controllers/subsystem/overmap_mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ SUBSYSTEM_DEF(overmap_mode)
if("Cancel")
return
if("Open")
var/list/mob/dead/observer/candidates = pollGhostCandidates("Do you wish to pilot a [initial(target_ship.faction)] [initial(target_ship.name)]?", ROLE_GHOSTSHIP, null, null, 20 SECONDS, POLL_IGNORE_GHOSTSHIP)
var/list/mob/dead/observer/candidates = pollGhostCandidates("Do you wish to pilot a [initial(target_ship.faction)] [initial(target_ship.name)]?", ROLE_GHOSTSHIP, /datum/role_preference/midround_ghost/ghost_ship, 20 SECONDS, POLL_IGNORE_GHOSTSHIP)
if(LAZYLEN(candidates))
var/mob/dead/observer/C = pick(candidates)
target_ghost = C
Expand Down
8 changes: 8 additions & 0 deletions nsv13/code/modules/antagonists/ghostship/ghost_ship.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/datum/antagonist/ghost_ship
name = "Ghost Ship"
show_name_in_check_antagonists = TRUE
show_in_antagpanel = FALSE
show_in_roundend = FALSE
banning_key = ROLE_GHOSTSHIP

///Used for tracking and because the role_preferences needs an antag_datum to point at.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/datum/role_preference/midround_ghost/ghost_ship
name = "Ghost Ship"
antag_datum = /datum/antagonist/ghost_ship
2 changes: 1 addition & 1 deletion nsv13/code/modules/overmap/ai-skynet.dm
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ Adding tasks is easy! Just define a datum for it.
var/target_location = locate(rand(round(world.maxx/2) + 10, world.maxx - 39), rand(40, world.maxy - 39), OM.z)
var/obj/structure/overmap/selected_ship = pick(ship_list)
var/target_ghost
var/list/mob/dead/observer/candidates = pollGhostCandidates("Do you wish to pilot a [initial(selected_ship.faction)] [initial(selected_ship.name)]?", ROLE_GHOSTSHIP, null, null, 20 SECONDS, POLL_IGNORE_GHOSTSHIP)
var/list/mob/dead/observer/candidates = pollGhostCandidates("Do you wish to pilot a [initial(selected_ship.faction)] [initial(selected_ship.name)]?", ROLE_GHOSTSHIP, /datum/role_preference/midround_ghost/ghost_ship, 20 SECONDS, POLL_IGNORE_GHOSTSHIP)
if(LAZYLEN(candidates))
var/mob/dead/observer/C = pick(candidates)
target_ghost = C
Expand Down
6 changes: 5 additions & 1 deletion nsv13/code/modules/overmap/overmap_ghosts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
if("Cancel")
return
if("Open")
var/list/mob/dead/observer/candidates = pollGhostCandidates("Do you wish to pilot a [src.faction] [src.name]?", ROLE_GHOSTSHIP, null, null, 20 SECONDS, POLL_IGNORE_GHOSTSHIP)
var/list/mob/dead/observer/candidates = pollGhostCandidates("Do you wish to pilot a [src.faction] [src.name]?", ROLE_GHOSTSHIP, /datum/role_preference/midround_ghost/ghost_ship, 20 SECONDS, POLL_IGNORE_GHOSTSHIP)
if(LAZYLEN(candidates))
var/mob/dead/observer/C = pick(candidates)
target_ghost = C
Expand Down Expand Up @@ -79,6 +79,10 @@
ghost.hud_type = /datum/hud //Mostly blank hud
ghost.key = target.key

//More or less a modified version of how the morph antag gets the antag datum.
if(ghost.mind)
ghost.mind.add_antag_datum(/datum/antagonist/ghost_ship)

//Allows player to hear hails
mobs_in_ship += ghost

Expand Down

0 comments on commit 65cded0

Please sign in to comment.