Merged in preferences file changes, changed None to Unset for home system.

This commit is contained in:
Zuhayr
2014-08-11 10:38:01 +09:30
10 changed files with 426 additions and 234 deletions
+53
View File
@@ -77,6 +77,12 @@ datum/preferences
var/language = "None" //Secondary language
var/list/gear //Custom/fluff item loadout.
//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/religion = "None" //Religious association.
//Mob preview
var/icon/preview_icon = null
var/icon/preview_icon_front = null
@@ -406,7 +412,14 @@ datum/preferences
dat += "<br><b>Body Color</b><br>"
dat += "<a href='?_src_=prefs;preference=skin;task=input'>Change Color</a> <font face='fixedsys' size='3' color='#[num2hex(r_skin, 2)][num2hex(g_skin, 2)][num2hex(b_skin, 2)]'><table style='display:inline;' bgcolor='#[num2hex(r_skin, 2)][num2hex(g_skin, 2)][num2hex(b_skin)]'><tr><td>__</td></tr></table></font>"
dat += "<br><br><b>Background Information</b><br>"
dat += "<b>Home system</b>: <a href='byond://?src=\ref[user];preference=home_system;task=input'>[home_system]</a><br/>"
dat += "<b>Citizenship</b>: <a href='byond://?src=\ref[user];preference=citizenship;task=input'>[citizenship]</a><br/>"
dat += "<b>Faction</b>: <a href='byond://?src=\ref[user];preference=faction;task=input'>[faction]</a><br/>"
dat += "<b>Religion</b>: <a href='byond://?src=\ref[user];preference=religion;task=input'>[religion]</a><br/>"
dat += "<br><br>"
if(jobban_isbanned(user, "Syndicate"))
dat += "<b>You are banned from antagonist roles.</b>"
src.be_special = 0
@@ -1343,6 +1356,46 @@ datum/preferences
return
spawnpoint = choice
if("home_system")
var/choice = input(user, "Please choose a home system.") as null|anything in home_system_choices + list("Unset","Other")
if(!choice)
return
if(choice == "Other")
var/raw_choice = input(user, "Please enter a home system.") as text|null
if(raw_choice)
home_system = sanitize(copytext(raw_choice,1,MAX_MESSAGE_LEN))
return
home_system = choice
if("citizenship")
var/choice = input(user, "Please choose your current citizenship.") as null|anything in citizenship_choices + list("None","Other")
if(!choice)
return
if(choice == "Other")
var/raw_choice = input(user, "Please enter your current citizenship.", "Character Preference") as text|null
if(raw_choice)
citizenship = sanitize(copytext(raw_choice,1,MAX_MESSAGE_LEN))
return
citizenship = choice
if("faction")
var/choice = input(user, "Please choose a faction to work for.") as null|anything in faction_choices + list("None","Other")
if(!choice)
return
if(choice == "Other")
var/raw_choice = input(user, "Please enter a faction.") as text|null
if(raw_choice)
faction = sanitize(copytext(raw_choice,1,MAX_MESSAGE_LEN))
return
faction = choice
if("religion")
var/choice = input(user, "Please choose a religion.") as null|anything in religion_choices + list("None","Other")
if(!choice)
return
if(choice == "Other")
var/raw_choice = input(user, "Please enter a religon.") as text|null
if(raw_choice)
religion = sanitize(copytext(raw_choice,1,MAX_MESSAGE_LEN))
return
religion = choice
else
switch(href_list["preference"])
if("gender")
@@ -0,0 +1,53 @@
var/global/list/seen_citizenships = list()
var/global/list/seen_systems = list()
var/global/list/seen_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.
/proc/UpdateFactionList(mob/living/carbon/human/M)
/*if(M && M.client && M.client.prefs)
seen_citizenships |= M.client.prefs.citizenship
seen_systems |= M.client.prefs.home_system
seen_factions |= M.client.prefs.faction
seen_religions |= M.client.prefs.religion*/
return
var/global/list/citizenship_choices = list(
"Earth",
"Mars",
"Moghes",
"Ahdomai",
"Qerrbalak"
)
var/global/list/home_system_choices = list(
"Sol",
"Nyx",
"Tau Ceti",
"Epsilon Ursae Majoris",
"S'randarr"
)
var/global/list/faction_choices = list(
"Sol Central",
"Vey Med",
"Einstein Engines",
"Free Trade Union",
"NanoTrasen",
"Ward-Takahashi GMB",
"Gilthari Exports",
"Grayson Manufactories Ltd.",
"Aether Atmospherics",
"Zeng-Hu Pharmaceuticals",
"Hesphaistos Industries"
)
var/global/list/religion_choices = list(
"Unitarianism",
"Hinduism",
"Buddhist",
"Islamic",
"Christian",
"Agnostic",
"Deist"
)
@@ -166,6 +166,10 @@
S["skill_specialization"] >> skill_specialization
S["organ_data"] >> organ_data
S["gear"] >> gear
S["home_system"] >> home_system
S["citizenship"] >> citizenship
S["faction"] >> faction
S["religion"] >> religion
S["nanotrasen_relation"] >> nanotrasen_relation
//S["skin_style"] >> skin_style
@@ -225,6 +229,11 @@
if(!gear) src.gear = list()
//if(!skin_style) skin_style = "Default"
if(!home_system) home_system = "Unset"
if(!citizenship) citizenship = "None"
if(!faction) faction = "None"
if(!religion) religion = "None"
return 1
/datum/preferences/proc/save_character()
@@ -297,6 +306,10 @@
S["skill_specialization"] << skill_specialization
S["organ_data"] << organ_data
S["gear"] << gear
S["home_system"] << home_system
S["citizenship"] << citizenship
S["faction"] << faction
S["religion"] << religion
S["nanotrasen_relation"] << nanotrasen_relation
//S["skin_style"] << skin_style
+67
View File
@@ -181,3 +181,70 @@
icon_opened = "miningcaropen"
icon_closed = "miningcar"
// Flags.
/obj/item/stack/flag
name = "flags"
desc = "Some colourful flags."
singular_name = "flag"
amount = 10
max_amount = 10
icon = 'icons/obj/mining.dmi'
var/upright = 0
var/base_state
/obj/item/stack/flag/New()
..()
base_state = icon_state
/obj/item/stack/flag/red
name = "red flags"
singular_name = "red flag"
icon_state = "redflag"
/obj/item/stack/flag/yellow
name = "yellow flags"
singular_name = "yellow flag"
icon_state = "yellowflag"
/obj/item/stack/flag/green
name = "green flags"
singular_name = "green flag"
icon_state = "greenflag"
/obj/item/stack/flag/attackby(obj/item/W as obj, mob/user as mob)
if(upright && istype(W,src.type))
src.attack_hand(user)
else
..()
/obj/item/stack/flag/attack_hand(user as mob)
if(upright)
upright = 0
icon_state = base_state
anchored = 0
src.visible_message("<b>[user]</b> knocks down [src].")
else
..()
/obj/item/stack/flag/attack_self(mob/user as mob)
var/obj/item/stack/flag/F = locate() in get_turf(src)
var/turf/T = get_turf(src)
if(!T || !istype(T,/turf/simulated/floor/plating/airless/asteroid))
user << "The flag won't stand up in this terrain."
return
if(F && F.upright)
user << "There is already a flag here."
return
var/obj/item/stack/flag/newflag = new src.type(T)
newflag.amount = 1
newflag.upright = 1
anchored = 1
newflag.name = newflag.singular_name
newflag.icon_state = "[newflag.base_state]_open"
newflag.visible_message("<b>[user]</b> plants [newflag] firmly in the ground.")
src.use(1)
@@ -301,6 +301,7 @@
var/mob/living/carbon/human/character = create_character() //creates the human and transfers vars and mind
job_master.EquipRank(character, rank, 1) //equips the human
UpdateFactionList(character)
EquipCustomItems(character)
//Find our spawning point.
@@ -330,6 +331,9 @@
if(character.mind.assigned_role != "Cyborg")
data_core.manifest_inject(character)
ticker.minds += character.mind//Cyborgs and AIs handle this in the transform proc. //TODO!!!!! ~Carn
//Grab some data from the character prefs for use in random news procs.
AnnounceArrival(character, rank, join_message)
else