mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-28 14:37:04 +01:00
Merge pull request #360 from alex-gh/vox_mutiny
Add Vox Heist directive and call shuttle on completion of Directive X
This commit is contained in:
@@ -249,6 +249,7 @@
|
||||
#include "code\game\gamemodes\mutiny\directives\research_to_ripleys_directive.dm"
|
||||
#include "code\game\gamemodes\mutiny\directives\tau_ceti_needs_women_directive.dm"
|
||||
#include "code\game\gamemodes\mutiny\directives\terminations_directive.dm"
|
||||
#include "code\game\gamemodes\mutiny\directives\vox_heist.dm"
|
||||
#include "code\game\gamemodes\nations\flag_pinpointer.dm"
|
||||
#include "code\game\gamemodes\nations\flagprocs.dm"
|
||||
#include "code\game\gamemodes\nations\nationdatums.dm"
|
||||
|
||||
@@ -63,7 +63,7 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
|
||||
|
||||
//calls the shuttle for an emergency evacuation
|
||||
/datum/emergency_shuttle_controller/proc/call_evac()
|
||||
if(!can_call()) return
|
||||
if(!can_call()) return 0
|
||||
|
||||
//set the launch timer
|
||||
autopilot = 1
|
||||
@@ -80,6 +80,8 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
|
||||
if(istype(A, /area/hallway))
|
||||
A.readyalert()
|
||||
|
||||
return 1
|
||||
|
||||
//calls the shuttle for a routine crew transfer
|
||||
/datum/emergency_shuttle_controller/proc/call_transfer()
|
||||
if(!can_call()) return
|
||||
@@ -134,8 +136,10 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
|
||||
return 1
|
||||
|
||||
/datum/emergency_shuttle_controller/proc/get_shuttle_prep_time()
|
||||
// During mutiny rounds, the shuttle takes twice as long.
|
||||
if(ticker && istype(ticker.mode,/datum/game_mode/mutiny))
|
||||
// During mutiny rounds, the shuttle takes longer. Unless of course the directive is finished.
|
||||
if(!ticker) return SHUTTLE_PREPTIME
|
||||
var/datum/game_mode/mutiny/m = ticker.mode
|
||||
if(istype(m) && !m.ead.activated)
|
||||
return SHUTTLE_PREPTIME * 3 //15 minutes
|
||||
|
||||
return SHUTTLE_PREPTIME
|
||||
@@ -261,4 +265,4 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
|
||||
var/obj/effect/bgstar/S = new/obj/effect/bgstar(locate(x,y,z))
|
||||
S.direction = spawndir
|
||||
spawn()
|
||||
S.startmove()
|
||||
S.startmove()
|
||||
|
||||
+1
-15
@@ -1257,18 +1257,7 @@ datum/mind
|
||||
brigged_since = -1
|
||||
return 0
|
||||
|
||||
var/is_currently_brigged = 0
|
||||
|
||||
if(istype(T.loc,/area/security/brig))
|
||||
is_currently_brigged = 1
|
||||
for(var/obj/item/weapon/card/id/card in current)
|
||||
is_currently_brigged = 0
|
||||
break // if they still have ID they're not brigged
|
||||
for(var/obj/item/device/pda/P in current)
|
||||
if(P.id)
|
||||
is_currently_brigged = 0
|
||||
break // if they still have ID they're not brigged
|
||||
|
||||
var/is_currently_brigged = current.is_in_brig()
|
||||
if(!is_currently_brigged)
|
||||
brigged_since = -1
|
||||
return 0
|
||||
@@ -1278,9 +1267,6 @@ datum/mind
|
||||
|
||||
return (duration <= world.time - brigged_since)
|
||||
|
||||
|
||||
|
||||
|
||||
//Initialisation procs
|
||||
/mob/proc/mind_initialize()
|
||||
if(mind)
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
datum/directive/vox_heist
|
||||
var/list/vox = list()
|
||||
var/list/sympathizers = list()
|
||||
|
||||
proc/get_vox_candidates()
|
||||
var/list/candidates[0]
|
||||
for(var/mob/M in player_list)
|
||||
if(M.is_ready() && is_vox(M))
|
||||
candidates.Add(M)
|
||||
return candidates
|
||||
|
||||
proc/get_sympathizer_candidates()
|
||||
var/list/candidates[0]
|
||||
for(var/mob/M in player_list)
|
||||
if(M.is_ready() && !is_vox(M) && !M.is_mechanical() && M.mind.assigned_role != "Captain")
|
||||
candidates[M] = get_weight(M)
|
||||
return candidates
|
||||
|
||||
proc/is_vox(mob/M)
|
||||
return M.get_species() == "Vox"
|
||||
|
||||
proc/get_weight(mob/M)
|
||||
// You will have a high chance of being regarded as a vox sympathizer if your
|
||||
// relationship with NanoTrasen is negative. Otherwise, command and security
|
||||
// staff are pretty well trusted and maltreated alien races are easy suspects.
|
||||
var/relation = M.client.prefs.nanotrasen_relation
|
||||
if(relation == "Opposed")
|
||||
return 8
|
||||
if(relation == "Skeptical")
|
||||
return 5
|
||||
if(command_positions.Find(M.mind.assigned_role))
|
||||
return 1
|
||||
var/species = M.get_species()
|
||||
if(species == "Tajaran" || species == "Unathi")
|
||||
return 5
|
||||
if(security_positions.Find(M.mind.assigned_role))
|
||||
return 2
|
||||
return 3
|
||||
|
||||
datum/directive/vox_heist/get_description()
|
||||
return {"
|
||||
<p>
|
||||
A vox warship has commandeered a NanoTrasen transport carrying 2,500 cubic meters of liquid plasma.
|
||||
The raiders are willing to return the stolen cargo in exchange for the capture or execution of so-called "vox pariah" that are stationed aboard [station_name()].
|
||||
If the transport is not recovered, the estimated loss of profits is a threat to the solvency of the company.
|
||||
Predictive analysis has identified certain members of the crew as sympathetic to the vox pariah. Detain the sympathizers to guarantee a successful exchange.
|
||||
Lethal force is authorized by the High Command Department of Security. Further information is classified.
|
||||
</p>
|
||||
"}
|
||||
|
||||
datum/directive/vox_heist/initialize()
|
||||
var/list/vox_candidates = get_vox_candidates()
|
||||
for(var/mob/pariah in vox_candidates)
|
||||
vox.Add(pariah.mind)
|
||||
|
||||
special_orders = list(
|
||||
"Brig or kill all Vox Pariah.")
|
||||
|
||||
var/list/sympathizer_candidates = get_sympathizer_candidates()
|
||||
var/list/sympathizer_names = list()
|
||||
var/sympathizer_count = min(rand(2,4), sympathizer_candidates.len)
|
||||
for(var/i=0, i < sympathizer_count, i++)
|
||||
if(!sympathizer_candidates.len)
|
||||
break
|
||||
|
||||
var/mob/candidate = pickweight(sympathizer_candidates)
|
||||
sympathizer_candidates.Remove(candidate)
|
||||
sympathizers.Add(candidate.mind)
|
||||
sympathizer_names.Add("[candidate.mind.assigned_role] [candidate.mind.name]")
|
||||
|
||||
if(sympathizers.len)
|
||||
special_orders.Add("Brig the following sympathizers: [list2text(sympathizer_names, ", ")]")
|
||||
|
||||
datum/directive/vox_heist/meets_prerequisites()
|
||||
var/list/candidates = get_vox_candidates()
|
||||
return candidates.len >= 2
|
||||
|
||||
datum/directive/vox_heist/directives_complete()
|
||||
if(!vox.len && !sympathizers.len)
|
||||
return 1
|
||||
|
||||
for(var/datum/mind/pariah in vox)
|
||||
if(!pariah.current.is_in_brig())
|
||||
return 0
|
||||
|
||||
for(var/datum/mind/sympathizer in sympathizers)
|
||||
if(!sympathizer.current.is_in_brig())
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
datum/directive/vox_heist/get_remaining_orders()
|
||||
var/text = ""
|
||||
for(var/datum/mind/pariah in vox)
|
||||
if(!pariah.current.is_in_brig())
|
||||
text += "<li>Brig or Kill [pariah]</li>"
|
||||
for(var/datum/mind/sympathizer in sympathizers)
|
||||
if(!sympathizer.current.is_in_brig())
|
||||
text += "<li>Brig [sympathizer]</li>"
|
||||
return text
|
||||
|
||||
/hook/death/proc/vox_or_sympathizer_killed(mob/living/carbon/human/deceased, gibbed)
|
||||
var/datum/directive/vox_heist/D = get_directive("vox_heist")
|
||||
if(!D) return 1
|
||||
|
||||
var/datum/mind/M = deceased.mind
|
||||
if(M in D.vox)
|
||||
D.vox.Remove(M)
|
||||
if(M in D.sympathizers)
|
||||
D.sympathizers.Remove(M)
|
||||
return 1
|
||||
@@ -37,6 +37,13 @@
|
||||
else
|
||||
return "Inactive"
|
||||
|
||||
proc/launch_shuttle()
|
||||
spawn(rand(5 SECONDS, 45 SECONDS))
|
||||
if(emergency_shuttle.call_evac())
|
||||
spawn(20 SECONDS)
|
||||
var/text = "[station_name()], we have confirmed your completion of Directive X. An evacuation shuttle is en route to receive your crew for debriefing."
|
||||
command_alert(text, "Emergency Transmission")
|
||||
|
||||
/obj/machinery/emergency_authentication_device/attack_hand(mob/user)
|
||||
if(activated)
|
||||
user << "\blue \The [src] is already active!"
|
||||
@@ -51,6 +58,7 @@
|
||||
activated = 1
|
||||
user << "\blue You activate \the [src]!"
|
||||
state("Command acknowledged. Initiating quantum entanglement relay to NanoTrasen High Command.")
|
||||
launch_shuttle()
|
||||
return
|
||||
|
||||
if(!captains_key && !secondary_key)
|
||||
|
||||
@@ -193,7 +193,7 @@ datum/game_mode/mutiny
|
||||
|
||||
proc/unbolt_vault_door()
|
||||
var/obj/machinery/door/airlock/vault = locate(/obj/machinery/door/airlock/vault)
|
||||
vault.lock()
|
||||
vault.unlock(1)
|
||||
|
||||
proc/make_secret_transcript()
|
||||
var/obj/machinery/computer/telecomms/server/S = locate(/obj/machinery/computer/telecomms/server)
|
||||
|
||||
@@ -812,6 +812,25 @@ var/list/slot_equipment_priority = list( \
|
||||
/mob/proc/is_ready()
|
||||
return client && !!mind
|
||||
|
||||
/mob/proc/is_in_brig()
|
||||
if(!loc || !loc.loc)
|
||||
return 0
|
||||
|
||||
// They should be in a cell or the Brig portion of the shuttle.
|
||||
var/area/A = loc.loc
|
||||
if(!istype(A, /area/security/brig))
|
||||
if(!istype(A, /area/shuttle/escape) || loc.name != "Brig floor")
|
||||
return 0
|
||||
|
||||
// If they still have their ID they're not brigged.
|
||||
for(var/obj/item/weapon/card/id/card in src)
|
||||
return 0
|
||||
for(var/obj/item/device/pda/P in src)
|
||||
if(P.id)
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
/mob/proc/get_gender()
|
||||
return gender
|
||||
|
||||
|
||||
Reference in New Issue
Block a user