mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 23:58:07 +01:00
[MIRROR] tgui Preferences Menu + total rewrite of the preferences backend (#8153)
* tgui Preferences Menu + total rewrite of the preferences backend * nah, we dont need to ping those people * trying to remove the funny stuff * unmodularizing this * prefs reset * this may need to be reverted, who knows * okay, this part * perhaps * EEEEEEEEE * unsanitary * E * Stage 1 + loadout system * more fixes * E * I mean, it launches? * More fixes and reorganisation * E * customisation code is spaget. * disable ERP prefs * Update erp_preferences.dm * Update erp_preferences.dm * E * Slowly getting there * It may be time for help :) * tri...colors... help * preferences now pass preferences * Update dna.dm * Fuck this man * missing savefile return, set_species works, removed dumb stuff from updateappearance * https://github.com/Skyrat-SS13/Skyrat-tg/pull/8199 * https://github.com/Skyrat-SS13/Skyrat-tg/pull/8224 * https://github.com/tgstation/tgstation/pull/61519 * https://github.com/Skyrat-SS13/Skyrat-tg/pull/8278 * e * le butonAZARAK HELLO * hhh * Proper recognition where it's due, MrMelbert! * EEEE * examine block * Better gen hit sounds from whitedream * final loadout touches, more bug fixes im sure to come * i said there would be bugfixes * Update LoadoutManager.js * Missing preferences in the html menu * LIVE TESTING PHASE BABY * Update LoadoutManager.js * EEE * LAUNCH TEST FIRE * Update job.dm * Update new_player.dm * 50gb DAY ONE PATCH * EEE * Update preferences.dm * buggle fixes * Update examine.dm * >LOOC starts on Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com> Co-authored-by: jjpark-kb <55967837+jjpark-kb@users.noreply.github.com> Co-authored-by: Gandalf <jzo123@hotmail.com> Co-authored-by: Azarak <azarak10@gmail.com>
This commit is contained in:
co-authored by
Mothblocks
jjpark-kb
Gandalf
Azarak
parent
a5bfc42228
commit
124ddd7cca
@@ -48,6 +48,8 @@ GLOBAL_LIST_EMPTY(antagonists)
|
||||
var/show_name_in_check_antagonists = FALSE
|
||||
/// Should this antagonist be shown as antag to ghosts? Shouldn't be used for stealthy antagonists like traitors
|
||||
var/show_to_ghosts = FALSE
|
||||
/// The typepath for the outfit to show in the preview for the preferences menu.
|
||||
var/preview_outfit
|
||||
|
||||
//ANTAG UI
|
||||
|
||||
@@ -62,9 +64,7 @@ GLOBAL_LIST_EMPTY(antagonists)
|
||||
|
||||
/datum/antagonist/Destroy()
|
||||
GLOB.antagonists -= src
|
||||
if(!owner)
|
||||
stack_trace("Destroy()ing antagonist datum when it has no owner.")
|
||||
else
|
||||
if(owner)
|
||||
LAZYREMOVE(owner.antag_datums, src)
|
||||
owner = null
|
||||
return ..()
|
||||
@@ -341,6 +341,42 @@ 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
|
||||
|
||||
@@ -19,6 +19,26 @@ GLOBAL_LIST_INIT(possible_abductor_names, list("Alpha","Beta","Gamma","Delta","E
|
||||
/// Type path for the associated job datum.
|
||||
var/role_job = /datum/job/abductor_agent
|
||||
|
||||
/datum/antagonist/abductor/get_preview_icon()
|
||||
var/mob/living/carbon/human/dummy/consistent/scientist = new
|
||||
var/mob/living/carbon/human/dummy/consistent/agent = new
|
||||
|
||||
scientist.set_species(/datum/species/abductor)
|
||||
agent.set_species(/datum/species/abductor)
|
||||
|
||||
var/icon/scientist_icon = render_preview_outfit(/datum/outfit/abductor/scientist, scientist)
|
||||
scientist_icon.Shift(WEST, 8)
|
||||
|
||||
var/icon/agent_icon = render_preview_outfit(/datum/outfit/abductor/agent, agent)
|
||||
agent_icon.Shift(EAST, 8)
|
||||
|
||||
var/icon/final_icon = scientist_icon
|
||||
final_icon.Blend(agent_icon, ICON_OVERLAY)
|
||||
|
||||
qdel(scientist)
|
||||
qdel(agent)
|
||||
|
||||
return finish_preview_icon(final_icon)
|
||||
|
||||
/datum/antagonist/abductor/agent
|
||||
name = "Abductor Agent"
|
||||
|
||||
@@ -38,6 +38,16 @@
|
||||
to_chat(owner.current, "<span class='alertsyndie'><font color=\"#EE4000\">You are no longer the Blob!</font></span>")
|
||||
return ..()
|
||||
|
||||
/datum/antagonist/blob/get_preview_icon()
|
||||
var/datum/blobstrain/reagent/reactive_spines/reactive_spines = /datum/blobstrain/reagent/reactive_spines
|
||||
|
||||
var/icon/icon = icon('icons/mob/blob.dmi', "blob_core")
|
||||
icon.Blend(initial(reactive_spines.color), ICON_MULTIPLY)
|
||||
icon.Blend(icon('icons/mob/blob.dmi', "blob_core_overlay"), ICON_OVERLAY)
|
||||
icon.Scale(ANTAGONIST_PREVIEW_ICON_SIZE, ANTAGONIST_PREVIEW_ICON_SIZE)
|
||||
|
||||
return icon
|
||||
|
||||
/datum/antagonist/blob/proc/create_objectives()
|
||||
var/datum/objective/blob_takeover/main = new
|
||||
main.owner = owner
|
||||
@@ -107,3 +117,22 @@
|
||||
var/mob/camera/blob/blob_cam = owner.current
|
||||
if(istype(blob_cam))
|
||||
. += "(Progress: [length(blob_cam.blobs_legit)]/[blob_cam.blobwincount])"
|
||||
|
||||
/// A subtype of blob meant to represent the infective version.
|
||||
/datum/antagonist/blob/infection
|
||||
job_rank = ROLE_BLOB_INFECTION
|
||||
|
||||
/datum/antagonist/blob/infection/get_preview_icon()
|
||||
var/icon/blob_icon = ..()
|
||||
|
||||
var/datum/blobstrain/reagent/reactive_spines/reactive_spines = /datum/blobstrain/reagent/reactive_spines
|
||||
var/icon/blob_head = icon('icons/mob/blob.dmi', "blob_head")
|
||||
blob_head.Blend(initial(reactive_spines.complementary_color), ICON_MULTIPLY)
|
||||
|
||||
var/icon/human_icon = render_preview_outfit(/datum/outfit/job/miner)
|
||||
human_icon.Blend(blob_head, ICON_OVERLAY)
|
||||
human_icon.ChangeOpacity(0.7)
|
||||
|
||||
blob_icon.Blend(finish_preview_icon(human_icon), ICON_OVERLAY)
|
||||
|
||||
return blob_icon
|
||||
|
||||
@@ -43,6 +43,34 @@
|
||||
/datum/antagonist/brother/antag_panel_data()
|
||||
return "Conspirators : [get_brother_names()]"
|
||||
|
||||
/datum/antagonist/brother/get_preview_icon()
|
||||
var/mob/living/carbon/human/dummy/consistent/brother1 = new
|
||||
var/mob/living/carbon/human/dummy/consistent/brother2 = new
|
||||
|
||||
brother1.dna.features["ethcolor"] = GLOB.color_list_ethereal["Faint Red"]
|
||||
brother1.set_species(/datum/species/ethereal)
|
||||
|
||||
brother2.dna.features["moth_antennae"] = "Plain"
|
||||
brother2.dna.features["moth_markings"] = "None"
|
||||
brother2.dna.features["moth_wings"] = "Plain"
|
||||
brother2.set_species(/datum/species/moth)
|
||||
|
||||
var/icon/brother1_icon = render_preview_outfit(/datum/outfit/job/quartermaster, brother1)
|
||||
brother1_icon.Blend(icon('icons/effects/blood.dmi', "maskblood"), ICON_OVERLAY)
|
||||
brother1_icon.Shift(WEST, 8)
|
||||
|
||||
var/icon/brother2_icon = render_preview_outfit(/datum/outfit/job/scientist, brother2)
|
||||
brother2_icon.Blend(icon('icons/effects/blood.dmi', "uniformblood"), ICON_OVERLAY)
|
||||
brother2_icon.Shift(EAST, 8)
|
||||
|
||||
var/icon/final_icon = brother1_icon
|
||||
final_icon.Blend(brother2_icon, ICON_OVERLAY)
|
||||
|
||||
qdel(brother1)
|
||||
qdel(brother2)
|
||||
|
||||
return finish_preview_icon(final_icon)
|
||||
|
||||
/datum/antagonist/brother/proc/get_brother_names()
|
||||
var/list/brothers = team.members - owner
|
||||
var/brother_text = ""
|
||||
|
||||
@@ -701,6 +701,20 @@
|
||||
|
||||
return parts.Join("<br>")
|
||||
|
||||
/datum/antagonist/changeling/get_preview_icon()
|
||||
var/icon/final_icon = render_preview_outfit(/datum/outfit/changeling)
|
||||
var/icon/split_icon = render_preview_outfit(/datum/outfit/job/engineer)
|
||||
|
||||
final_icon.Shift(WEST, world.icon_size / 2)
|
||||
final_icon.Shift(EAST, world.icon_size / 2)
|
||||
|
||||
split_icon.Shift(EAST, world.icon_size / 2)
|
||||
split_icon.Shift(WEST, world.icon_size / 2)
|
||||
|
||||
final_icon.Blend(split_icon, ICON_OVERLAY)
|
||||
|
||||
return finish_preview_icon(final_icon)
|
||||
|
||||
/datum/antagonist/changeling/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
var/list/memories = list()
|
||||
@@ -744,3 +758,10 @@
|
||||
to_chat(owner, span_boldannounce("You are a fresh changeling birthed from a headslug! You aren't as strong as a normal changeling, as you are newly born."))
|
||||
if(policy)
|
||||
to_chat(owner, policy)
|
||||
|
||||
/datum/outfit/changeling
|
||||
name = "Changeling"
|
||||
|
||||
head = /obj/item/clothing/head/helmet/changeling
|
||||
suit = /obj/item/clothing/suit/armor/changeling
|
||||
l_hand = /obj/item/melee/arm_blade
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
roundend_category = "obsessed"
|
||||
silent = TRUE //not actually silent, because greet will be called by the trauma anyway.
|
||||
suicide_cry = "FOR MY LOVE!!"
|
||||
preview_outfit = /datum/outfit/obsessed
|
||||
var/datum/brain_trauma/special/obsessed/trauma
|
||||
|
||||
/datum/antagonist/obsessed/admin_add(datum/mind/new_owner,mob/admin)
|
||||
@@ -44,6 +45,40 @@
|
||||
var/mob/living/M = mob_override || owner.current
|
||||
remove_antag_hud(antag_hud_type, M)
|
||||
|
||||
/datum/antagonist/obsessed/get_preview_icon()
|
||||
var/mob/living/carbon/human/dummy/consistent/victim_dummy = new
|
||||
victim_dummy.hair_color = "b96" // Brown
|
||||
victim_dummy.hairstyle = "Messy"
|
||||
victim_dummy.update_hair()
|
||||
|
||||
var/icon/obsessed_icon = render_preview_outfit(preview_outfit)
|
||||
obsessed_icon.Blend(icon('icons/effects/blood.dmi', "uniformblood"), ICON_OVERLAY)
|
||||
|
||||
var/icon/final_icon = finish_preview_icon(obsessed_icon)
|
||||
|
||||
final_icon.Blend(
|
||||
icon('icons/ui_icons/antags/obsessed.dmi', "obsession"),
|
||||
ICON_OVERLAY,
|
||||
ANTAGONIST_PREVIEW_ICON_SIZE - 30,
|
||||
20,
|
||||
)
|
||||
|
||||
return final_icon
|
||||
|
||||
/datum/outfit/obsessed
|
||||
name = "Obsessed (Preview only)"
|
||||
|
||||
uniform = /obj/item/clothing/under/misc/overalls
|
||||
gloves = /obj/item/clothing/gloves/color/latex
|
||||
mask = /obj/item/clothing/mask/surgical
|
||||
neck = /obj/item/camera
|
||||
suit = /obj/item/clothing/suit/apron
|
||||
|
||||
/datum/outfit/obsessed/post_equip(mob/living/carbon/human/H)
|
||||
for(var/obj/item/carried_item in H.get_equipped_items(TRUE))
|
||||
carried_item.add_mob_blood(H)//Oh yes, there will be blood...
|
||||
H.regenerate_icons()
|
||||
|
||||
/datum/antagonist/obsessed/proc/forge_objectives(datum/mind/obsessionmind)
|
||||
var/list/objectives_left = list("spendtime", "polaroid", "hug")
|
||||
var/datum/objective/assassinate/obsessed/kill = new
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
antagpanel_category = "Cult"
|
||||
antag_moodlet = /datum/mood_event/cult
|
||||
suicide_cry = "FOR NAR'SIE!!"
|
||||
preview_outfit = /datum/outfit/cultist
|
||||
var/datum/action/innate/cult/comm/communion = new
|
||||
var/datum/action/innate/cult/mastervote/vote = new
|
||||
var/datum/action/innate/cult/blood_magic/magic = new
|
||||
@@ -68,6 +69,24 @@
|
||||
if(cult_team.blood_target && cult_team.blood_target_image && current.client)
|
||||
current.client.images += cult_team.blood_target_image
|
||||
|
||||
/datum/antagonist/cult/get_preview_icon()
|
||||
var/icon/icon = render_preview_outfit(preview_outfit)
|
||||
|
||||
// The longsword is 64x64, but getFlatIcon crunches to 32x32.
|
||||
// So I'm just going to add it in post, screw it.
|
||||
|
||||
// Center the dude, because item icon states start from the center.
|
||||
// This makes the image 64x64.
|
||||
icon.Crop(-15, -15, 48, 48)
|
||||
|
||||
var/obj/item/melee/cultblade/longsword = new
|
||||
icon.Blend(icon(longsword.lefthand_file, longsword.inhand_icon_state), ICON_OVERLAY)
|
||||
qdel(longsword)
|
||||
|
||||
// Move the guy back to the bottom left, 32x32.
|
||||
icon.Crop(17, 17, 48, 48)
|
||||
|
||||
return finish_preview_icon(icon)
|
||||
|
||||
/datum/antagonist/cult/proc/equip_cultist(metal=TRUE)
|
||||
var/mob/living/carbon/H = owner.current
|
||||
@@ -434,3 +453,19 @@
|
||||
if(HAS_TRAIT(M, TRAIT_MINDSHIELD) || issilicon(M) || isbot(M) || isdrone(M) || !M.client)
|
||||
return FALSE //can't convert machines, shielded, or braindead
|
||||
return TRUE
|
||||
|
||||
/datum/outfit/cultist
|
||||
name = "Cultist (Preview only)"
|
||||
|
||||
uniform = /obj/item/clothing/under/color/black
|
||||
suit = /obj/item/clothing/suit/hooded/cultrobes/alt
|
||||
shoes = /obj/item/clothing/shoes/cult/alt
|
||||
r_hand = /obj/item/melee/blood_magic/stun
|
||||
|
||||
/datum/outfit/cultist/post_equip(mob/living/carbon/human/H, visualsOnly)
|
||||
H.eye_color = BLOODCULT_EYE
|
||||
H.update_body()
|
||||
|
||||
var/obj/item/clothing/suit/hooded/hooded = locate() in H
|
||||
hooded.MakeHood() // This is usually created on Initialize, but we run before atoms
|
||||
hooded.ToggleHood()
|
||||
|
||||
@@ -73,6 +73,11 @@
|
||||
|
||||
return result.Join("<br>")
|
||||
|
||||
/datum/antagonist/disease/get_preview_icon()
|
||||
var/icon/icon = icon('icons/mob/hud.dmi', "virus_infected")
|
||||
icon.Blend(COLOR_GREEN_GRAY, ICON_MULTIPLY)
|
||||
icon.Scale(ANTAGONIST_PREVIEW_ICON_SIZE, ANTAGONIST_PREVIEW_ICON_SIZE)
|
||||
return icon
|
||||
|
||||
/datum/objective/disease_infect
|
||||
explanation_text = "Survive and infect as many people as possible."
|
||||
|
||||
@@ -146,7 +146,7 @@ the new instance inside the host to be updated to the template's stats.
|
||||
else
|
||||
link = ""
|
||||
// Create map text prior to modifying message for goonchat
|
||||
if (client?.prefs.chat_on_map && (client.prefs.see_chat_non_mob || ismob(speaker)))
|
||||
if (client?.prefs.read_preference(/datum/preference/toggle/enable_runechat) && (client.prefs.read_preference(/datum/preference/toggle/enable_runechat_non_mobs) || ismob(speaker)))
|
||||
create_chat_message(speaker, message_language, raw_message, spans)
|
||||
// Recompose the message, because it's scrambled by default
|
||||
message = compose_message(speaker, message_language, raw_message, radio_freq, spans, message_mods)
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
antag_hud_name = "heretic"
|
||||
hijack_speed = 0.5
|
||||
suicide_cry = "THE MANSUS SMILES UPON ME!!"
|
||||
preview_outfit = /datum/outfit/heretic
|
||||
var/give_equipment = TRUE
|
||||
var/list/researched_knowledge = list()
|
||||
var/total_sacrifices = 0
|
||||
@@ -40,6 +41,27 @@
|
||||
to_chat(owner.current, span_userdanger("Your mind begins to flare as the otherwordly knowledge escapes your grasp!"))
|
||||
owner.announce_objectives()
|
||||
|
||||
/datum/antagonist/heretic/get_preview_icon()
|
||||
var/icon/icon = render_preview_outfit(preview_outfit)
|
||||
|
||||
// MOTHBLOCKS TOOD: Copied and pasted from cult, make this its own proc
|
||||
|
||||
// The sickly blade is 64x64, but getFlatIcon crunches to 32x32.
|
||||
// So I'm just going to add it in post, screw it.
|
||||
|
||||
// Center the dude, because item icon states start from the center.
|
||||
// This makes the image 64x64.
|
||||
icon.Crop(-15, -15, 48, 48)
|
||||
|
||||
var/obj/item/melee/sickly_blade/blade = new
|
||||
icon.Blend(icon(blade.lefthand_file, blade.inhand_icon_state), ICON_OVERLAY)
|
||||
qdel(blade)
|
||||
|
||||
// Move the guy back to the bottom left, 32x32.
|
||||
icon.Crop(17, 17, 48, 48)
|
||||
|
||||
return finish_preview_icon(icon)
|
||||
|
||||
/datum/antagonist/heretic/on_gain()
|
||||
var/mob/living/current = owner.current
|
||||
if(ishuman(current))
|
||||
@@ -261,3 +283,14 @@
|
||||
if(!cultie)
|
||||
return FALSE
|
||||
return cultie.total_sacrifices >= target_amount
|
||||
|
||||
/datum/outfit/heretic
|
||||
name = "Heretic (Preview only)"
|
||||
|
||||
suit = /obj/item/clothing/suit/hooded/cultrobes/eldritch
|
||||
r_hand = /obj/item/melee/touch_attack/mansus_fist
|
||||
|
||||
/datum/outfit/heretic/post_equip(mob/living/carbon/human/H, visualsOnly)
|
||||
var/obj/item/clothing/suit/hooded/hooded = locate() in H
|
||||
hooded.MakeHood() // This is usually created on Initialize, but we run before atoms
|
||||
hooded.ToggleHood()
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
antagpanel_category = "Family"
|
||||
show_in_antagpanel = FALSE // i don't *think* this base class is buggy but it's too worthless to test
|
||||
suicide_cry = "FOR THE FAMILY!!"
|
||||
preview_outfit = /datum/outfit/gangster
|
||||
/// The overarching family that the owner of this datum is a part of. Family teams are generic and imprinted upon by the per-person antagonist datums.
|
||||
var/datum/team/gang/my_gang
|
||||
/// The name of the family corresponding to this family member datum.
|
||||
@@ -251,6 +252,12 @@
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/datum/outfit/gangster
|
||||
name = "Gangster (Preview only)"
|
||||
|
||||
uniform = /obj/item/clothing/under/suit/henchmen
|
||||
back = /obj/item/storage/backpack/henchmen
|
||||
|
||||
/datum/antagonist/gang/purple
|
||||
show_in_antagpanel = TRUE
|
||||
name = "Ballas"
|
||||
|
||||
@@ -187,4 +187,14 @@
|
||||
|
||||
return result.Join("<br>")
|
||||
|
||||
/datum/antagonist/malf_ai/get_preview_icon()
|
||||
var/icon/malf_ai_icon = icon('icons/mob/ai.dmi', "ai-red")
|
||||
|
||||
// Crop out the borders of the AI, just the face
|
||||
malf_ai_icon.Crop(5, 27, 28, 6)
|
||||
|
||||
malf_ai_icon.Scale(ANTAGONIST_PREVIEW_ICON_SIZE, ANTAGONIST_PREVIEW_ICON_SIZE)
|
||||
|
||||
return malf_ai_icon
|
||||
|
||||
#undef PROB_SPECIAL
|
||||
|
||||
@@ -16,6 +16,16 @@
|
||||
/datum/antagonist/monkey/can_be_owned(datum/mind/new_owner)
|
||||
return ..() && (!monkey_only || ismonkey(new_owner.current))
|
||||
|
||||
/datum/antagonist/monkey/get_preview_icon()
|
||||
// Creating a *real* monkey is fairly involved before atoms init.
|
||||
var/icon/icon = icon('icons/mob/monkey.dmi', "monkey1")
|
||||
|
||||
icon.Crop(4, 9, 28, 33)
|
||||
icon.Scale(ANTAGONIST_PREVIEW_ICON_SIZE, ANTAGONIST_PREVIEW_ICON_SIZE)
|
||||
icon.Shift(SOUTH, 10)
|
||||
|
||||
return icon
|
||||
|
||||
/datum/antagonist/monkey/get_team()
|
||||
return monkey_team
|
||||
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
|
||||
/datum/antagonist/nukeop/clownop
|
||||
name = "Clown Operative"
|
||||
name = ROLE_CLOWN_OPERATIVE
|
||||
roundend_category = "clown operatives"
|
||||
antagpanel_category = "ClownOp"
|
||||
nukeop_outfit = /datum/outfit/syndicate/clownop
|
||||
suicide_cry = "HAPPY BIRTHDAY!!"
|
||||
|
||||
preview_outfit = /datum/outfit/clown_operative_elite
|
||||
preview_outfit_behind = /datum/outfit/clown_operative
|
||||
nuke_icon_state = "bananiumbomb_base"
|
||||
|
||||
/datum/antagonist/nukeop/clownop/admin_add(datum/mind/new_owner,mob/admin)
|
||||
new_owner.set_assigned_role(SSjob.GetJobType(/datum/job/clown_operative))
|
||||
new_owner.add_antag_datum(src)
|
||||
@@ -60,3 +64,17 @@
|
||||
var/obj/item/organ/liver/liver = L.getorganslot(ORGAN_SLOT_LIVER)
|
||||
if(liver)
|
||||
ADD_TRAIT(liver, TRAIT_COMEDY_METABOLISM, CLOWNOP_TRAIT)
|
||||
|
||||
/datum/outfit/clown_operative
|
||||
name = "Clown Operative (Preview only)"
|
||||
|
||||
suit = /obj/item/clothing/suit/space/hardsuit/syndi
|
||||
gloves = /obj/item/clothing/gloves/color/black
|
||||
mask = /obj/item/clothing/mask/gas/clown_hat
|
||||
|
||||
/datum/outfit/clown_operative_elite
|
||||
name = "Clown Operative (Elite, Preview only)"
|
||||
|
||||
suit = /obj/item/clothing/suit/space/hardsuit/syndi/elite
|
||||
gloves = /obj/item/clothing/gloves/color/black
|
||||
mask = /obj/item/clothing/mask/gas/clown_hat
|
||||
|
||||
@@ -14,6 +14,12 @@
|
||||
var/send_to_spawnpoint = TRUE //Should the user be moved to default spawnpoint.
|
||||
var/nukeop_outfit = /datum/outfit/syndicate
|
||||
|
||||
preview_outfit = /datum/outfit/nuclear_operative_elite
|
||||
|
||||
/// In the preview icon, the nukies who are behind the leader
|
||||
var/preview_outfit_behind = /datum/outfit/nuclear_operative
|
||||
/// In the preview icon, a nuclear fission explosive device, only appearing if there's an icon state for it.
|
||||
var/nuke_icon_state = "nuclearbomb_base"
|
||||
|
||||
/datum/antagonist/nukeop/apply_innate_effects(mob/living/mob_override)
|
||||
var/mob/living/M = mob_override || owner.current
|
||||
@@ -87,7 +93,7 @@
|
||||
/datum/antagonist/nukeop/proc/memorize_code()
|
||||
if(nuke_team && nuke_team.tracked_nuke && nuke_team.memorized_code)
|
||||
antag_memory += "<B>[nuke_team.tracked_nuke] Code</B>: [nuke_team.memorized_code]<br>"
|
||||
owner.add_memory(MEMORY_NUKECODE, list(DETAIL_NUKE_CODE = nuke_team.memorized_code, DETAIL_PROTAGONIST = owner.current), story_value = STORY_VALUE_AMAZING, memory_flags = MEMORY_FLAG_NOLOCATION | MEMORY_FLAG_NOMOOD | MEMORY_FLAG_NOPERSISTENCE)
|
||||
owner.add_memory(MEMORY_NUKECODE, list(DETAIL_NUKE_CODE = nuke_team.memorized_code, DETAIL_PROTAGONIST = owner.current), story_value = STORY_VALUE_AMAZING, memory_flags = MEMORY_FLAG_NOLOCATION | MEMORY_FLAG_NOMOOD | MEMORY_FLAG_NOPERSISTENCE)
|
||||
to_chat(owner, "The nuclear authorization code is: <B>[nuke_team.memorized_code]</B>")
|
||||
else
|
||||
to_chat(owner, "Unfortunately the syndicate was unable to provide you with nuclear authorization code.")
|
||||
@@ -149,6 +155,45 @@
|
||||
else
|
||||
to_chat(admin, span_danger("No valid nuke found!"))
|
||||
|
||||
/datum/antagonist/nukeop/get_preview_icon()
|
||||
if (!preview_outfit)
|
||||
return null
|
||||
|
||||
var/icon/final_icon = render_preview_outfit(preview_outfit)
|
||||
|
||||
if (!isnull(preview_outfit_behind))
|
||||
var/icon/teammate = render_preview_outfit(preview_outfit_behind)
|
||||
teammate.Blend(rgb(128, 128, 128, 128), ICON_MULTIPLY)
|
||||
|
||||
final_icon.Blend(teammate, ICON_UNDERLAY, -world.icon_size / 4, 0)
|
||||
final_icon.Blend(teammate, ICON_UNDERLAY, world.icon_size / 4, 0)
|
||||
|
||||
if (!isnull(nuke_icon_state))
|
||||
var/icon/nuke = icon('icons/obj/machines/nuke.dmi', nuke_icon_state)
|
||||
nuke.Shift(SOUTH, 6)
|
||||
final_icon.Blend(nuke, ICON_OVERLAY)
|
||||
|
||||
return finish_preview_icon(final_icon)
|
||||
|
||||
/datum/outfit/nuclear_operative
|
||||
name = "Nuclear Operative (Preview only)"
|
||||
|
||||
suit = /obj/item/clothing/suit/space/hardsuit/syndi
|
||||
head = /obj/item/clothing/head/helmet/space/hardsuit/syndi
|
||||
|
||||
/datum/outfit/nuclear_operative_elite
|
||||
name = "Nuclear Operative (Elite, Preview only)"
|
||||
|
||||
suit = /obj/item/clothing/suit/space/hardsuit/syndi/elite
|
||||
head = /obj/item/clothing/head/helmet/space/hardsuit/syndi/elite
|
||||
l_hand = /obj/item/modular_computer/tablet/nukeops
|
||||
r_hand = /obj/item/shield/energy
|
||||
|
||||
/datum/outfit/nuclear_operative_elite/post_equip(mob/living/carbon/human/H, visualsOnly)
|
||||
var/obj/item/shield/energy/shield = locate() in H.held_items
|
||||
shield.icon_state = "[shield.base_icon_state]1"
|
||||
H.update_inv_hands()
|
||||
|
||||
/datum/antagonist/nukeop/leader
|
||||
name = "Nuclear Operative Leader"
|
||||
nukeop_outfit = /datum/outfit/syndicate/leader
|
||||
@@ -231,6 +276,9 @@
|
||||
always_new_team = TRUE
|
||||
send_to_spawnpoint = FALSE //Handled by event
|
||||
nukeop_outfit = /datum/outfit/syndicate/full
|
||||
preview_outfit = /datum/outfit/nuclear_operative
|
||||
preview_outfit_behind = null
|
||||
nuke_icon_state = null
|
||||
|
||||
/datum/antagonist/nukeop/lone/assign_nuke()
|
||||
if(nuke_team && !nuke_team.tracked_nuke)
|
||||
|
||||
@@ -18,3 +18,6 @@
|
||||
/datum/antagonist/revenant/on_gain()
|
||||
forge_objectives()
|
||||
. = ..()
|
||||
|
||||
/datum/antagonist/revenant/get_preview_icon()
|
||||
return finish_preview_icon(icon('icons/mob/mob.dmi', "revenant_idle"))
|
||||
|
||||
@@ -163,6 +163,9 @@
|
||||
/datum/antagonist/rev/head
|
||||
name = "Head Revolutionary"
|
||||
antag_hud_name = "rev_head"
|
||||
|
||||
preview_outfit = /datum/outfit/revolutionary
|
||||
|
||||
var/remove_clumsy = FALSE
|
||||
var/give_flash = FALSE
|
||||
var/give_hud = TRUE
|
||||
@@ -181,6 +184,37 @@
|
||||
/datum/antagonist/rev/head/antag_listing_name()
|
||||
return ..() + "(Leader)"
|
||||
|
||||
/datum/antagonist/rev/head/get_preview_icon()
|
||||
var/icon/final_icon = render_preview_outfit(preview_outfit)
|
||||
|
||||
final_icon.Blend(make_assistant_icon("Business Hair"), ICON_UNDERLAY, -8, 0)
|
||||
final_icon.Blend(make_assistant_icon("CIA"), ICON_UNDERLAY, 8, 0)
|
||||
|
||||
// Apply the rev head HUD, but scale up the preview icon a bit beforehand.
|
||||
// Otherwise, the R gets cut off.
|
||||
final_icon.Scale(64, 64)
|
||||
|
||||
var/icon/rev_head_icon = icon('icons/mob/hud.dmi', "rev_head")
|
||||
rev_head_icon.Scale(48, 48)
|
||||
rev_head_icon.Crop(1, 1, 64, 64)
|
||||
rev_head_icon.Shift(EAST, 10)
|
||||
rev_head_icon.Shift(NORTH, 16)
|
||||
final_icon.Blend(rev_head_icon, ICON_OVERLAY)
|
||||
|
||||
return finish_preview_icon(final_icon)
|
||||
|
||||
/datum/antagonist/rev/head/proc/make_assistant_icon(hairstyle)
|
||||
var/mob/living/carbon/human/dummy/consistent/assistant = new
|
||||
assistant.hairstyle = hairstyle
|
||||
assistant.update_hair()
|
||||
|
||||
var/icon/assistant_icon = render_preview_outfit(/datum/outfit/job/assistant/consistent, assistant)
|
||||
assistant_icon.ChangeOpacity(0.5)
|
||||
|
||||
qdel(assistant)
|
||||
|
||||
return assistant_icon
|
||||
|
||||
/datum/antagonist/rev/proc/can_be_converted(mob/living/candidate)
|
||||
if(!candidate.mind)
|
||||
return FALSE
|
||||
@@ -559,5 +593,14 @@
|
||||
heads_report += "</table>"
|
||||
return common_part + heads_report
|
||||
|
||||
/datum/outfit/revolutionary
|
||||
name = "Revolutionary (Preview only)"
|
||||
|
||||
uniform = /obj/item/clothing/under/costume/soviet
|
||||
head = /obj/item/clothing/head/ushanka
|
||||
gloves = /obj/item/clothing/gloves/color/black
|
||||
l_hand = /obj/item/spear
|
||||
r_hand = /obj/item/assembly/flash
|
||||
|
||||
#undef DECONVERTER_STATION_WIN
|
||||
#undef DECONVERTER_REVS_WIN
|
||||
|
||||
@@ -26,6 +26,17 @@
|
||||
forge_objectives()
|
||||
. = ..()
|
||||
|
||||
/datum/antagonist/space_dragon/get_preview_icon()
|
||||
var/icon/icon = icon('icons/mob/spacedragon.dmi', "spacedragon")
|
||||
|
||||
icon.Blend(COLOR_STRONG_VIOLET, ICON_MULTIPLY)
|
||||
icon.Blend(icon('icons/mob/spacedragon.dmi', "overlay_base"), ICON_OVERLAY)
|
||||
|
||||
icon.Crop(10, 9, 54, 53)
|
||||
icon.Scale(ANTAGONIST_PREVIEW_ICON_SIZE, ANTAGONIST_PREVIEW_ICON_SIZE)
|
||||
|
||||
return icon
|
||||
|
||||
/datum/objective/summon_carp
|
||||
var/datum/antagonist/space_dragon/dragon
|
||||
explanation_text = "Summon and protect the rifts to flood the station with carp."
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
show_to_ghosts = TRUE
|
||||
antag_moodlet = /datum/mood_event/focused
|
||||
suicide_cry = "FOR THE SPIDER CLAN!!"
|
||||
preview_outfit = /datum/outfit/ninja
|
||||
///Whether or not this ninja will obtain objectives
|
||||
var/give_objectives = TRUE
|
||||
///Whether or not this ninja receives the standard equipment
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
/datum/antagonist/swarmer
|
||||
name = "Swarmer"
|
||||
job_rank = ROLE_ALIEN
|
||||
job_rank = ROLE_SWARMER
|
||||
show_to_ghosts = TRUE
|
||||
show_in_antagpanel = FALSE
|
||||
prevent_roundtype_conversion = FALSE
|
||||
@@ -32,6 +32,11 @@
|
||||
/datum/antagonist/swarmer/get_team()
|
||||
return swarmer_team
|
||||
|
||||
/datum/antagonist/swarmer/get_preview_icon()
|
||||
var/icon/swarmer_icon = icon('icons/mob/swarmer.dmi', "swarmer")
|
||||
swarmer_icon.Shift(NORTH, 8)
|
||||
return finish_preview_icon(swarmer_icon)
|
||||
|
||||
//SWARMER
|
||||
/mob/living/simple_animal/hostile/swarmer/mind_initialize()
|
||||
..()
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
hijack_speed = 0.5 //10 seconds per hijack stage by default
|
||||
ui_name = "AntagInfoTraitor"
|
||||
suicide_cry = "FOR THE SYNDICATE!!"
|
||||
preview_outfit = /datum/outfit/traitor
|
||||
var/give_objectives = TRUE
|
||||
var/should_give_codewords = TRUE
|
||||
var/should_equip = TRUE
|
||||
@@ -350,6 +351,23 @@
|
||||
|
||||
return message
|
||||
|
||||
/datum/outfit/traitor
|
||||
name = "Traitor (Preview only)"
|
||||
|
||||
uniform = /obj/item/clothing/under/color/grey
|
||||
suit = /obj/item/clothing/suit/hooded/ablative
|
||||
gloves = /obj/item/clothing/gloves/color/yellow
|
||||
mask = /obj/item/clothing/mask/gas
|
||||
l_hand = /obj/item/melee/energy/sword
|
||||
r_hand = /obj/item/gun/energy/kinetic_accelerator/crossbow
|
||||
|
||||
/datum/outfit/traitor/post_equip(mob/living/carbon/human/H, visualsOnly)
|
||||
var/obj/item/melee/energy/sword/sword = locate() in H.held_items
|
||||
sword.icon_state = "e_sword_on_red"
|
||||
sword.worn_icon_state = "e_sword_on_red"
|
||||
|
||||
H.update_inv_hands()
|
||||
|
||||
#undef HIJACK_PROB
|
||||
#undef HIJACK_MIN_PLAYERS
|
||||
#undef MARTYR_PROB
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
hijack_speed = 0.5
|
||||
ui_name = "AntagInfoWizard"
|
||||
suicide_cry = "FOR THE FEDERATION!!"
|
||||
preview_outfit = /datum/outfit/wizard
|
||||
var/give_objectives = TRUE
|
||||
var/strip = TRUE //strip before equipping
|
||||
var/allow_rename = TRUE
|
||||
|
||||
@@ -32,6 +32,9 @@
|
||||
/datum/antagonist/xeno/get_team()
|
||||
return xeno_team
|
||||
|
||||
/datum/antagonist/xeno/get_preview_icon()
|
||||
return finish_preview_icon(icon('icons/mob/alien.dmi', "alienh"))
|
||||
|
||||
//XENO
|
||||
/mob/living/carbon/alien/mind_initialize()
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user