From ccda51ab6806ad191420d2f2a08219b5192cde59 Mon Sep 17 00:00:00 2001 From: Datraen Date: Wed, 29 Jun 2016 11:25:52 -0400 Subject: [PATCH] Adds fluff antag factions, antag visibility options for uplinks. No mechanical changes come of this change, only the ability to have an antagonist faction, as well as having specified visbility for the affiliation itself. Also adds Skrell home system to the home system list. --- code/__defines/misc.dm | 5 ++++ code/datums/datacore.dm | 2 ++ code/game/objects/items/devices/uplink.dm | 9 +++++- .../preference_setup/antagonism/01_basic.dm | 30 +++++++++++++++++++ code/modules/client/preferences.dm | 4 ++- code/modules/client/preferences_factions.dm | 10 +++++++ .../mob/living/carbon/human/human_defines.dm | 2 ++ html/changelogs/Datraen-AntagFactions1.yml | 4 +++ nano/templates/uplink.tmpl | 21 ++++++------- 9 files changed, 75 insertions(+), 12 deletions(-) create mode 100644 html/changelogs/Datraen-AntagFactions1.yml diff --git a/code/__defines/misc.dm b/code/__defines/misc.dm index 5c5dba3c342..68954b0dc55 100644 --- a/code/__defines/misc.dm +++ b/code/__defines/misc.dm @@ -162,3 +162,8 @@ #define CAT_NORMAL 1 #define CAT_HIDDEN 2 #define CAT_COIN 4 + +//Antag Faction Visbility +#define ANTAG_HIDDEN "Hidden" +#define ANTAG_SHARED "Shared" +#define ANTAG_KNOWN "Known" diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index cc603aa2df5..2043febdb6b 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -228,6 +228,8 @@ L.fields["faction"] = H.personal_faction L.fields["religion"] = H.religion L.fields["image"] = getFlatIcon(H) //This is god-awful + L.fields["antagfac"] = H.antag_faction + L.fields["antagvis"] = H.antag_vis if(H.exploit_record && !jobban_isbanned(H, "Records")) L.fields["exploit_record"] = H.exploit_record else diff --git a/code/game/objects/items/devices/uplink.dm b/code/game/objects/items/devices/uplink.dm index 571b0462df8..b9b854f76a9 100644 --- a/code/game/objects/items/devices/uplink.dm +++ b/code/game/objects/items/devices/uplink.dm @@ -6,6 +6,7 @@ var/list/nanoui_items // List of items for NanoUI use var/nanoui_menu = 0 // The current menu we are in var/list/nanoui_data = new // Additional data for NanoUI use + var/faction = "" //Antag faction holder. var/list/purchase_log = new var/datum/mind/uplink_owner = null @@ -96,6 +97,9 @@ var/title = "Remote Uplink" var/data[0] uses = user.mind.tcrystals + if(ishuman(user)) + var/mob/living/carbon/human/H = user + faction = H.antag_faction data["welcome"] = welcome data["crystals"] = uses @@ -188,7 +192,10 @@ nanoui_data["exploit"]["faction"] = html_encode(L.fields["faction"]) nanoui_data["exploit"]["religion"] = html_encode(L.fields["religion"]) nanoui_data["exploit"]["fingerprint"] = html_encode(L.fields["fingerprint"]) - + if(L.fields["antagvis"] == ANTAG_KNOWN || (faction == L.fields["antagfac"] && (L.fields["antagvis"] == ANTAG_SHARED))) + nanoui_data["exploit"]["antagfaction"] = html_encode(L.fields["antagfac"]) + else + nanoui_data["exploit"]["antagfaction"] = html_encode("None") nanoui_data["exploit_exists"] = 1 break diff --git a/code/modules/client/preference_setup/antagonism/01_basic.dm b/code/modules/client/preference_setup/antagonism/01_basic.dm index af9c22c99b9..e0a60b63135 100644 --- a/code/modules/client/preference_setup/antagonism/01_basic.dm +++ b/code/modules/client/preference_setup/antagonism/01_basic.dm @@ -7,19 +7,29 @@ var/global/list/uplink_locations = list("PDA", "Headset", "None") /datum/category_item/player_setup_item/antagonism/basic/load_character(var/savefile/S) S["uplinklocation"] >> pref.uplinklocation S["exploit_record"] >> pref.exploit_record + S["antag_faction"] >> pref.antag_faction + S["antag_vis"] >> pref.antag_vis /datum/category_item/player_setup_item/antagonism/basic/save_character(var/savefile/S) S["uplinklocation"] << pref.uplinklocation S["exploit_record"] << pref.exploit_record + S["antag_faction"] << pref.antag_faction + S["antag_vis"] << pref.antag_vis /datum/category_item/player_setup_item/antagonism/basic/sanitize_character() pref.uplinklocation = sanitize_inlist(pref.uplinklocation, uplink_locations, initial(pref.uplinklocation)) + if(!pref.antag_faction) pref.antag_faction = "None" + if(!pref.antag_vis) pref.antag_vis = "Hidden" // Moved from /datum/preferences/proc/copy_to() /datum/category_item/player_setup_item/antagonism/basic/copy_to_mob(var/mob/living/carbon/human/character) character.exploit_record = pref.exploit_record + character.antag_faction = pref.antag_faction + character.antag_vis = pref.antag_vis /datum/category_item/player_setup_item/antagonism/basic/content(var/mob/user) + . += "Faction: [pref.antag_faction]
" + . += "Visibility: [pref.antag_vis]
" . +="Uplink Type : [pref.uplinklocation]" . +="
" . +="Exploitable information:
" @@ -38,5 +48,25 @@ var/global/list/uplink_locations = list("PDA", "Headset", "None") if(!isnull(exploitmsg) && !jobban_isbanned(user, "Records") && CanUseTopic(user)) pref.exploit_record = exploitmsg return TOPIC_REFRESH + + if(href_list["antagfaction"]) + var/choice = input(user, "Please choose an antagonistic faction to work for.", "Character Preference", pref.antag_faction) as null|anything in antag_faction_choices + list("None","Other") + if(!choice || !CanUseTopic(user)) + return TOPIC_NOACTION + if(choice == "Other") + var/raw_choice = sanitize(input(user, "Please enter a faction.", "Character Preference") as text|null, MAX_NAME_LEN) + if(raw_choice) + pref.antag_faction = raw_choice + else + pref.antag_faction = choice + return TOPIC_REFRESH + + if(href_list["antagvis"]) + var/choice = input(user, "Please choose an antagonistic visibility level.", "Character Preference", pref.antag_vis) as null|anything in antag_visiblity_choices + if(!choice || !CanUseTopic(user)) + return TOPIC_NOACTION + else + pref.antag_vis = choice + return TOPIC_REFRESH return ..() diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 0bcaff2491b..4aeaf7c800d 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -54,8 +54,10 @@ datum/preferences //Some faction information. var/home_system = "Unset" //System of birth. var/citizenship = "None" //Current home system. - var/faction = "None" //Antag faction/general associated faction. + var/faction = "None" //General associated faction. var/religion = "None" //Religious association. + var/antag_faction = "None" //Antag associated faction. + var/antag_vis = "Hidden" //How visible antag association is to others. //Mob preview var/icon/preview_icon = null diff --git a/code/modules/client/preferences_factions.dm b/code/modules/client/preferences_factions.dm index 61d6810224d..030c8d08a39 100644 --- a/code/modules/client/preferences_factions.dm +++ b/code/modules/client/preferences_factions.dm @@ -1,6 +1,7 @@ var/global/list/seen_citizenships = list() var/global/list/seen_systems = list() var/global/list/seen_factions = list() +var/global/list/seen_antag_factions = list() var/global/list/seen_religions = list() //Commenting this out for now until I work the lists it into the event generator/journalist/chaplain. @@ -25,6 +26,7 @@ var/global/list/home_system_choices = list( starsys_name, "Nyx", "Tau Ceti", + "Qerr'Vallis", "Epsilon Ursae Minoris", "S'randarr" ) @@ -42,6 +44,14 @@ var/global/list/faction_choices = list( "Zeng-Hu Pharmaceuticals", "Hesphaistos Industries" ) + +var/global/list/antag_faction_choices = list() //Should be populated after brainstorming. Leaving as blank in case brainstorming does not occur. + +var/global/list/antag_visiblity_choices = list( + "Hidden", + "Shared", + "Known" + ) var/global/list/religion_choices = list( "Unitarianism", diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index 13f4f2f25a2..99bbe8ffcf3 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -43,6 +43,8 @@ var/citizenship = "" var/personal_faction = "" var/religion = "" + var/antag_faction = "" + var/antag_vis = "" //Equipment slots var/obj/item/wear_suit = null diff --git a/html/changelogs/Datraen-AntagFactions1.yml b/html/changelogs/Datraen-AntagFactions1.yml new file mode 100644 index 00000000000..c778523bf3a --- /dev/null +++ b/html/changelogs/Datraen-AntagFactions1.yml @@ -0,0 +1,4 @@ + author: Datraen +delete-after: True +changes: + - rscadd: "Antagonistic factions can now be set and viewed on the uplink. Visibilities can be set for these as well, to help identify sympathizers/potential aids, or to hide the information from those outside of your faction." \ No newline at end of file diff --git a/nano/templates/uplink.tmpl b/nano/templates/uplink.tmpl index ed799677bc0..470f27064cb 100644 --- a/nano/templates/uplink.tmpl +++ b/nano/templates/uplink.tmpl @@ -77,16 +77,17 @@ Used In File(s): \code\game\objects\items\devices\uplinks.dm
{{if data.exploit_exists == 1}} - Name: {{:data.exploit.name}}
- Sex: {{:data.exploit.sex}}
- Species: {{:data.exploit.species}}
- Age: {{:data.exploit.age}}
- Rank: {{:data.exploit.rank}}
- Home System: {{:data.exploit.home_system}}
- Citizenship: {{:data.exploit.citizenship}}
- Faction: {{:data.exploit.faction}}
- Religion: {{:data.exploit.religion}}
- Fingerprint: {{:data.exploit.fingerprint}}
+ Name: {{:data.exploit.name}}
+ Sex: {{:data.exploit.sex}}
+ Species: {{:data.exploit.species}}
+ Age: {{:data.exploit.age}}
+ Rank: {{:data.exploit.rank}}
+ Home System: {{:data.exploit.home_system}}
+ Citizenship: {{:data.exploit.citizenship}}
+ Faction: {{:data.exploit.faction}}
+ Religion: {{:data.exploit.religion}}
+ Fingerprint: {{:data.exploit.fingerprint}}
+ Other Affiliation: {{:data.exploit.antagfaction}}

Acquired Information:
Notes:
{{:data.exploit.nanoui_exploit_record}}