mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-14 04:02:31 +00:00
Merge pull request #2000 from Datraen/FluffyAntags
Adds fluff antag factions, antag visibility options for uplinks.
This commit is contained in:
@@ -162,3 +162,8 @@
|
|||||||
#define CAT_NORMAL 1
|
#define CAT_NORMAL 1
|
||||||
#define CAT_HIDDEN 2
|
#define CAT_HIDDEN 2
|
||||||
#define CAT_COIN 4
|
#define CAT_COIN 4
|
||||||
|
|
||||||
|
//Antag Faction Visbility
|
||||||
|
#define ANTAG_HIDDEN "Hidden"
|
||||||
|
#define ANTAG_SHARED "Shared"
|
||||||
|
#define ANTAG_KNOWN "Known"
|
||||||
|
|||||||
@@ -228,6 +228,8 @@
|
|||||||
L.fields["faction"] = H.personal_faction
|
L.fields["faction"] = H.personal_faction
|
||||||
L.fields["religion"] = H.religion
|
L.fields["religion"] = H.religion
|
||||||
L.fields["image"] = getFlatIcon(H) //This is god-awful
|
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"))
|
if(H.exploit_record && !jobban_isbanned(H, "Records"))
|
||||||
L.fields["exploit_record"] = H.exploit_record
|
L.fields["exploit_record"] = H.exploit_record
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
var/list/nanoui_items // List of items for NanoUI use
|
var/list/nanoui_items // List of items for NanoUI use
|
||||||
var/nanoui_menu = 0 // The current menu we are in
|
var/nanoui_menu = 0 // The current menu we are in
|
||||||
var/list/nanoui_data = new // Additional data for NanoUI use
|
var/list/nanoui_data = new // Additional data for NanoUI use
|
||||||
|
var/faction = "" //Antag faction holder.
|
||||||
|
|
||||||
var/list/purchase_log = new
|
var/list/purchase_log = new
|
||||||
var/datum/mind/uplink_owner = null
|
var/datum/mind/uplink_owner = null
|
||||||
@@ -96,6 +97,9 @@
|
|||||||
var/title = "Remote Uplink"
|
var/title = "Remote Uplink"
|
||||||
var/data[0]
|
var/data[0]
|
||||||
uses = user.mind.tcrystals
|
uses = user.mind.tcrystals
|
||||||
|
if(ishuman(user))
|
||||||
|
var/mob/living/carbon/human/H = user
|
||||||
|
faction = H.antag_faction
|
||||||
|
|
||||||
data["welcome"] = welcome
|
data["welcome"] = welcome
|
||||||
data["crystals"] = uses
|
data["crystals"] = uses
|
||||||
@@ -188,7 +192,10 @@
|
|||||||
nanoui_data["exploit"]["faction"] = html_encode(L.fields["faction"])
|
nanoui_data["exploit"]["faction"] = html_encode(L.fields["faction"])
|
||||||
nanoui_data["exploit"]["religion"] = html_encode(L.fields["religion"])
|
nanoui_data["exploit"]["religion"] = html_encode(L.fields["religion"])
|
||||||
nanoui_data["exploit"]["fingerprint"] = html_encode(L.fields["fingerprint"])
|
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
|
nanoui_data["exploit_exists"] = 1
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|||||||
@@ -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)
|
/datum/category_item/player_setup_item/antagonism/basic/load_character(var/savefile/S)
|
||||||
S["uplinklocation"] >> pref.uplinklocation
|
S["uplinklocation"] >> pref.uplinklocation
|
||||||
S["exploit_record"] >> pref.exploit_record
|
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)
|
/datum/category_item/player_setup_item/antagonism/basic/save_character(var/savefile/S)
|
||||||
S["uplinklocation"] << pref.uplinklocation
|
S["uplinklocation"] << pref.uplinklocation
|
||||||
S["exploit_record"] << pref.exploit_record
|
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()
|
/datum/category_item/player_setup_item/antagonism/basic/sanitize_character()
|
||||||
pref.uplinklocation = sanitize_inlist(pref.uplinklocation, uplink_locations, initial(pref.uplinklocation))
|
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()
|
// Moved from /datum/preferences/proc/copy_to()
|
||||||
/datum/category_item/player_setup_item/antagonism/basic/copy_to_mob(var/mob/living/carbon/human/character)
|
/datum/category_item/player_setup_item/antagonism/basic/copy_to_mob(var/mob/living/carbon/human/character)
|
||||||
character.exploit_record = pref.exploit_record
|
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)
|
/datum/category_item/player_setup_item/antagonism/basic/content(var/mob/user)
|
||||||
|
. += "Faction: <a href='?src=\ref[src];antagfaction=1'>[pref.antag_faction]</a><br/>"
|
||||||
|
. += "Visibility: <a href='?src=\ref[src];antagvis=1'>[pref.antag_vis]</a><br/>"
|
||||||
. +="<b>Uplink Type : <a href='?src=\ref[src];antagtask=1'>[pref.uplinklocation]</a></b>"
|
. +="<b>Uplink Type : <a href='?src=\ref[src];antagtask=1'>[pref.uplinklocation]</a></b>"
|
||||||
. +="<br>"
|
. +="<br>"
|
||||||
. +="<b>Exploitable information:</b><br>"
|
. +="<b>Exploitable information:</b><br>"
|
||||||
@@ -39,4 +49,24 @@ var/global/list/uplink_locations = list("PDA", "Headset", "None")
|
|||||||
pref.exploit_record = exploitmsg
|
pref.exploit_record = exploitmsg
|
||||||
return TOPIC_REFRESH
|
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 ..()
|
return ..()
|
||||||
|
|||||||
@@ -54,8 +54,10 @@ datum/preferences
|
|||||||
//Some faction information.
|
//Some faction information.
|
||||||
var/home_system = "Unset" //System of birth.
|
var/home_system = "Unset" //System of birth.
|
||||||
var/citizenship = "None" //Current home system.
|
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/religion = "None" //Religious association.
|
||||||
|
var/antag_faction = "None" //Antag associated faction.
|
||||||
|
var/antag_vis = "Hidden" //How visible antag association is to others.
|
||||||
|
|
||||||
//Mob preview
|
//Mob preview
|
||||||
var/icon/preview_icon = null
|
var/icon/preview_icon = null
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
var/global/list/seen_citizenships = list()
|
var/global/list/seen_citizenships = list()
|
||||||
var/global/list/seen_systems = list()
|
var/global/list/seen_systems = list()
|
||||||
var/global/list/seen_factions = list()
|
var/global/list/seen_factions = list()
|
||||||
|
var/global/list/seen_antag_factions = list()
|
||||||
var/global/list/seen_religions = list()
|
var/global/list/seen_religions = list()
|
||||||
|
|
||||||
//Commenting this out for now until I work the lists it into the event generator/journalist/chaplain.
|
//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,
|
starsys_name,
|
||||||
"Nyx",
|
"Nyx",
|
||||||
"Tau Ceti",
|
"Tau Ceti",
|
||||||
|
"Qerr'Vallis",
|
||||||
"Epsilon Ursae Minoris",
|
"Epsilon Ursae Minoris",
|
||||||
"S'randarr"
|
"S'randarr"
|
||||||
)
|
)
|
||||||
@@ -43,6 +45,14 @@ var/global/list/faction_choices = list(
|
|||||||
"Hesphaistos Industries"
|
"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(
|
var/global/list/religion_choices = list(
|
||||||
"Unitarianism",
|
"Unitarianism",
|
||||||
"Hinduism",
|
"Hinduism",
|
||||||
|
|||||||
@@ -43,6 +43,8 @@
|
|||||||
var/citizenship = ""
|
var/citizenship = ""
|
||||||
var/personal_faction = ""
|
var/personal_faction = ""
|
||||||
var/religion = ""
|
var/religion = ""
|
||||||
|
var/antag_faction = ""
|
||||||
|
var/antag_vis = ""
|
||||||
|
|
||||||
//Equipment slots
|
//Equipment slots
|
||||||
var/obj/item/wear_suit = null
|
var/obj/item/wear_suit = null
|
||||||
|
|||||||
4
html/changelogs/Datraen-AntagFactions1.yml
Normal file
4
html/changelogs/Datraen-AntagFactions1.yml
Normal file
@@ -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."
|
||||||
@@ -87,6 +87,7 @@ Used In File(s): \code\game\objects\items\devices\uplinks.dm
|
|||||||
<span class="good">Faction: </span> <span class="average">{{:data.exploit.faction}} </span><br>
|
<span class="good">Faction: </span> <span class="average">{{:data.exploit.faction}} </span><br>
|
||||||
<span class="good">Religion: </span> <span class="average">{{:data.exploit.religion}} </span><br>
|
<span class="good">Religion: </span> <span class="average">{{:data.exploit.religion}} </span><br>
|
||||||
<span class="good">Fingerprint: </span> <span class="average">{{:data.exploit.fingerprint}} </span><br>
|
<span class="good">Fingerprint: </span> <span class="average">{{:data.exploit.fingerprint}} </span><br>
|
||||||
|
<span class="good">Other Affiliation: </span> <span class="average">{{:data.exploit.antagfaction}} </span><br>
|
||||||
|
|
||||||
<br>Acquired Information:<br>
|
<br>Acquired Information:<br>
|
||||||
<span class="good">Notes:<br> </span> <span class="average">{{:data.exploit.nanoui_exploit_record}}</span><br><br>
|
<span class="good">Notes:<br> </span> <span class="average">{{:data.exploit.nanoui_exploit_record}}</span><br><br>
|
||||||
|
|||||||
Reference in New Issue
Block a user