Part 2 - Missing stuff from original families port
This commit is contained in:
@@ -18,6 +18,10 @@ GLOBAL_LIST_EMPTY(antagonists)
|
||||
var/antag_hud_name
|
||||
/// If above 0, this is the multiplier for the speed at which we hijack the shuttle. Do not directly read, use hijack_speed().
|
||||
var/hijack_speed = 0
|
||||
/// The battlecry this antagonist shouts when suiciding with C4/X4.
|
||||
var/suicide_cry = ""
|
||||
/// The typepath for the outfit to show in the preview for the preferences menu.
|
||||
var/preview_outfit
|
||||
|
||||
//Antag panel properties
|
||||
var/show_in_antagpanel = TRUE //This will hide adding this antag type in antag panel, use only for internal subtypes that shouldn't be added directly but still show if possessed by mind
|
||||
@@ -29,6 +33,13 @@ GLOBAL_LIST_EMPTY(antagonists)
|
||||
|
||||
var/list/skill_modifiers
|
||||
|
||||
//ANTAG UI
|
||||
|
||||
///name of the UI that will try to open, right now using a generic ui
|
||||
var/ui_name = "AntagInfoGeneric"
|
||||
///button to access antag interface
|
||||
var/datum/action/antag_info/info_button
|
||||
|
||||
/datum/antagonist/New()
|
||||
GLOB.antagonists += src
|
||||
typecache_datum_blacklist = typecacheof(typecache_datum_blacklist)
|
||||
@@ -106,8 +117,15 @@ GLOBAL_LIST_EMPTY(antagonists)
|
||||
set waitfor = FALSE
|
||||
if(!(owner?.current))
|
||||
return
|
||||
if(ui_name)//in the future, this should entirely replace greet.
|
||||
info_button = new(owner.current, src)
|
||||
info_button.Grant(owner.current)
|
||||
if(!silent)
|
||||
greet()
|
||||
if(ui_name)
|
||||
to_chat(owner.current, span_big("You are \a [src]."))
|
||||
to_chat(owner.current, span_boldnotice("For more info, read the panel. you can always come back to it using the button in the top left."))
|
||||
info_button.Trigger()
|
||||
apply_innate_effects()
|
||||
give_antag_moodies()
|
||||
remove_blacklisted_quirks()
|
||||
@@ -257,6 +275,43 @@ GLOBAL_LIST_EMPTY(antagonists)
|
||||
/datum/antagonist/proc/get_admin_commands()
|
||||
. = list()
|
||||
|
||||
/// Creates an icon from the preview outfit.
|
||||
/// Custom implementors of `get_preview_icon` should use this, as the
|
||||
/// result of `get_preview_icon` is expected to be the completed version.
|
||||
/datum/antagonist/proc/render_preview_outfit(datum/outfit/outfit, mob/living/carbon/human/dummy)
|
||||
dummy = dummy || new /mob/living/carbon/human/dummy/consistent
|
||||
dummy.equipOutfit(outfit, visualsOnly = TRUE)
|
||||
COMPILE_OVERLAYS(dummy)
|
||||
var/icon = getFlatIcon(dummy)
|
||||
|
||||
// We don't want to qdel the dummy right away, since its items haven't initialized yet.
|
||||
SSatoms.prepare_deletion(dummy)
|
||||
|
||||
return icon
|
||||
|
||||
/// Given an icon, will crop it to be consistent of those in the preferences menu.
|
||||
/// Not necessary, and in fact will look bad if it's anything other than a human.
|
||||
/datum/antagonist/proc/finish_preview_icon(icon/icon)
|
||||
// Zoom in on the top of the head and the chest
|
||||
// I have no idea how to do this dynamically.
|
||||
icon.Scale(115, 115)
|
||||
|
||||
// This is probably better as a Crop, but I cannot figure it out.
|
||||
icon.Shift(WEST, 8)
|
||||
icon.Shift(SOUTH, 30)
|
||||
|
||||
icon.Crop(1, 1, ANTAGONIST_PREVIEW_ICON_SIZE, ANTAGONIST_PREVIEW_ICON_SIZE)
|
||||
|
||||
return icon
|
||||
|
||||
/// Returns the icon to show on the preferences menu.
|
||||
/datum/antagonist/proc/get_preview_icon()
|
||||
if (isnull(preview_outfit))
|
||||
return null
|
||||
|
||||
return finish_preview_icon(render_preview_outfit(preview_outfit))
|
||||
|
||||
|
||||
/datum/antagonist/Topic(href,href_list)
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
@@ -308,3 +363,22 @@ GLOBAL_LIST_EMPTY(antagonists)
|
||||
else
|
||||
return
|
||||
..()
|
||||
|
||||
//button for antags to review their descriptions/info
|
||||
|
||||
/datum/action/antag_info
|
||||
name = "Open Antag Information:"
|
||||
button_icon_state = "round_end"
|
||||
var/datum/antagonist/antag_datum
|
||||
|
||||
/datum/action/antag_info/New(Target, datum/antagonist/antag_datum)
|
||||
. = ..()
|
||||
src.antag_datum = antag_datum
|
||||
name += " [antag_datum.name]"
|
||||
|
||||
/datum/action/antag_info/Trigger()
|
||||
if(antag_datum)
|
||||
antag_datum.ui_interact(owner)
|
||||
|
||||
/datum/action/antag_info/IsAvailable()
|
||||
return TRUE
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
GLOBAL_LIST_EMPTY(antagonist_teams)
|
||||
|
||||
//A barebones antagonist team.
|
||||
/datum/team
|
||||
var/list/datum/mind/members = list()
|
||||
@@ -8,6 +10,7 @@
|
||||
|
||||
/datum/team/New(starting_members)
|
||||
. = ..()
|
||||
GLOB.antagonist_teams += src
|
||||
if(starting_members)
|
||||
if(islist(starting_members))
|
||||
for(var/datum/mind/M in starting_members)
|
||||
@@ -15,6 +18,10 @@
|
||||
else
|
||||
add_member(starting_members)
|
||||
|
||||
/datum/team/Destroy(force, ...)
|
||||
GLOB.antagonist_teams -= src
|
||||
. = ..()
|
||||
|
||||
/datum/team/proc/is_solo()
|
||||
return members.len == 1
|
||||
|
||||
|
||||
@@ -11,14 +11,21 @@
|
||||
var/role = "Security Officer"
|
||||
var/list/name_source
|
||||
threat = -5
|
||||
var/random_names = TRUE
|
||||
var/rip_and_tear = FALSE
|
||||
var/equip_ert = TRUE
|
||||
var/forge_objectives_for_ert = TRUE
|
||||
show_in_antagpanel = FALSE
|
||||
show_to_ghosts = TRUE
|
||||
antag_moodlet = /datum/mood_event/focused
|
||||
|
||||
/datum/antagonist/ert/on_gain()
|
||||
update_name()
|
||||
forge_objectives()
|
||||
equipERT()
|
||||
if(random_names)
|
||||
update_name()
|
||||
if(forge_objectives_for_ert)
|
||||
forge_objectives()
|
||||
if(equip_ert)
|
||||
equipERT()
|
||||
. = ..()
|
||||
|
||||
/datum/antagonist/ert/get_team()
|
||||
@@ -129,6 +136,7 @@
|
||||
return
|
||||
H.equipOutfit(outfit)
|
||||
|
||||
|
||||
/datum/antagonist/ert/greet()
|
||||
if(!ert_team)
|
||||
return
|
||||
@@ -160,3 +168,99 @@
|
||||
|
||||
missiondesc += "<BR><B>Your Mission</B> : [ert_team.mission.explanation_text]"
|
||||
to_chat(owner,missiondesc)
|
||||
|
||||
|
||||
/datum/antagonist/ert/families
|
||||
name = "Space Police Responder"
|
||||
antag_hud_type = ANTAG_HUD_SPACECOP
|
||||
antag_hud_name = "hud_spacecop"
|
||||
|
||||
/datum/antagonist/ert/families/apply_innate_effects(mob/living/mob_override)
|
||||
..()
|
||||
var/mob/living/M = mob_override || owner.current
|
||||
add_antag_hud(antag_hud_type, antag_hud_name, M)
|
||||
|
||||
|
||||
/datum/antagonist/ert/families/remove_innate_effects(mob/living/mob_override)
|
||||
var/mob/living/M = mob_override || owner.current
|
||||
remove_antag_hud(antag_hud_type, M)
|
||||
..()
|
||||
|
||||
/datum/antagonist/ert/families/greet()
|
||||
to_chat(owner, "<B><font size=3 color=red>You are the [name].</font></B>")
|
||||
|
||||
var/missiondesc = "After an uptick in gang violence on [station_name()], you are responding to emergency calls from the station for immediate SSC Police assistance!\n"
|
||||
missiondesc += "<BR><B>Your Mission</B>:"
|
||||
missiondesc += "<BR> <B>1.</B> Secure the situation and crack down on any gang activity. You can view gangsters with your sunglasses."
|
||||
missiondesc += "<BR> <B>2.</B> There is an undercover police officer on station. Secure him, receive his intel, and extract him safely."
|
||||
missiondesc += "<BR> <B>3.</B> Minimize civilian casualties, but defend yourself and civilians from hostile gangsters."
|
||||
missiondesc += "<BR> <B>3.</B> If Security is found to be violating the rights of citizens, detain them as per your authority as Spinward Stellar Coalition officers."
|
||||
missiondesc += "<BR> <B>4.</B> If the situation demands it, evacuate the station. Otherwise, remain on station and keep the peace."
|
||||
to_chat(owner,missiondesc)
|
||||
|
||||
/datum/antagonist/ert/families/undercover_cop
|
||||
name = "Undercover Cop"
|
||||
role = "Undercover Cop"
|
||||
outfit = /datum/outfit/families_police/beatcop
|
||||
var/free_clothes = list(/obj/item/clothing/glasses/hud/spacecop/hidden,
|
||||
/obj/item/clothing/under/rank/security/officer/beatcop,
|
||||
/obj/item/clothing/head/spacepolice)
|
||||
forge_objectives_for_ert = FALSE
|
||||
equip_ert = FALSE
|
||||
random_names = FALSE
|
||||
|
||||
/datum/antagonist/ert/families/undercover_cop/on_gain()
|
||||
for(var/C in free_clothes)
|
||||
var/obj/O = new C(owner.current)
|
||||
var/list/slots = list (
|
||||
"backpack" = ITEM_SLOT_BACKPACK,
|
||||
"left pocket" = SLOT_L_STORE,
|
||||
"right pocket" = SLOT_R_STORE
|
||||
)
|
||||
var/mob/living/carbon/human/H = owner.current
|
||||
var/equipped = H.equip_in_one_of_slots(O, slots)
|
||||
if(!equipped)
|
||||
to_chat(owner.current, "Unfortunately, you could not bring your [O] to this shift. You will need to find one.")
|
||||
qdel(O)
|
||||
. = ..()
|
||||
|
||||
|
||||
/datum/antagonist/ert/families/undercover_cop/greet()
|
||||
to_chat(owner, "<B><font size=3 color=red>You are the [name].</font></B>")
|
||||
|
||||
var/missiondesc = "You are an undercover police officer on board [station_name()]. You've been sent here by the Spinward Stellar Coalition because of suspected abusive behavior by the security department, and to keep tabs on a potential criminal organization operation."
|
||||
missiondesc += "<BR><B>Your Mission</B>:"
|
||||
missiondesc += "<BR> <B>1.</B> Keep a close eye on any gangsters you spot. You can view gangsters using your sunglasses in your backpack."
|
||||
missiondesc += "<BR> <B>2.</B> Keep an eye on how Security handles any gangsters, and watch for excessive security brutality."
|
||||
missiondesc += "<BR> <B>3.</B> Remain undercover and do not get found out by Security or any gangs. Nanotrasen does not take kindly to being spied on."
|
||||
missiondesc += "<BR> <B>4.</B> When your backup arrives to extract you in 1 hour, inform them of everything you saw of note, and assist them in securing the situation."
|
||||
to_chat(owner,missiondesc)
|
||||
|
||||
/datum/antagonist/ert/families/beatcop
|
||||
name = "Beat Cop"
|
||||
role = "Police Officer"
|
||||
outfit = /datum/outfit/families_police/beatcop
|
||||
|
||||
/datum/antagonist/ert/families/beatcop/armored
|
||||
name = "Armored Beat Cop"
|
||||
role = "Police Officer"
|
||||
outfit = /datum/outfit/families_police/beatcop/armored
|
||||
|
||||
/datum/antagonist/ert/families/beatcop/swat
|
||||
name = "S.W.A.T. Member"
|
||||
role = "S.W.A.T. Officer"
|
||||
outfit = /datum/outfit/families_police/beatcop/swat
|
||||
|
||||
/datum/antagonist/ert/families/beatcop/fbi
|
||||
name = "FBI Agent"
|
||||
role = "FBI Agent"
|
||||
outfit = /datum/outfit/families_police/beatcop/fbi
|
||||
|
||||
/datum/antagonist/ert/families/beatcop/military
|
||||
name = "Space Military"
|
||||
role = "Sergeant"
|
||||
outfit = /datum/outfit/families_police/beatcop/military
|
||||
|
||||
/datum/antagonist/ert/families/beatcop/military/New()
|
||||
. = ..()
|
||||
name_source = GLOB.commando_names
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
equip_gangster_in_inventory()
|
||||
var/datum/atom_hud/gang_hud = GLOB.huds[ANTAG_HUD_GANGSTER]
|
||||
gang_hud.add_hud_to(owner.current)
|
||||
owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/thatshowfamiliesworks.ogg', 100, FALSE, pressure_affected = FALSE, use_reverb = FALSE)
|
||||
owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/thatshowfamiliesworks.ogg', 100, FALSE, pressure_affected = FALSE)
|
||||
..()
|
||||
|
||||
/datum/antagonist/gang/on_removal()
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
/datum/outfit/families_police/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE)
|
||||
if(visualsOnly)
|
||||
return
|
||||
|
||||
var/obj/item/card/id/W = H.wear_id
|
||||
W.access = get_all_accesses() // I have a warrant.
|
||||
W.assignment = "Space Police"
|
||||
W.registered_name = H.real_name
|
||||
W.update_label()
|
||||
..()
|
||||
|
||||
/datum/outfit/families_police/beatcop
|
||||
name = "Families: Beat Cop"
|
||||
|
||||
uniform = /obj/item/clothing/under/rank/security/officer/beatcop
|
||||
suit = null
|
||||
shoes = /obj/item/clothing/shoes/combat/swat
|
||||
gloves = null
|
||||
glasses = /obj/item/clothing/glasses/hud/spacecop
|
||||
ears = /obj/item/radio/headset/headset_sec
|
||||
mask = null
|
||||
head = /obj/item/clothing/head/spacepolice
|
||||
belt = /obj/item/gun/energy/e_gun/mini
|
||||
r_pocket = /obj/item/lighter
|
||||
l_pocket = /obj/item/restraints/handcuffs
|
||||
back = /obj/item/storage/backpack/satchel/leather
|
||||
id = /obj/item/card/id
|
||||
|
||||
|
||||
/datum/outfit/families_police/beatcop/armored
|
||||
name = "Families: Armored Beat Cop"
|
||||
suit = /obj/item/clothing/suit/armor/vest/blueshirt
|
||||
head = /obj/item/clothing/head/helmet/blueshirt
|
||||
belt = /obj/item/gun/energy/e_gun
|
||||
|
||||
/datum/outfit/families_police/beatcop/swat
|
||||
name = "Families: SWAT Beat Cop"
|
||||
suit = /obj/item/clothing/suit/armor/riot
|
||||
head = /obj/item/clothing/head/helmet/riot
|
||||
gloves = /obj/item/clothing/gloves/combat
|
||||
belt = /obj/item/gun/energy/e_gun
|
||||
|
||||
/datum/outfit/families_police/beatcop/fbi
|
||||
name = "Families: Space FBI Officer"
|
||||
suit = /obj/item/clothing/suit/armor/laserproof
|
||||
head = /obj/item/clothing/head/helmet/riot
|
||||
belt = /obj/item/gun/energy/laser/scatter
|
||||
gloves = /obj/item/clothing/gloves/combat
|
||||
|
||||
/datum/outfit/families_police/beatcop/military
|
||||
name = "Families: Space Military"
|
||||
uniform = /obj/item/clothing/under/syndicate/camo
|
||||
suit = /obj/item/clothing/suit/armor/laserproof
|
||||
head = /obj/item/clothing/head/beret/durathread
|
||||
belt = /obj/item/gun/energy/laser/scatter
|
||||
gloves = /obj/item/clothing/gloves/combat
|
||||
Reference in New Issue
Block a user